%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}

%define major 0.10

%define _gst_ver	0.10.36
%define _glib2_ver	2.28.8
%define _gtk3_ver	3.0.0
%define _gtk_doc_ver	1.3
%define _qt4_ver	4.6
%define _check_ver	0.9.2
%define _python_ver	2.6
%define _alsa_lib_ver	0.9.1
%define _libogg_ver	1.0
%define _libvorbis_ver	1.0
%define _freetype2_ver	2.0.9

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

Summary:	GStreamer Streaming-media framework base plugins
Summary(ja):	GStreamer ストリーミングメディアフレームワーク用基本プラグイン
Name:		gstreamer-plugins-base
Version:	0.10.36
Release:	3%{?_dist_release}
License:	LGPL
Group:		System Environment/Libraries
URL:		http://gstreamer.freedesktop.org/
Source:		http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-%{version}.tar.xz
BuildRoot:	%{_tmppath}/%{name}-%{version}-root

Requires:	gstreamer >= %{_gst_ver}
Requires:	glib2 >= %{_glib2_ver}
Requires:	alsa-lib >= %{_alsa_lib_ver}
Requires:	pango
Requires:	gnome-vfs2
Requires:	libogg >= %{_libogg_ver}
Requires:	libvorbis, libtheora >= %{_libvorbis_ver}

BuildRequires:	gstreamer-devel >= %{_gst_ver}
BuildRequires:	gtk-doc >= %{_gtk_doc_ver}
BuildRequires:	python >= %{_python_ver}, python-pyxml
BuildRequires:	glib2-devel >= %{_glib2_ver}
BuildRequires:	check >= %{_check_ver}
BuildRequires:	gtk3-devel >= %{_gtk3_ver}
BuildRequires:	qt4-devel >= %{_qt4_ver}
BuildRequires:	alsa-lib-devel >= %{_alsa_lib_ver}
BuildRequires:	cdparanoia-devel
BuildRequires:	gnome-vfs2-devel
BuildRequires:	libogg-devel >= %{_libogg_ver}
BuildRequires:	libtheora-devel, libvorbis-devel >= %{_libvorbis_ver}
BuildRequires:	pango-devel
BuildRequires:	freetype2-devel >= %{_freetype2_ver}
BuildRequires:  fontconfig-devel
BuildRequires:  libX11-devel
BuildRequires:  libXv-devel
BuildRequires:  libvisual-devel
BuildRequires:  orc-devel
BuildRequires:  libgudev1-devel
BuildRequires:  gobject-introspection-devel

Obsoletes:	%{name}-gnomevfs < 0.10.5
Obsoletes:	%{name}-ogg < 0.10.5

Vendor:		Project Vine
Distribution:	Vine Linux
Packager:       inagaki, 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-maintained base plugins.

%package devel
Summary:	Libraries/include files for GStreamer base plugins
Summary(ja):	GStreamer 基本プラグインの開発用ライブラリ
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	gstreamer-devel >= %{_gst_ver}

%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 GStreamer base plugins library depvelopment and header
files.

# compat32
%package -n compat32-%{name}
Summary:	GStreamer Streaming-media framework base plugins
Summary(ja):	GStreamer ストリーミングメディアフレームワーク用基本プラグイン
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}

%description -n compat32-%{name}
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-maintained base plugins.

%package -n compat32-%{name}-devel
Summary:	Libraries/include files for GStreamer base plugins
Summary(ja):	GStreamer 基本プラグインの開発用ライブラリ
Group:		Development/Libraries
Requires:	compat32-%{name} = %{version}-%{release}
Requires:	%{name}-devel = %{version}-%{release}
Requires:	compat32-gstreamer-devel >= %{_gst_ver}

%description -n compat32-%{name}-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 GStreamer base plugins library depvelopment and header
files.


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

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

%configure \
	--with-package-name='Vine Linux gstreamer-plugins-base package' \
	--enable-gtk-doc \
	--disable-static \
	--disable-debug \
        --enable-orc \
	--with-gudev \
	--enable-introspection=yes

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

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%post -n compat32-%{name} -p /sbin/ldconfig

%postun -n compat32-%{name} -p /sbin/ldconfig

%files -f %{po_package}.lang
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING* NEWS README RELEASE REQUIREMENTS

# helper programs
%{_bindir}/gst-*
%{_datadir}/gst-plugins-base/license-translations.dict
%{_mandir}/man1/gst-*

# libraries
%{_libdir}/libgst*-%{major}.so.*
%{_libdir}/girepository-1.0/*.typelib

# base plugins without external dependencies
%{_libdir}/gstreamer-%{major}/libgstadder.so
%{_libdir}/gstreamer-%{major}/libgstaudioconvert.so
%{_libdir}/gstreamer-%{major}/libgstaudiorate.so
%{_libdir}/gstreamer-%{major}/libgstaudioresample.so
%{_libdir}/gstreamer-%{major}/libgstaudiotestsrc.so
%{_libdir}/gstreamer-%{major}/libgstapp.so
%{_libdir}/gstreamer-%{major}/libgstcdparanoia.so
%{_libdir}/gstreamer-%{major}/libgstdecodebin.so
%{_libdir}/gstreamer-%{major}/libgstdecodebin2.so
%{_libdir}/gstreamer-%{major}/libgstencodebin.so
%{_libdir}/gstreamer-%{major}/libgstffmpegcolorspace.so
%{_libdir}/gstreamer-%{major}/libgstgdp.so
%{_libdir}/gstreamer-%{major}/libgstgio.so
%{_libdir}/gstreamer-%{major}/libgstplaybin.so
#{_libdir}/gstreamer-%{major}/libgstqueue2.so
%{_libdir}/gstreamer-%{major}/libgstsubparse.so
%{_libdir}/gstreamer-%{major}/libgsttcp.so
%{_libdir}/gstreamer-%{major}/libgsttypefindfunctions.so
#{_libdir}/gstreamer-%{major}/libgsturidecodebin.so
#%{_libdir}/gstreamer-%{major}/libgstvideo4linux.so
%{_libdir}/gstreamer-%{major}/libgstvideorate.so
%{_libdir}/gstreamer-%{major}/libgstvideoscale.so
%{_libdir}/gstreamer-%{major}/libgstvideotestsrc.so
%{_libdir}/gstreamer-%{major}/libgstvolume.so
%{_libdir}/gstreamer-%{major}/libgstximagesink.so
%{_libdir}/gstreamer-%{major}/libgstxvimagesink.so

# base plugins with external dependencies, but in the main package
%{_libdir}/gstreamer-%{major}/libgstalsa.so
%{_libdir}/gstreamer-%{major}/libgstpango.so
%{_libdir}/gstreamer-%{major}/libgstgnomevfs.so
%{_libdir}/gstreamer-%{major}/libgstlibvisual.so
%{_libdir}/gstreamer-%{major}/libgstogg.so
%{_libdir}/gstreamer-%{major}/libgsttheora.so
%{_libdir}/gstreamer-%{major}/libgstvorbis.so

%files devel
%defattr(-,root,root)
%{_datadir}/gtk-doc/html/gst-plugins-base-libs-%{major}
%{_datadir}/gtk-doc/html/gst-plugins-base-plugins-%{major}
%{_datadir}/gir-1.0/*.gir
%{_includedir}/gstreamer-%{major}/gst/*
%{_libdir}/pkgconfig/*.pc
%{_libdir}/libgst*-%{major}.so

# compat32
%if %{build_compat32}
%files -n compat32-%{name}
%defattr(-,root,root)
%{_libdir}/libgst*-%{major}.so.*
%{_libdir}/gstreamer-%{major}/*.so

%files -n compat32-%{name}-devel
%defattr(-,root,root)
%{_libdir}/libgst*-%{major}.so
%endif


%changelog
* Mon Dec 30 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.10.36-3
- rebuild with VineSeed environment

* Fri Sep 28 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.10.36-2
- remove *.pc from compat32-%{name}-devel

* Tue Feb 21 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.10.36-1
- new upstream release
- change BuildRequires: gtk3-devel instead of gtk2-devel
- add BuildRequires: qt4-devel

* Wed Jan 11 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.10.35-2
- create compat32 sub packages

* Sun Aug 14 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.10.35-1
- new upstream release

* Sun Jan 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.10.32-1
- new upstream release

* Thu Dec 09 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.10.31-1
- new upstream release

* Sat Nov 20 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.10.30.2-1
- new upstream release
- change BuildRequires: gobject-introspection-devel instead of gir-repository-devel
- add configure option (--enable-introspection=yes)

* Tue Sep 21 2010 IWAI, Masaharu <iwai@alib.jp> 0.10.30-2
- build with rpm-4.8.1-1 for pkg-config file
- add BuildRequires: gir-repository-devel

* Sun Jul 25 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.10.30-1
- new upstream release
- added BR: orc-devel, libgudev1-devel
- removed liboil dependency

* Sat May 01 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.10.29-1
- new upstream release

* Wed Mar 10 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.10.28-1
- new upstream release

* Sun Feb 28 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.10.26-1
- new upstream release
- built with new toolchain

* Sat Oct 31 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.10.25-1
- new upstream release

* Sun Aug  9 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.10.24-1
- new upstream release

* Mon May 11 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.10.23-1
- new upstream release
- added BR: libvisual-devel
- added Packager tag

* Thu Mar 26 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.10.22-1
- new upstream release

* Mon Dec 29 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.10.21-1
- add configure option --enable-experimental to enable giosink

* Wed Oct  8 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.10.21-1
- new upstream release
- spec in UTF-8

* Sun Jun 29 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.10.20-1
- new upstream release
- updated build dependancies

* Tue Apr 15 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 0.10.19-2
- build with xorg-x11-7.3
  - remove XOrg/XOrg-devel deps
  - add BuildRequires: libXv-devel, fontconfig-devel

* Sat Apr  5 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.10.19-1vl5
- new upstream release

* Sun Mar 30 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.10.18-1vl5
- new upstream release

* Sun Dec 16 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.10.15-0vl1
- new upstream release

* Sun Aug  5 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.10.14-0vl1
- new upstream release

* Sat Jun  9 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.10.13-0vl1
- new upstream release

* Sat Mar 10 2007 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 0.10.12-0vl1
- new upstream release
- update %%_gst_ver
- add Vendor/Distribution tag
- add '-with-package-name' option to %%configure
- use more macros

* Sat Dec 09 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 0.10.11-0vl1
- new upstream release
- update %%_gst_ver
- update required version of liboil
- add new plugin: libgstdecodebin2.so

* Sat Nov 25 2006 Ryoiochi INAGAKI <ryo1@bc.wakwak.com> 0.10.10-0vl1
- new upstream release
- update %%_gst_ver
- changed Group to Applications/Multimedia

* Sun Jul 16 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 0.10.9-0vl1
- new upstream release
- update %%_gst_ver

* Sun Jun 18 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.10.8-0vl1
- new upstream release
- update %%_gst_ver

* Thu May 18 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 0.10.7-0vl1
- new upstream release
- update %%_gst_ver

* Mon May  1 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.10.6-0vl1
- new upstream release

* Sun Mar 26 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 0.10.5-0vl2
- remove Obsoletes: gstreamer-plugins

* Tue Mar 14 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 0.10.5-0vl1
- new upstream release
- update %%_gst_ver and liboil version
- merge -gnomevfs,ogg into main package
- add Obsoletes: %%{name}-gnomevfs, %%{name}-ogg < 0.10.5

* Fri Feb 10 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 0.10.3-0vl1
- new upstream release
- update %%_gst_ver

* Sun Jan 22 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 0.10.2-0vl2
- add Obsoletes: gstreamer-plugins < 0.9

* Sat Jan 21 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 0.10.2-0vl1
- initial package based on gstreamer-plugins
- new upstream release
  - change major to 0.10
- update dependencies
- update %%configure options
- add subpackage: -gnomevfs, -ogg

* 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 ;)
