%define major 1.0

%define _gst_ver	1.6.1
%define _gstpb_ver	1.6.1
%define _glib2_ver	2.38.0
%define _gtk3_ver	3.10.0
%define _gtk_doc_ver	1.3
%define _check_ver	0.9.2
%define _python_ver	2.7
%define _cairo_ver	1.0.0
%define _flac_ver	1.2.0
%define _libdv_ver	0.100
%define _libpng_ver	1.2.0
%define _speex_ver	1.1.5
%define _taglib_ver	1.5
%define _dbus_ver	1.0
%define _soup_ver	2.26.0
%define _pulse_ver	0.9.20

%define po_package	gst-plugins-good-%{major}

Name:		gstreamer1-plugins-good
Summary:	GStreamer Streaming-media framework good plugins
Summary(ja):	GStreamer ストリーミングメディアフレームワーク用優良プラグイン
Version:	1.6.1
Release:	1%{?_dist_release}

License:	LGPL
Group:		System Environment/Libraries
URL:		http://gstreamer.freedesktop.org/
Source:		http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-%{version}.tar.xz

BuildRoot:	%{_tmppath}/%{name}-%{version}-root
BuildRequires:	gstreamer1-devel >= %{_gst_ver}
BuildRequires:	gstreamer1-plugins-base-devel >= %{_gstpb_ver}
BuildRequires:	gtk-doc >= %{_gtk_doc_ver}
BuildRequires:	python >= %{_python_ver}, python-pyxml
BuildRequires:	glib2-devel >= %{_glib2_ver}
BuildRequires:	check-devel >= %{_check_ver}
BuildRequires:	gtk3-devel >= %{_gtk3_ver}
BuildRequires:	aalib-devel
BuildRequires:	cairo-devel >= %{_cairo_ver}
BuildRequires:	flac-devel >= %{_flac_ver}
BuildRequires:	libjpeg-devel
BuildRequires:	libdv-devel >= %{_libdv_ver}
BuildRequires:	libpng >= %{_libpng_ver}
BuildRequires:	libavc1394-devel libraw1394-devel libiec61883-devel
BuildRequires:	speex-devel >= %{_speex_ver}
BuildRequires:	zlib-devel
BuildRequires:	taglib-devel >= %{_taglib_ver}
BuildRequires:	dbus-devel >= %{_dbus_ver}
BuildRequires:	libsoup-devel >= %{_soup_ver}
BuildRequires:  pulseaudio-libs-devel >= %{_pulse_ver}
BuildRequires:  orc-devel
BuildRequires:  libgudev1-devel
BuildRequires:  libv4l-devel
BuildRequires:  libvpx-devel
BuildRequires:  libSM-devel
BuildRequires:  libXext-devel
BuildRequires:  libXv-devel
BuildRequires:  bzip2-devel
BuildRequires:  jack-audio-connection-kit-devel
BuildRequires:  libuuid-devel

Requires:	gstreamer1 >= %{_gst_ver}
Requires:	gstreamer1-plugins-base >= %{_gstpb_ver}
#Requires:	cairo >= %{_cairo_ver}
#Requires:	libjpeg
#Requires:	libpng >= %{_libpng_ver}
#Requires:	taglib >= %{_taglib_ver}
#Requires:	dbus >= %{_dbus_ver}

Vendor:		Project Vine
Distribution:	Vine Linux
Packager:       Takemikaduchi

%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.

This package contains a set of well-supported plugins of good quality and
under the LGPL license.

%package flac
Summary:	GStreamer plugin for de/encoding FLAC files
Summary(ja):	GStreamer FLAC ファイルデコード/エンコードプラグイン
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	flac >= %{_flac_ver}

%description flac
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 GStreamer plugin for de/encoding FLAC files.

%package speex
Summary:	GStreamer plugin for de/encoding Speex files
Summary(ja):	GStreamer Speex ファイルデコード/エンコードプラグイン
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	speex >= %{_speex_ver}

%description speex
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 GStreamer plugin for de/encoding Speex files.

%package dv
Summary:	GStreamer DV plugin
Summary(ja):	GStreamer DV プラグイン
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	libdv >= %{_libdv_ver}

%description dv
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 GStreamer plugin for digital video support using
libdv.

%package raw1394
Summary:	GStreamer raw1394 FireWire plugin
Summary(ja):	GStreamer raw1394 FireWire プラグイン
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	libavc1394, libraw1394, libiec61883

%description raw1394
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 GStreamer plugin for digital video support using
raw1394.

%package aa
Summary:	GStreamer plugin for Ascii-art output
Summary(ja):	GStreamer アスキーアート出力プラグイン
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	aalib

%description aa
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 GStreamer plugin for viewing movies in Ascii-art
using aalib.

%package doc
Summary:	Documentation files for GStreamer good plugins.
Summary(ja):	GStreamer 優良プラグインのドキュメント
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}
BuildArch:	noarch

%description doc
This package contains documentation for GStreamer good plugins.
files.

%prep
%setup -q -n gst-plugins-good-%{version}
sed -i 's/GT_REQ/GTK_REQ/g' configure
sed -i 's/$with_gtk/3.0/g' configure

%build
%ifarch alpha
%define optflags -O2 -mieee -fPIC
%endif

%configure \
	-with-package-name='Vine Linux gstreamer-plugins-good package' \
	--enable-nls \
	--disable-libcaca \
	--disable-shout2 \
	--enable-gtk-doc --disable-debug 
make %{?_smp_mflags}

%install
[ -n $RPM_BUILD_ROOT -a $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

# Clean out files that should not be part of the rpm.
rm -f $RPM_BUILD_ROOT%{_libdir}/gstreamer-%{major}/*.{a,la}
rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la}

%find_lang %{po_package}

%clean
[ -n $RPM_BUILD_ROOT -a $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT


%files -f %{po_package}.lang
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README RELEASE REQUIREMENTS
%dir %{_datadir}/gstreamer-%{major}/presets
%{_datadir}/gstreamer-%{major}/presets/*

# base plugins without external dependencies
%{_libdir}/gstreamer-%{major}/libgstalaw.so
%{_libdir}/gstreamer-%{major}/libgstalpha.so
%{_libdir}/gstreamer-%{major}/libgstalphacolor.so
%{_libdir}/gstreamer-%{major}/libgstapetag.so
%{_libdir}/gstreamer-%{major}/libgstaudiofx.so
%{_libdir}/gstreamer-%{major}/libgstaudioparsers.so
%{_libdir}/gstreamer-%{major}/libgstauparse.so
%{_libdir}/gstreamer-%{major}/libgstautodetect.so
%{_libdir}/gstreamer-%{major}/libgstavi.so
%{_libdir}/gstreamer-%{major}/libgstcutter.so
%{_libdir}/gstreamer-%{major}/libgstdebug.so
%{_libdir}/gstreamer-%{major}/libgstdeinterlace.so
%{_libdir}/gstreamer-%{major}/libgstdtmf.so
%{_libdir}/gstreamer-%{major}/libgsteffectv.so
%{_libdir}/gstreamer-%{major}/libgstequalizer.so
%{_libdir}/gstreamer-%{major}/libgstflv.so
%{_libdir}/gstreamer-%{major}/libgstflxdec.so
%{_libdir}/gstreamer-%{major}/libgstgoom.so
%{_libdir}/gstreamer-%{major}/libgstgoom2k1.so
%{_libdir}/gstreamer-%{major}/libgsticydemux.so
%{_libdir}/gstreamer-%{major}/libgstid3demux.so
%{_libdir}/gstreamer-%{major}/libgstimagefreeze.so
%{_libdir}/gstreamer-%{major}/libgstinterleave.so
%{_libdir}/gstreamer-%{major}/libgstisomp4.so
%{_libdir}/gstreamer-%{major}/libgstjack.so
%{_libdir}/gstreamer-%{major}/libgstlevel.so
%{_libdir}/gstreamer-%{major}/libgstmatroska.so
%{_libdir}/gstreamer-%{major}/libgstmulaw.so
%{_libdir}/gstreamer-%{major}/libgstmultifile.so
%{_libdir}/gstreamer-%{major}/libgstmultipart.so
%{_libdir}/gstreamer-%{major}/libgstnavigationtest.so
%{_libdir}/gstreamer-%{major}/libgstoss4audio.so
%{_libdir}/gstreamer-%{major}/libgstossaudio.so
%{_libdir}/gstreamer-%{major}/libgstreplaygain.so
%{_libdir}/gstreamer-%{major}/libgstrtp.so
%{_libdir}/gstreamer-%{major}/libgstrtpmanager.so
%{_libdir}/gstreamer-%{major}/libgstrtsp.so
%{_libdir}/gstreamer-%{major}/libgstshapewipe.so
%{_libdir}/gstreamer-%{major}/libgstsmpte.so
%{_libdir}/gstreamer-%{major}/libgstspectrum.so
%{_libdir}/gstreamer-%{major}/libgstudp.so
%{_libdir}/gstreamer-%{major}/libgstvideo4linux2.so
%{_libdir}/gstreamer-%{major}/libgstvideobox.so
%{_libdir}/gstreamer-%{major}/libgstvideocrop.so
%{_libdir}/gstreamer-%{major}/libgstvideofilter.so
%{_libdir}/gstreamer-%{major}/libgstvideomixer.so
%{_libdir}/gstreamer-%{major}/libgstvpx.so
%{_libdir}/gstreamer-%{major}/libgstwavenc.so
%{_libdir}/gstreamer-%{major}/libgstwavparse.so
%{_libdir}/gstreamer-%{major}/libgstximagesrc.so
%{_libdir}/gstreamer-%{major}/libgsty4menc.so

# base plugins with external dependencies, but in the main package
%{_libdir}/gstreamer-%{major}/libgstcairo.so
%{_libdir}/gstreamer-%{major}/libgstgdkpixbuf.so
%{_libdir}/gstreamer-%{major}/libgstjpeg.so
%{_libdir}/gstreamer-%{major}/libgstpng.so
%{_libdir}/gstreamer-%{major}/libgstsouphttpsrc.so
%{_libdir}/gstreamer-%{major}/libgsttaglib.so
%{_libdir}/gstreamer-%{major}/libgstpulse.so

%files flac
%defattr(-,root,root)
%{_libdir}/gstreamer-%{major}/libgstflac.so

%files speex
%defattr(-,root,root)
%{_libdir}/gstreamer-%{major}/libgstspeex.so

%files dv
%defattr(-,root,root)
%{_libdir}/gstreamer-%{major}/libgstdv.so

%files raw1394
%defattr(-,root,root)
%{_libdir}/gstreamer-%{major}/libgst1394.so

%files aa
%defattr(-,root,root)
%{_libdir}/gstreamer-%{major}/libgstaasink.so

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

%changelog
* Sat Oct 31 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.1-1
- new upstream release

* Sun Mar 01 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.5-1
- new upstream release

* Mon Nov 17 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.4-1
- new upstream release

* Sun Oct 26 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.3-1
- new upstream release
- add BuildRequires: libuuid-devel

* Thu Jul 17 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.2.4-2
- rebuild with libpng-1.6.12

* Sat Apr 19 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.2.4-1
- new upstream release

* Sun Mar 16 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.2.3-1
- new upstream release

* Mon Dec 30 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.2.2-1
- new upstream release

* Sun Nov 24 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.2.1-1
- new upstream release

* Sat Oct 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.2.0-1
- new upstream release

* Sat Aug 31 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.10-1
- new upstream release

* Sun Aug 11 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.9-1
- new upstream release

* Mon Jul 15 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.8-1
- new upstream release

* Sun Apr 28 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.7-1
- new upstream release

* Sat Mar 23 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.6-1
- new upstream release

* Wed Jan 09 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.5-1
- new upstream release

* Wed Jan 02 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.4-1
- new upstream release

* Fri Oct 26 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.2-1
- new upstream release

* Sat Oct 20 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.1-2
- rebuild with libraw1394-2.1.0

* Mon Oct 08 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.1-1
- new upstream release
- add BuildRequires: libvpx-devel

* Fri Sep 28 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.0-1
- initial build

