gstreamer1.0/gstreamer1.0.spec
2012-12-04 16:08:04 +04:00

234 lines
7.4 KiB
RPMSpec

%define oname gstreamer
%define api 1.0
%define name %{oname}%{api}
%define vname %{oname}10
%define major 0
%define libname %mklibname %{oname} %{api} %{major}
%define gi_name %mklibname gst-gir %{api}
%define libnamedev %mklibname -d %{name}
%define build_docs 0
Name: %{oname}%{api}
Summary: GStreamer Streaming-media framework runtime
Version: 1.0.3
Release: %mkrel 1
License: LGPLv2+
Group: Sound
URL: http://gstreamer.freedesktop.org/
Source0: http://gstreamer.freedesktop.org/src/gstreamer/%{oname}-%{version}.tar.xz
Source1: gstreamer.prov
Patch0: gstreamer-inspect-rpm-format.patch
BuildRequires: pkgconfig(gio-2.0) >= 2.32.0
BuildRequires: pkgconfig(glib-2.0) >= 2.32.0
BuildRequires: pkgconfig(gmodule-no-export-2.0)
BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(gthread-2.0)
BuildRequires: pkgconfig(libxml-2.0) >= 2.4.9
BuildRequires: gobject-introspection-devel
BuildRequires: pkgconfig(popt)
BuildRequires: gettext-devel
BuildRequires: libcheck-devel
BuildRequires: chrpath
BuildRequires: bison
BuildRequires: flex
%ifnarch %arm %mips
BuildRequires: valgrind-devel
%endif
%ifarch %ix86
BuildRequires: nasm => 0.90
%endif
%if %build_docs
BuildRequires: gtk-doc >= 0.7
BuildRequires: transfig
BuildRequires: docbook-dtd42-xml
BuildRequires: docbook-dtd412-xml
BuildRequires: ghostscript
BuildRequires: python-pyxml
%endif
%description
GStreamer is a streaming-media framework, based on graphs of filters which
operate on media data. Applications using this library can do anything
from real-time sound processing to playing videos, and just about anything
else media-related. Its plugin-based architecture means that new data
types or processing capabilities can be added simply by installing new
plugins.
%package tools
Summary: GStreamer Streaming-media framework runtime
Group: Sound
Provides: %{vname}-tools = %{version}-%{release}
%description tools
GStreamer is a streaming-media framework, based on graphs of filters which
operate on media data. Applications using this library can do anything
from real-time sound processing to playing videos, and just about anything
else media-related. Its plugin-based architecture means that new data
types or processing capabilities can be added simply by installing new
plugins.
%package -n %{libname}
Summary: Libraries for GStreamer streaming-media framework
Group: System/Libraries
Requires: %{name}-tools >= %{version}-%{release}
Provides: libgstreamer%{api} = %{version}-%{release}
%description -n %{libname}
GStreamer is a streaming-media framework, based on graphs of filters which
operate on media data. Applications using this library can do anything
from real-time sound processing to playing videos, and just about anything
else media-related. Its plugin-based architecture means that new data
types or processing capabilities can be added simply by installing new
plugins.
This package contains the libraries.
%package -n %{gi_name}
Summary: GObject Introspection interface libraries for %{name}
Group: System/Libraries
Requires: %{libname} = %{version}-%{release}
%description -n %{gi_name}
GObject Introspection interface libraries for %{name}.
%package -n %{libnamedev}
Summary: Libraries and include files for GStreamer streaming-media framework
Group: Development/C
Requires: %{libname} = %{version}-%{release}
Requires: %{name}-tools = %{version}-%{release}
Provides: gstreamer%{api}-devel = %{version}-%{release}
%description -n %{libnamedev}
GStreamer is a streaming-media framework, based on graphs of filters which
operate on media data. Applications using this library can do anything
from real-time sound processing to playing videos, and just about anything
else media-related. Its plugin-based architecture means that new data
types or processing capabilities can be added simply by installing new
plugins.
This package contains the libraries and includes files necessary to develop
applications and plugins for GStreamer.
%prep
%setup -q -n %{oname}-%{version}
%apply_patches
%build
%configure2_5x \
--enable-debug \
--disable-static \
--disable-dependency-tracking \
--with-package-name='%_vendor %{name} package' \
--with-package-origin='http://bugs.%_vendor.org/' \
--disable-tests \
--disable-examples \
--disable-rpath \
%if %build_docs
--enable-docbook \
--enable-gtk-doc \
%else
--disable-docbook \
--disable-gtk-doc \
%endif
%ifarch %mips
--disable-valgrind \
%endif
--with-html-dir=%{_datadir}/gtk-doc/html
%make
%check
cd tests/check
# disable check as it will stall at build in iurt
#make check
%install
%makeinstall_std
mkdir -p %{buildroot}%{_var}/cache/%{oname}-%{api}
#clean the files we don't want to install
find %{buildroot} -name '*.la' -delete
%find_lang %{oname}-%{api}
%if %build_docs
mv %{buildroot}%{_datadir}/doc/%{oname}-%{api}/ installed-docs
%endif
#gw really remove rpath for rpmlint
chrpath -d %{buildroot}{%_bindir/gst-{inspect,launch,typefind}-1.0,%_libdir/{*.so,%{oname}-%api/*.so}}
# Add the provides script
install -m0755 -D %{SOURCE1} %{buildroot}%{_prefix}/lib/rpm/%{_vendor}/%{name}.prov
%files tools -f %{oname}-%{api}.lang
%doc AUTHORS COPYING README NEWS
%dir %{_var}/cache/%{oname}-%{api}
%{_bindir}/gst-inspect-%{api}
%{_bindir}/gst-launch-%{api}
%{_bindir}/gst-typefind-%{api}
%{_mandir}/man1/gst-inspect-%{api}.1*
%{_mandir}/man1/gst-launch-%{api}.1*
%{_mandir}/man1/gst-typefind-%{api}.1*
%files -n %{libname}
%dir %{_libdir}/%{oname}-%{api}
%{_libdir}/libgstbase-%{api}.so.%{major}*
%{_libdir}/libgstcheck-%{api}.so.%{major}*
%{_libdir}/libgstreamer-%{api}.so.%{major}*
%{_libdir}/libgstnet-%{api}.so.%{major}*
%{_libdir}/libgstcontroller-%{api}.so.%{major}*
%{_libdir}/%{oname}-%{api}/gst-plugin-scanner
%{_libdir}/%{oname}-%{api}/libgstcoreelements.so
%files -n %{gi_name}
%{_libdir}/girepository-1.0/Gst-%{api}.typelib
%{_libdir}/girepository-1.0/GstBase-%{api}.typelib
%{_libdir}/girepository-1.0/GstCheck-%{api}.typelib
%{_libdir}/girepository-1.0/GstController-%{api}.typelib
%{_libdir}/girepository-1.0/GstNet-%{api}.typelib
%files -n %{libnamedev}
%doc ChangeLog
%if %build_docs
%doc installed-docs/*
%endif
%{_prefix}/lib/rpm/%{_vendor}/%{name}.prov
%dir %{_includedir}/%{oname}-%{api}
%dir %{_includedir}/%{oname}-%{api}/gst
%{_includedir}/%{oname}-%{api}/gst/*.h
%dir %{_includedir}/%{oname}-%{api}/gst/base/
%{_includedir}/%{oname}-%{api}/gst/base/*.h
%{_includedir}/%{oname}-%{api}/gst/check/
%dir %{_includedir}/%{oname}-%{api}/gst/controller/
%{_includedir}/%{oname}-%{api}/gst/controller/*.h
%{_includedir}/%{oname}-%{api}/gst/net/
%{_libdir}/libgstbase-%{api}.so
%{_libdir}/libgstcheck-%{api}.so
%{_libdir}/libgstreamer-%{api}.so
%{_libdir}/libgstnet-%{api}.so
%{_libdir}/libgstcontroller-%{api}.so
%{_datadir}/aclocal/gst-element-check-%{api}.m4
%{_libdir}/pkgconfig/gstreamer-%{api}.pc
%{_libdir}/pkgconfig/gstreamer-base-%{api}.pc
%{_libdir}/pkgconfig/gstreamer-check-%{api}.pc
%{_libdir}/pkgconfig/gstreamer-net-%{api}.pc
%{_libdir}/pkgconfig/gstreamer-controller-%{api}.pc
## we specify the API docs as regular files since %docs doesn't fail when
# files aren't found anymore for RPM >= 4
# we list all of the files we really need to trap incomplete doc builds
# then we catch the rest with *, you can safely ignore the errors from this
## gstreamer API
%{_datadir}/gtk-doc/html/*
%{_datadir}/gir-1.0/Gst-%{api}.gir
%{_datadir}/gir-1.0/GstBase-%{api}.gir
%{_datadir}/gir-1.0/GstCheck-%{api}.gir
%{_datadir}/gir-1.0/GstController-%{api}.gir
%{_datadir}/gir-1.0/GstNet-%{api}.gir