%define major 0.8

Summary: GStreamer extra streaming media framework plugins.
Summary(ja): GStreamer ストリーミングメディアフレームワーク 追加プラグイン
Name: gstreamer08-plugins-extra
Version: 0.8.12
Release: 1%{?_dist_release}
License: LGPL
Group: 	 System Environment/Libraries
URL:	 http://gstreamer.freedesktop.org/
Source:  http://gstreamer.freedesktop.org/src/gst-plugins/gst-plugins-%{version}.tar.bz2

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: GConf2-devel
BuildRequires: glib2-devel >= 2.2.3
BuildRequires: gstreamer08-devel >= 0.8.10
BuildRequires: gstreamer08-plugins-devel
BuildRequires: autoconf, automake, gettext, gcc-c++

%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 provides extra plugins currently hosted on http://rpm.livna.org/

%package audio
Summary: extra audio plugins for GStreamer.
Summary(ja): GStreamer の追加オーディオプラグイン.
Group: System Environment/Libraries

#BuildRequires: alsa-lib-devel
BuildRequires: arts-devel
#BuildRequires: cdparanoia-devel >= alpha9.7
BuildRequires: self-build-faad2
#BuildRequires: flac-devel
BuildRequires: libid3tag-devel >= 0.15.0
BuildRequires: libogg-devel >= 1.0
BuildRequires: self-build-libmad
BuildRequires: mikmod-devel
BuildRequires: libmusicbrainz-devel
BuildRequires: speex-devel
BuildRequires: libtheora-devel
BuildRequires: libvorbis-devel >= 1.0
#BuildRequires: gsm-devel >= 1.0.10
#BuildRequires:	lame-devel >= 3.89
#BuildRequires:	libmms-devel

Requires: gstreamer08 >= 0.8.10
Requires: gstreamer08-plugins >= %{version}
PreReq:   gstreamer08
PreReq:   self-build-faad2
PreReq:   self-build-libmad

#Provides: gstreamer-alsa = %{version}-%{release}
Provides: gstreamer-arts = %{version}-%{release}
#Provides: gstreamer-cdparanoia = %{version}-%{release}
Provides: gstreamer-faad = %{version}-%{release}
#Provides: gstreamer-flac = %{version}-%{release}
Provides: gstreamer-mad = %{version}-%{release}
Provides: gstreamer-mikmod = %{version}-%{release}
Provides: gstreamer-musicbrainz = %{version}-%{release}
Provides: gstreamer-ogg = %{version}-%{release}
Provides: gstreamer-speex = %{version}-%{release}
Provides: gstreamer-theora = %{version}-%{release}
Provides: gstreamer-vorbis = %{version}-%{release}
Conflicts: gstreamer-plugins-extra-audio < 0.9

%description audio
This package contains extra audio plugins for GStreamer, including
- alsa
- arts, artsd
#- flac de/encoding
- faad AAC decoder
- mad mp3 decoding
- mikmod plug-in
- musicbrainz
- ogg de/encoding
- ogg theora codec
- speex
- vorbis 

%post audio
%{_bindir}/gst-register-%{major} >/dev/null 2>&1 || :

%postun audio
%{_bindir}/gst-register-%{major} >/dev/null 2>&1 || :

%files audio
%defattr(-, root, root, -)
#%{_libdir}/gstreamer-%{major}/libgstalsa.so
%{_libdir}/gstreamer-%{major}/libgstarts.so
%{_libdir}/gstreamer-%{major}/libgstartsdsink.so
%{_libdir}/gstreamer-%{major}/libgstfaad.so
#{_libdir}/gstreamer-%{major}/libgstflac.so
%{_libdir}/gstreamer-%{major}/libgstmad.so
%{_libdir}/gstreamer-%{major}/libgstmikmod.so
%{_libdir}/gstreamer-%{major}/libgstogg.so
%{_libdir}/gstreamer-%{major}/libgstspeex.so
%{_libdir}/gstreamer-%{major}/libgsttheora.so
%{_libdir}/gstreamer-%{major}/libgsttrm.so
%{_libdir}/gstreamer-%{major}/libgstvorbis.so

#%package dvd
#Summary: 	DVD plugins for GStreamer.
#Group: 		Applications/Multimedia

#BuildRequires:	a52dec-devel >= 0.7.3
#BuildRequires:	libdvdnav-devel >= 0.1.3
#BuildRequires:	libdvdread-devel >= 0.9.0

#Requires:	%{gstreamer}-plugins >= %{gstp_minver}
#Requires:	%{gstreamer}-plugins-extra-video >= %{gstp_minver}
#Requires(pre):	%{_bindir}/gst-register-%{majorminor}
#Requires(post):	%{_bindir}/gst-register-%{majorminor}

#Provides: gstreamer-dvd = %{version}-%{release}
#Provides: gstreamer-a52dec = %{version}-%{release}
#Provides: gstreamer-dvdnavsrc = %{version}-%{release}
#Provides: gstreamer-dvdreadsrc = %{version}-%{release}

#%description dvd
#This package contains dvd plugins for GStreamer, including
#- libdvdnav
#- libdvdread
#- a52 decoding

#%post dvd
#%{register}
#%postun dvd
#%{register}

#%files dvd
#%defattr(-, root, root, -)
#%{_libdir}/gstreamer-%{majorminor}/libgsta52dec.so
#%{_libdir}/gstreamer-%{majorminor}/libgstdvdnavsrc.so
#%{_libdir}/gstreamer-%{majorminor}/libgstdvdreadsrc.so

%package video
Summary: extra video plugins for GStreamer.
Summary(ja): GStreamer の追加ビデオプラグイン.
Group: System Environment/Libraries

BuildRequires: SDL-devel >= 1.2.0
#BuildRequires: cairo-devel
BuildRequires: libdirectfb-devel
BuildRequires: libmng-devel
BuildRequires: libdv-devel
BuildRequires: libavc1394-devel libraw1394-devel
#BuildRequires: xine-lib-devel
BuildRequires:	libfame-devel >= 0.9.1
#BuildRequires:	mpeg2dec-devel >= 0.4.0
#BuildRequires:	swfdec-devel >= 0.3.2

Requires: gstreamer08 >= 0.8.10
Requires: gstreamer08-plugins >= %{version}
PreReq:   gstreamer08

#Provides: gstreamer-cairo = %{version}-%{release}
Provides: gstreamer-directfb = %{version}-%{release}
Provides: gstreamer-dv = %{version}-%{release}
Provides: gstreamer-fame = %{version}-%{release}
Provides: gstreamer-mng = %{version}-%{release}
Provides: gstreamer-raw1394 = %{version}-%{release}
Provides: gstreamer-sdl = %{version}-%{release}
Provides: gstreamer-swf = %{version}-%{release}
#Provides: gstreamer-xine = %{version}-%{release}
Conflicts: gstreamer-plugins-extra-video < 0.9

%description video
This package contains extra video plugins for GStreamer, including
#- cairo plug-in
- directfb
- libdv DV/video decoding
- libmng 
- raw1394
- SDL plug-in
- libfame MPEG video encoding
#- mpeg2dec MPEG-2 decoding
#- swfdec Flash decoding

%post video
%{_bindir}/gst-register-%{major} >/dev/null 2>&1 || :

%postun video
%{_bindir}/gst-register-%{major} >/dev/null 2>&1 || :

%files video
%defattr(-, root, root, -)
%{_libdir}/gstreamer-%{major}/libgst1394.so
#%{_libdir}/gstreamer-%{major}/libgstcairo.so
%{_libdir}/gstreamer-%{major}/libgstdirectfbvideosink.so
%{_libdir}/gstreamer-%{major}/libgstdvdec.so
%{_libdir}/gstreamer-%{major}/libgstlibfame.so
%{_libdir}/gstreamer-%{major}/libgstmng.so
%{_libdir}/gstreamer-%{major}/libgstmp1videoparse.so
%{_libdir}/gstreamer-%{major}/libgstmpeg1systemencode.so
%{_libdir}/gstreamer-%{major}/libgstmpeg2subt.so
%{_libdir}/gstreamer-%{major}/libgstmpegaudio.so
%{_libdir}/gstreamer-%{major}/libgstmpegaudioparse.so
%{_libdir}/gstreamer-%{major}/libgstmpegstream.so
%{_libdir}/gstreamer-%{major}/libgstsdlvideosink.so
#%{_libdir}/gstreamer-%{major}/libgstxine.so

%prep
%setup -q -n gst-plugins-%{version}

%build
%configure \
  --with-package-name='gstreamer Vine Linux rpm' \
  --with-plugins=mpeg1sys,mpeg1videoparse,mpeg2sub,mpegaudio,mpegaudioparse,mpegstream \
  --enable-DEBUG --disable-tests --disable-examples \
  --disable-alsa --disable-cdparanoia --disable-spc \
  --disable-flac

make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT

# we're better off manually installing the plugins we want to package

cd gst
for p in mpeg1sys mpeg1videoparse mpeg2sub mpegaudio mpegaudioparse mpegstream
do
  cd $p
  %makeinstall
  cd ..
done
cd ..

cd ext
#for p in a52dec dvdnav dvdread faad gsm lame libfame libmms mad mpeg2dec swfdec
#for p in alsa arts artsd cairo directfb dv faad flac libmng \
for p in arts artsd directfb dv faad libfame libmng mad \
         mikmod musicbrainz ogg raw1394 sdl speex theora vorbis
do
  cd $p
  %makeinstall
  cd ..
done
cd ..

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

%clean
rm -rf $RPM_BUILD_ROOT

%changelog
* Tue May  5 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.8.12-1
- updated to 0.8.12
- applied new versioning policy, spec in UTF-8
- removed flac plugin (unable to build...)

* Fri Jan 20 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 0.8.11-0vl4
- add Conflicts: gstreamer-plugins-extra-audio/video < 0.9

* Mon Jan 16 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 0.8.11-0vl3
- build for compatibility
  - gstreamer-plugins-extra->gstreamer08-plugins-extra)

* Mon Sep 26 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.8.11-0vl2
- dropped xine plugin
- added libfame plugin

* Fri Sep 23 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.8.11-0vl1
- new upstream release
- not include alsa plugin (moved to main package)
- include speex plugin and xine plugin

* Sun Jul 10 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.8.10-0vl2
- not include cairo plugin (cairo version is not match)

* Sun Jul 10 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.8.10-0vl1
- new upstream release
- rebuild with cairo-0.5.1

* Sat Jun 11 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.8.9-0vl2
- rebuild with libraw1394-1.1.0, libdv-0.104

* Tue Jun  7 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.8.9-0vl1
- new upstream relase
- added alsa, faad, speex plugin

* Sun May  8 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.8.8-0vl2
- moved libgstcdparanoia.so to gstreamer-plugins
- added mikmod plugin

* Sun Mar 13 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.8.8-0vl1
- rebuild for Vine Linux
- to use VineSeed Plus packages

* Mon Mar 07 2005 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.8.8-0.lvn.1
- new release

* Thu Mar 03 2005 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.8.7.2-0.lvn.1
- new prerelease

* Wed Jan 05 2005 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.8.7-0.lvn.1
- added libmms
- new release

* Fri Dec 31 2004 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.8.6.2-0.lvn.1
- new prerelease

* Thu Nov 25 2004 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.8.6-0.lvn.1
- new release

* Mon Nov 15 2004 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.8.5.3-0.lvn.1
- new prerelease

* Wed Oct 06 2004 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.8.5-0.lvn.1: new release
- added GConf2 requirement to pass configure

* Tue Aug 31 2004 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.8.4-0.lvn.1: new release

* Fri Aug 27 2004 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.8.3.2-0.lvn.1: new prerelease

* Mon Aug 02 2004 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.8.3-0.lvn.1: new source release

* Fri Jul 30 2004 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.8.2.2-0.lvn.1: new prerelease

* Wed Jun 23 2004 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.8.2-0.lvn.1: new source release

* Fri Jun 18 2004 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.8.1.2-0.lvn.1: new source prerelease

* Thu Apr 15 2004 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.8.1-0.lvn.1: new source release

* Tue Mar 16 2004 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.8.0-0.lvn.1: new source release, change base name to gstreamer

* Tue Mar 09 2004 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.7.6-0.lvn.1: new source release

* Fri Mar 05 2004 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.7.5-0.lvn.2: sync with FreshRPMS

* Tue Mar 02 2004 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.7.5-0.lvn.1: First package for rpm.livna.org
