File gstreamer-0_10-plugins-good.spec of Package gstreamer-0_10-plugins-good

#
# spec file for package gstreamer-0_10-plugins-good
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define build_hal 0%{?suse_version} <= 1140
# aasink is just a toy. Once in future, we may want to disable aalib
# support completely:
%define ENABLE_AALIB 1

Name:           gstreamer-0_10-plugins-good
%define _name gst-plugins-good
Version:        0.10.31
Release:        0
%define gst_branch 0.10
Summary:        GStreamer Streaming-Media Framework Plug-Ins
License:        LGPL-2.1+
Group:          Productivity/Multimedia/Other
Url:            http://gstreamer.freedesktop.org/
Source0:        http://gstreamer.freedesktop.org/src/gst-plugins-good/%{_name}-%{version}.tar.xz
# PATCH-FIX-UPSTREAM gstreamer-0_10-plugins-good-missing-return-value.patch bgo#670561 vuntz@opensuse.org -- Fix missing return value
Patch0:         gstreamer-0_10-plugins-good-missing-return-value.patch
# PATCH-FIX-UPSTREAM gstreamer-0_10-plugins-good-v4l2.patch dimstar@opensuse.org -- Fix build with recent kernels, taken from upstream git.
Patch1:         gstreamer-0_10-plugins-good-v4l2.patch
# PATCH-FIX-UPSTREAM gstreamer-0_10-plugins-good-v4l2-1.patch mhrusecky@suse.cz -- Fix build with recent kernels, taken from upstream git.
Patch2:         gstreamer-0_10-plugins-good-v4l2-2.patch
# PATCH-FIX-UPSTREAM gst-0_10-docs-fix-mismatched-para-tags.patch  bgo#724085 zaitor@opensuse.org -- gst-0_10-docs-fix-mismatched-para-tags.patch
Patch3:         gst-0_10-docs-fix-mismatched-para-tags.patch
# PATCH-FIX-UPSTREAM gst-0_10-docs-use-docbook-markup-for-xi:include.patch zaitor@opensuse.org -- docs: use docbook markup for xi:include It turns out that the change in gtk-doc-1.20 which wraps the |[]| content in CDATA break xi:inlcude examples. 
Patch4:         gst-0_10-docs-use-docbook-markup-for-xi:include.patch
%if 0%{?ENABLE_AALIB}
BuildRequires:  aalib-devel
%endif
# Jack moved here from plugins bad in version 0.10.27
BuildRequires:  cairo-devel
BuildRequires:  check-devel
BuildRequires:  esound-devel
BuildRequires:  flac-devel
BuildRequires:  gcc-c++
BuildRequires:  gconf2-devel
BuildRequires:  glib2-devel >= 2.24
BuildRequires:  gstreamer-0_10-devel >= 0.10.36
BuildRequires:  gstreamer-0_10-plugins-base-devel >= 0.10.36
BuildRequires:  gtk-doc
BuildRequires:  gtk2-devel
BuildRequires:  libjack-devel
%if %{build_hal}
BuildRequires:  hal-devel
%endif
BuildRequires:  ftgl-devel
BuildRequires:  ladspa-devel
%if 0%{?suse_version} > 1210
BuildRequires:  libICE-devel
BuildRequires:  libSM-devel
# used by libgstvideo4linux2.so
BuildRequires:  libXv-devel
%endif
BuildRequires:  libavc1394-devel
BuildRequires:  libcaca-devel
BuildRequires:  libdv-devel
BuildRequires:  libiec61883-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libpulse-devel
BuildRequires:  libshout-devel
BuildRequires:  libsoup-devel
BuildRequires:  libtag-devel
BuildRequires:  libtheora-devel
BuildRequires:  libv4l-devel
BuildRequires:  libvorbis-devel
BuildRequires:  orc >= 0.4.11
BuildRequires:  python-devel
BuildRequires:  python-xml
BuildRequires:  sgml-skel
BuildRequires:  speex-devel
BuildRequires:  translation-update-upstream
BuildRequires:  wavpack-devel
# TODO find where process.h comes from, not kernel-devel and not wxWidgets so far.
%ifarch %ix86 ppc x86_64
BuildRequires:  valgrind-devel
%endif
%if 0%{?suse_version} <= 1210
BuildRequires:  xz
%endif
BuildRequires:  zlib-devel
BuildRequires:  pkgconfig(gudev-1.0) >= 143
%define gstreamer010_plugins_good_req %(xzgrep --text "^GST.*_REQ" %{S:0} | sort -u | sed 's/GST_REQ=/gstreamer-0_10 >= /;s/GSTPB_REQ=/gstreamer-0_10-plugins-base >= /' | tr '\\n' ' ')
Requires:       %gstreamer010_plugins_good_req
Recommends:     %{name}-lang = %{version}
Enhances:       gstreamer-0_10
# qtdemux, videocrop, wavpack moved from bad (after OpenSUSE 10.2): See TODO below the header.
Conflicts:      gstreamer010-plugins-bad <= 0.10.4
# souphttpsrc: moved from bad (before  OpenSUSE 11.1 & SLE11):
Conflicts:      gstreamer-0_10-plugins-bad <= 0.10.8
# Name up to 10.3:
Provides:       gstreamer010-plugins-good = %{version}
Obsoletes:      gstreamer010-plugins-good < %{version}
# Generic name, never used in SuSE: I wish it had been used I would have used it then I wouldn't have to keep copy pasting and actually type it.
Provides:       gst-plugins-good = %{version}
# Pulseaudio plugin was integrated
Provides:       gstreamer-0_10-pulse = %{version}
Obsoletes:      gstreamer-0_10-pulse < %{version}
%if ! %{build_hal}
# Obsolete hal subpackage which we had until 11.4.
Obsoletes:      gstreamer-0_10-plugin-hal <= %{version}
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%gconf_schemas_prereq

%description
GStreamer is a streaming media framework based on graphs of filters
that operate on media data. Applications using this library can do
anything media-related, from real-time sound processing to playing
videos. Its plug-in-based architecture means that new data types or
processing capabilities can be added simply by installing new plug-ins.

%package -n gstreamer-0_10-plugin-esd
Summary:        GStreamer Streaming-Media Framework Plug-Ins -- EsounD plugin
Group:          Productivity/Multimedia/Other
# We might need some plugins from the same package
Requires:       %{name}
Supplements:    packageand(%{name}:esound-daemon)

%description -n gstreamer-0_10-plugin-esd
GStreamer is a streaming media framework based on graphs of filters
that operate on media data. Applications using this library can do
anything media-related, from real-time sound processing to playing
videos. Its plug-in-based architecture means that new data types or
processing capabilities can be added simply by installing new plug-ins.

%if %{build_hal}

%package -n gstreamer-0_10-plugin-hal
Summary:        GStreamer Streaming-Media Framework Plug-Ins -- HAL plugin
Group:          Productivity/Multimedia/Other
# We might need some plugins from the same package
Requires:       %{name}
Supplements:    packageand(%{name}:hal)

%description -n gstreamer-0_10-plugin-hal
GStreamer is a streaming media framework based on graphs of filters
that operate on media data. Applications using this library can do
anything media-related, from real-time sound processing to playing
videos. Its plug-in-based architecture means that new data types or
processing capabilities can be added simply by installing new plug-ins.
%endif

%package doc
Summary:        Documentation for gstreamer-0_10-plugins-good
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}
# Name up to 10.3:
Provides:       gstreamer010-plugins-good-doc = %{version}
Obsoletes:      gstreamer010-plugins-good-doc < %{version}

%description doc
This package contains documentation for gstreamer-0_10-plugins-good.

%package extra
Summary:        Complementary plugins for gstreamer-0_10-plugins-good
Group:          Productivity/Multimedia/Other
Requires:       %{name} = %{version}
Enhances:       gstreamer-0_10-plugins-good
# Name up to 10.3:
Provides:       gstreamer010-plugins-good-extra = %{version}
Obsoletes:      gstreamer010-plugins-good-extra < %{version}
# For update from <= 10.2 (v4l2):
Conflicts:      gstreamer010-plugins-bad <= 0.10.3
# For update from < 11.1 (aasink):
Conflicts:      gstreamer010-plugins-good < 0.10.10

%description extra
This package provides complementary plugins for
gstreamer-0_10-plugins-good.

%lang_package
%prep
chmod 0644 %{S:0}
%setup -q -n %{_name}-%{version}
translation-update-upstream po gst-plugins-good-0.10
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1

%build
# FIXME:
# warning: failed to load external entity "xml/element-v4l2src-details.xml"
# warning: failed to load external entity "xml/plugin-video4linux2.xml"
%configure\
%if ! 0%{?ENABLE_AALIB}
	--disable-aalib\
%endif
	--disable-schemas-install\
	--enable-gtk-doc\
	--enable-experimental
make %{?jobs:-j%jobs} V=1 \
%ifarch ppc ppc64
	ORCC_FLAGS= \
%endif
	%{nil}

%install
%makeinstall
%find_lang %{_name}-%{gst_branch}
%find_gconf_schemas
rm $RPM_BUILD_ROOT%{_libdir}/gstreamer-%{gst_branch}/*.*a

%clean
rm -rf $RPM_BUILD_ROOT

%pre -f %{name}.schemas_pre

%posttrans -f %{name}.schemas_posttrans

%preun -f %{name}.schemas_preun

%files -f %{name}.schemas_list
%defattr(-, root, root)
%doc AUTHORS COPYING NEWS README RELEASE REQUIREMENTS
%{_libdir}/gstreamer-%{gst_branch}/libgstannodex.so
%{_libdir}/gstreamer-%{gst_branch}/libgstalaw.so
%{_libdir}/gstreamer-%{gst_branch}/libgstalpha.so
%{_libdir}/gstreamer-%{gst_branch}/libgstalphacolor.so
%{_libdir}/gstreamer-%{gst_branch}/libgstapetag.so
%{_libdir}/gstreamer-%{gst_branch}/libgstaudiofx.so
%{_libdir}/gstreamer-%{gst_branch}/libgstaudioparsers.so
%{_libdir}/gstreamer-%{gst_branch}/libgstauparse.so
%{_libdir}/gstreamer-%{gst_branch}/libgstautodetect.so
%{_libdir}/gstreamer-%{gst_branch}/libgstavi.so
%{_libdir}/gstreamer-%{gst_branch}/libgstcairo.so
%{_libdir}/gstreamer-%{gst_branch}/libgstcutter.so
%{_libdir}/gstreamer-%{gst_branch}/libgstdebug.so
%{_libdir}/gstreamer-%{gst_branch}/libgstdeinterlace.so
%{_libdir}/gstreamer-%{gst_branch}/libgstefence.so
%{_libdir}/gstreamer-%{gst_branch}/libgsteffectv.so
%{_libdir}/gstreamer-%{gst_branch}/libgstequalizer.so
%{_datadir}/gstreamer-%{gst_branch}/presets/GstIirEqualizer10Bands.prs
%{_datadir}/gstreamer-%{gst_branch}/presets/GstIirEqualizer3Bands.prs
%{_libdir}/gstreamer-%{gst_branch}/libgstflac.so
%{_libdir}/gstreamer-%{gst_branch}/libgstflv.so
%{_libdir}/gstreamer-%{gst_branch}/libgstflxdec.so
%{_libdir}/gstreamer-%{gst_branch}/libgstgconfelements.so
%{_libdir}/gstreamer-%{gst_branch}/libgstgdkpixbuf.so
%{_libdir}/gstreamer-%{gst_branch}/libgstgoom.so
%{_libdir}/gstreamer-%{gst_branch}/libgstgoom2k1.so
%{_libdir}/gstreamer-%{gst_branch}/libgsticydemux.so
%{_libdir}/gstreamer-%{gst_branch}/libgstid3demux.so
%{_libdir}/gstreamer-%{gst_branch}/libgstimagefreeze.so
%{_libdir}/gstreamer-%{gst_branch}/libgstinterleave.so
%{_libdir}/gstreamer-%{gst_branch}/libgstisomp4.so
%{_libdir}/gstreamer-%{gst_branch}/libgstjack.so
%{_libdir}/gstreamer-%{gst_branch}/libgstjpeg.so
%{_libdir}/gstreamer-%{gst_branch}/libgstlevel.so
%{_libdir}/gstreamer-%{gst_branch}/libgstmatroska.so
%{_libdir}/gstreamer-%{gst_branch}/libgstmonoscope.so
%{_libdir}/gstreamer-%{gst_branch}/libgstmulaw.so
%{_libdir}/gstreamer-%{gst_branch}/libgstmultifile.so
%{_libdir}/gstreamer-%{gst_branch}/libgstmultipart.so
%{_libdir}/gstreamer-%{gst_branch}/libgstnavigationtest.so
%{_libdir}/gstreamer-%{gst_branch}/libgstoss4audio.so
%{_libdir}/gstreamer-%{gst_branch}/libgstossaudio.so
%{_libdir}/gstreamer-%{gst_branch}/libgstpng.so
%{_libdir}/gstreamer-%{gst_branch}/libgstpulse.so
%{_libdir}/gstreamer-%{gst_branch}/libgstreplaygain.so
%{_libdir}/gstreamer-%{gst_branch}/libgstrtp.so
%{_libdir}/gstreamer-%{gst_branch}/libgstrtpmanager.so
%{_libdir}/gstreamer-%{gst_branch}/libgstrtsp.so
%{_libdir}/gstreamer-%{gst_branch}/libgstshapewipe.so
%{_libdir}/gstreamer-%{gst_branch}/libgstsmpte.so
%{_libdir}/gstreamer-%{gst_branch}/libgstsouphttpsrc.so
%{_libdir}/gstreamer-%{gst_branch}/libgstspectrum.so
%{_libdir}/gstreamer-%{gst_branch}/libgstspeex.so
%{_libdir}/gstreamer-%{gst_branch}/libgsttaglib.so
%{_libdir}/gstreamer-%{gst_branch}/libgstudp.so
%{_libdir}/gstreamer-%{gst_branch}/libgstvideo4linux2.so
%{_libdir}/gstreamer-%{gst_branch}/libgstvideobox.so
%{_libdir}/gstreamer-%{gst_branch}/libgstvideocrop.so
%{_libdir}/gstreamer-%{gst_branch}/libgstvideofilter.so
%{_libdir}/gstreamer-%{gst_branch}/libgstvideomixer.so
%{_libdir}/gstreamer-%{gst_branch}/libgstwavenc.so
%{_libdir}/gstreamer-%{gst_branch}/libgstwavpack.so
%{_libdir}/gstreamer-%{gst_branch}/libgstwavparse.so
%{_libdir}/gstreamer-%{gst_branch}/libgstximagesrc.so
%{_libdir}/gstreamer-%{gst_branch}/libgsty4menc.so

%files -n gstreamer-0_10-plugin-esd
%defattr(-, root, root)
%{_libdir}/gstreamer-%{gst_branch}/libgstesd.so

%if %{build_hal}

%files -n gstreamer-0_10-plugin-hal
%defattr(-, root, root)
%{_libdir}/gstreamer-%{gst_branch}/libgsthalelements.so
%endif

%files lang -f %{_name}-%{gst_branch}.lang

%files doc
%defattr(-, root, root)
%{_datadir}/gtk-doc/html/gst-plugins-good-plugins-%{gst_branch}

%files extra
%defattr(-, root, root)
%{_libdir}/gstreamer-%{gst_branch}/libgst1394.so
%if 0%{?ENABLE_AALIB}
%{_libdir}/gstreamer-%{gst_branch}/libgstaasink.so
%endif
%{_libdir}/gstreamer-%{gst_branch}/libgstcacasink.so
%{_libdir}/gstreamer-%{gst_branch}/libgstdv.so
%{_libdir}/gstreamer-%{gst_branch}/libgstshout2.so

%changelog