%define major 0.8

Summary: GStreamer Streaming-media framework plugins
Summary(ja): GStreamer ストリーミングメディアフレームワーク用プラグイン
Name: gstreamer08-plugins
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

Requires(post): gstreamer08
Requires(post,pre,preun): GConf2
Requires: glib2 >= 2.2.3
Requires: gtk2
Requires: gstreamer08 >= 0.8.10
Requires: aalib
Requires: audiofile >= 0.2.1
Requires: esound >= 0.2.8
Requires: gnome-vfs2 >= 2.4.0
Requires: libjpeg
Requires: libpng
Requires: pango

BuildRequires: GConf2-devel
BuildRequires: glib2-devel >= 2.2.3
BuildRequires: gtk2-devel
BuildRequires: gstreamer08-devel >= 0.8.10
BuildRequires: aalib-devel
BuildRequires: audiofile-devel >= 0.2.1
BuildRequires: cdparanoia-devel >= alpha9.7
BuildRequires: esound-devel >= 0.2.8
BuildRequires: gnome-vfs2-devel >= 2.4.0
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: pango-devel
BuildRequires: alsa-lib-devel
BuildRequires: cairo-devel
#BuildRequires: SDL-devel >= 1.2.0
#BuildRequires: libogg-devel >= 1.0
#BuildRequires: libvorbis-devel >= 1.0
BuildRequires: libX11-devel, libXext-devel
BuildRequires: mesa-libGL-devel, mesa-libGLU-devel
BuildRequires: autoconf, automake, gettext, gcc-c++

Conflicts: gstreamer-plugins-extra-audio < 0.8.8-0vl2
Conflicts: gstreamer-plugins < 0.9

%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 devel
Summary: Libraries/include files for GStreamer plugins.
Summary(ja): GStreamer プラグインの開発用ライブラリ
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: gstreamer08-devel >= 0.8.10

%description devel
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 gst-plugins-%{version}

%build
%ifarch alpha
%define optflags -O2 -mieee -fPIC
%endif
%configure --disable-vorbistest \
  --disable-DEBUG --disable-tests --disable-examples \
  --disable-static --disable-experimental \
%ifnarch %{ix86}
  --disable-qcam \
%else
  --enable-qcam \
%endif
  --disable-vcd \
  --disable-a52dec \
  --disable-avifile \
  --disable-dvdread \
  --disable-dvdnav \
  --disable-lame \
  --disable-arts \
  --disable-artsc \
  --disable-directfb \
  --disable-faad \
  --disable-flac \
  --disable-libdv \
  --disable-libmng \
  --disable-mad \
  --disable-mikmod \
  --disable-musicbrainz \
  --disable-dv1394 \
  --disable-sdl \
  --disable-spc \
  --disable-speex \
  --disable-ogg \
  --disable-theora \
  --disable-vorbis

make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
# to make it easier to package, we only run make install in the subdirs
# that we want to have installed
for d in gst-libs gst sys tools gconf pkgconfig po
do
  cd $d
%makeinstall
  cd ..
done
# now the stuff we want from ext
cd ext

# flac changed API, so removed from the list
for d in aalib alsa audiofile cairo cdparanoia esd gconf \
         gdk_pixbuf gnomevfs jpeg libpng pango snapshot smoothwave  
do
  cd $d
%makeinstall
  cd ..
done

cd ..
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL

# 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}
# these we package somewhere else
rm -f $RPM_BUILD_ROOT%{_libdir}/gstreamer-%{major}/libgstmp1video*
rm -f $RPM_BUILD_ROOT%{_libdir}/gstreamer-%{major}/libgstmpeg*

%find_lang gst-plugins-%{major}

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/ldconfig
/usr/bin/gst-register-%{major} >/dev/null 2>&1 || :
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-install-rule \
    /etc/gconf/schemas/gstreamer-%{major}.schemas > /dev/null

%pre
if [ "$1" -gt 1 ]; then
    export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
    gconftool-2 --makefile-uninstall-rule \
	/etc/gconf/schemas/gstreamer-%{major}.schemas > /dev/null
fi

%preun
if [ "$1" -eq 0 ]; then
    export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
    gconftool-2 --makefile-uninstall-rule \
	/etc/gconf/schemas/gstreamer-%{major}.schemas > /dev/null
fi

%postun
/sbin/ldconfig
DISPLAY= /usr/bin/gst-register-%{major} >/dev/null 2>&1 || :

%files -f gst-plugins-%{major}.lang
%defattr(-, root, root)
%doc AUTHORS ChangeLog COPYING COPYING.LIB README 
%{_sysconfdir}/gconf/schemas/gstreamer-%{major}.schemas
%{_bindir}/*
%{_libdir}/libgst*-%{major}.so.*
%dir %{_libdir}/gstreamer-%{major}
%{_mandir}/man1/*

# plugin helper libraries
%{_libdir}/gstreamer-%{major}/libgstaudio.so
%{_libdir}/gstreamer-%{major}/libgstidct.so
%{_libdir}/gstreamer-%{major}/libgstriff.so
%{_libdir}/gstreamer-%{major}/libgstvideo.so
%{_libdir}/gstreamer-%{major}/libgstxwindowlistener.so

# gstreamer-plugins
%{_libdir}/gstreamer-%{major}/libgstac3parse.so
%{_libdir}/gstreamer-%{major}/libgstadder.so
%{_libdir}/gstreamer-%{major}/libgstalaw.so
%{_libdir}/gstreamer-%{major}/libgstalpha.so
%{_libdir}/gstreamer-%{major}/libgstalphacolor.so
%{_libdir}/gstreamer-%{major}/libgstapetag.so
%{_libdir}/gstreamer-%{major}/libgstasf.so
%{_libdir}/gstreamer-%{major}/libgstaudioconvert.so
%{_libdir}/gstreamer-%{major}/libgstaudiofilter.so
%{_libdir}/gstreamer-%{major}/libgstaudiorate.so
%{_libdir}/gstreamer-%{major}/libgstaudioscale.so
%{_libdir}/gstreamer-%{major}/libgstauparse.so
%{_libdir}/gstreamer-%{major}/libgstautodetect.so
%{_libdir}/gstreamer-%{major}/libgstavi.so
%{_libdir}/gstreamer-%{major}/libgstcdplayer.so
%{_libdir}/gstreamer-%{major}/libgstcdxaparse.so
%{_libdir}/gstreamer-%{major}/libgstchart.so
%{_libdir}/gstreamer-%{major}/libgstcolorspace.so
%{_libdir}/gstreamer-%{major}/libgstcutter.so
%{_libdir}/gstreamer-%{major}/libgstdebug.so
%{_libdir}/gstreamer-%{major}/libgstdecodebin.so
%{_libdir}/gstreamer-%{major}/libgstdeinterlace.so
%{_libdir}/gstreamer-%{major}/libgstdvdlpcmdec.so
%{_libdir}/gstreamer-%{major}/libgstdvdsubdec.so
%{_libdir}/gstreamer-%{major}/libgstefence.so
%{_libdir}/gstreamer-%{major}/libgsteffectv.so
%{_libdir}/gstreamer-%{major}/libgstequalizer.so
%{_libdir}/gstreamer-%{major}/libgstfestival.so
%{_libdir}/gstreamer-%{major}/libgstffmpegcolorspace.so
%{_libdir}/gstreamer-%{major}/libgstfilter.so
%{_libdir}/gstreamer-%{major}/libgstflxdec.so
%{_libdir}/gstreamer-%{major}/libgstfreeze.so
%{_libdir}/gstreamer-%{major}/libgstgamma.so
%{_libdir}/gstreamer-%{major}/libgstglimagesink.so
%{_libdir}/gstreamer-%{major}/libgstgoom.so
%{_libdir}/gstreamer-%{major}/libgstimagemixer.so
%{_libdir}/gstreamer-%{major}/libgstinterleave.so
%{_libdir}/gstreamer-%{major}/libgstlevel.so
%{_libdir}/gstreamer-%{major}/libgstmatroska.so
%{_libdir}/gstreamer-%{major}/libgstmedian.so
%{_libdir}/gstreamer-%{major}/libgstmixmatrix.so
%{_libdir}/gstreamer-%{major}/libgstmodplug.so
%{_libdir}/gstreamer-%{major}/libgstmonoscope.so
%{_libdir}/gstreamer-%{major}/libgstmulaw.so
%{_libdir}/gstreamer-%{major}/libgstmultifilesink.so
%{_libdir}/gstreamer-%{major}/libgstmultipart.so
%{_libdir}/gstreamer-%{major}/libgstnavigationtest.so
%{_libdir}/gstreamer-%{major}/libgstossaudio.so
%{_libdir}/gstreamer-%{major}/libgstoverlay.so
%{_libdir}/gstreamer-%{major}/libgstpassthrough.so
%{_libdir}/gstreamer-%{major}/libgstplaybin.so
%{_libdir}/gstreamer-%{major}/libgstplayondemand.so
%{_libdir}/gstreamer-%{major}/libgstpuzzle.so
%ifarch %{ix86}
%{_libdir}/gstreamer-%{major}/libgstqcam.so
%endif
%{_libdir}/gstreamer-%{major}/libgstqtdemux.so
%{_libdir}/gstreamer-%{major}/libgstresample.so
%{_libdir}/gstreamer-%{major}/libgstrfbsrc.so
%{_libdir}/gstreamer-%{major}/libgstrmdemux.so
%{_libdir}/gstreamer-%{major}/libgstrtjpeg.so
%{_libdir}/gstreamer-%{major}/libgstrtp.so
%{_libdir}/gstreamer-%{major}/libgstsilence.so
%{_libdir}/gstreamer-%{major}/libgstsinesrc.so
%{_libdir}/gstreamer-%{major}/libgstsmooth.so
%{_libdir}/gstreamer-%{major}/libgstsmpte.so
%{_libdir}/gstreamer-%{major}/libgstspectrum.so
%{_libdir}/gstreamer-%{major}/libgstspeed.so
#%{_libdir}/gstreamer-%{major}/libgstspeex.so
%{_libdir}/gstreamer-%{major}/libgststereo.so
%{_libdir}/gstreamer-%{major}/libgstsubparse.so
%{_libdir}/gstreamer-%{major}/libgstswitch.so
%{_libdir}/gstreamer-%{major}/libgstsynaesthesia.so
%{_libdir}/gstreamer-%{major}/libgsttagedit.so
%{_libdir}/gstreamer-%{major}/libgsttcp.so
%{_libdir}/gstreamer-%{major}/libgsttextoverlay.so
%{_libdir}/gstreamer-%{major}/libgsttimeoverlay.so
%{_libdir}/gstreamer-%{major}/libgsttta.so
%{_libdir}/gstreamer-%{major}/libgsttypefindfunctions.so
%{_libdir}/gstreamer-%{major}/libgstudp.so
%{_libdir}/gstreamer-%{major}/libgstvbidec.so
#%{_libdir}/gstreamer-%{major}/libgstvcdsrc.so
%{_libdir}/gstreamer-%{major}/libgstvideobalance.so
%{_libdir}/gstreamer-%{major}/libgstvideobox.so
%{_libdir}/gstreamer-%{major}/libgstvideocrop.so
%{_libdir}/gstreamer-%{major}/libgstvideodrop.so
%{_libdir}/gstreamer-%{major}/libgstvideofilter.so
%{_libdir}/gstreamer-%{major}/libgstvideoflip.so
%{_libdir}/gstreamer-%{major}/libgstvideomixer.so
%{_libdir}/gstreamer-%{major}/libgstvideorate.so
%{_libdir}/gstreamer-%{major}/libgstvideoscale.so
%{_libdir}/gstreamer-%{major}/libgstvideotestsrc.so
%{_libdir}/gstreamer-%{major}/libgstvolenv.so
%{_libdir}/gstreamer-%{major}/libgstvolume.so
%{_libdir}/gstreamer-%{major}/libgstwavenc.so
%{_libdir}/gstreamer-%{major}/libgstwavparse.so
%{_libdir}/gstreamer-%{major}/libgsty4menc.so

# gstreamer-plugins with external dependencies but in the main package
%{_libdir}/gstreamer-%{major}/libgstaasink.so
%{_libdir}/gstreamer-%{major}/libgstalsa.so
%{_libdir}/gstreamer-%{major}/libgstaudiofile.so
%{_libdir}/gstreamer-%{major}/libgstcairo.so
%{_libdir}/gstreamer-%{major}/libgstcdparanoia.so
%{_libdir}/gstreamer-%{major}/libgstesd.so
%{_libdir}/gstreamer-%{major}/libgstgconfelements.so
%{_libdir}/gstreamer-%{major}/libgstgdkpixbuf.so
%{_libdir}/gstreamer-%{major}/libgstgnomevfs.so
%{_libdir}/gstreamer-%{major}/libgstjpeg.so
%{_libdir}/gstreamer-%{major}/libgstpng.so
%{_libdir}/gstreamer-%{major}/libgstsmoothwave.so
%{_libdir}/gstreamer-%{major}/libgstsnapshot.so
%{_libdir}/gstreamer-%{major}/libgstvideo4linux.so
%{_libdir}/gstreamer-%{major}/libgstvideo4linuxradio.so
%ifnarch ppc
%{_libdir}/gstreamer-%{major}/libgstvideo4linux2.so
%endif
%{_libdir}/gstreamer-%{major}/libgstximagesink.so
%{_libdir}/gstreamer-%{major}/libgstxvimagesink.so

%files devel
%defattr(-, root, root)
%{_includedir}/gstreamer-%{major}/gst/*
%{_libdir}/pkgconfig/*.pc
%{_libdir}/libgst*-%{major}.so

%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

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

* Mon Jan 16 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 0.8.11-0vl4
- build for compatibility (gstreamer-plugins->gstreamer08-plugins)
- s/majorminor/major/

* Mon Dec 12 2005 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 0.8.11-0vl3
- remove duplicated libgst{idct,qtdemux,xwindowlistener}.so

* Thu Oct 13 2005 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 0.8.11-0vl2
- added missing alsa plugin

* Thu Sep 22 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.8.11-0vl1
- new upstream release
- added alsa and cairo plugins

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

* Mon Jun  6 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.8.9-0vl1
- new upstream release

* Wed May 11 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.8.8-0vl5
- added Conflicts: gstreamer-plugins-extra-audio < 0.8.8-0vl2

* Sun May  8 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.8.8-0vl4
- added libgstcdparania.so for gnome-cd (gnome-media)
- BuildRequires: cdparanoia-devel

* Wed Mar 30 2005 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 0.8.8-0vl3
- drop BuildRequires: xmms-devel, Requires: xmms

* Tue Mar 29 2005 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.8.8-0vl2
- libgstvideo4linux2.so temoporally omitted for ppc
  (will be back later, I hope)

* Sun Mar 13 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.8.8-0vl1
- new upstream release
- s/Copyright/License/
- includes plugins depend on main package libraries only

* Wed Nov 10 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8.5-0vl1
- new upstream release

* Tue Dec 09 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.6.4-0vl1
- new upstream release

* Tue Jun 10 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.6.2-0vl1
- new upstream release

* Sat Feb 22 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.6.0-0vl1
- new upstream release

* Sat Feb 01 2003 Tomoya TAKA <taka@vinelinux.org> 0.5.2-0vl3
- build with -fPIC on alpha

* Fri Jan 24 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.5.2-0vl2
- modified scripts

* Fri Jan 24 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.5.2-0vl1
- new upstream release

* Sun Jan 19 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.5.1-0vl2
- disable some plugins.

* Sun Jan 19 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.5.1-0vl1
- new upstream release
- initial build for Vine Linux

* Thu Dec 19 2002 Elliot Lee <sopwith@redhat.com> 0.5.0-15
- Include ia64
- Add BuildRequires: autoconf automake

* Wed Dec 18 2002 Jonathan Blandford <jrb@redhat.com>
- rebuild

* Tue Dec 17 2002 Jonathan Blandford <jrb@redhat.com> 0.5.0-12
- rebuild

* Mon Dec 16 2002 Jonathan Blandford <jrb@redhat.com> 0.5.0-10
- rebuild
- disable tests

* Mon Dec 16 2002 Tim Powers <timp@redhat.com> 0.5.0-9
- rebuild

* Wed Dec 11 2002 Jonathan Blandford <jrb@redhat.com> 0.5.0-7
- fix libdir for ia64.

* Wed Dec 11 2002 Jonathan Blandford <jrb@redhat.com> 0.5.0-3
- ExcludeArch: ia64.   Random assembler errors that I have no hope of fixing
- Add devel package

* Wed Dec 11 2002 Jonathan Blandford <jrb@redhat.com> 0.5.0-1
- 0.5.0
- apparently, festival-devel isn't needed.

* Tue Dec 10 2002 Tim Powers <timp@redhat.com> 0.4.2-3
- rebuild to fix broken dep on libgstreamer-0.4.2.so.0

* Tue Dec  3 2002 Havoc Pennington <hp@redhat.com>
- excludearch the arches that can't build gstreamer cothreads
- well it isn't really SMP-safe
- add patch for including pthread.h when required
- prereq gconftool
- fix typo that broke schema installation in post

* Mon Dec  2 2002 Havoc Pennington <hp@redhat.com>
- initial "official" import
- munge tarball for legal cleanliness

* Thu Nov  7 2002 Jeremy Katz <katzj@redhat.com>
- 0.4.2

* Mon Sep 23 2002 Jeremy Katz <katzj@redhat.com>
- 0.4.1
- install the gconf schema
- use %%configure

* Sun Sep 22 2002 Jeremy Katz <katzj@redhat.com>
- update to 0.4.0
- give explicit vorbis include path, don't run vorbis test

* Sun Aug 11 2002 Jeremy Katz <katzj@redhat.com>
- collapse into one package to preserve some sanity

* Wed Mar 13 2002 Thomas Vander Stichele <thomas@apestaart.org>
- added more BuildRequires and Requires
- rearranged some plugins
- added changelog ;)
