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

%define major 1.0

%define _gst_ver	1.0.5
%define _glib2_ver	2.34.0
%define _gtk3_ver	3.6.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:		gstreamer1-plugins-base
Version:	1.0.5
Release:	1%{?_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:	gstreamer1 >= %{_gst_ver}

BuildRequires:	gstreamer1-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:	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:  gobject-introspection-devel

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-maintained base plugins.

%package devel
Summary:	Libraries/include files for GStreamer base plugins
Summary(ja):	GStreamer 基本プラグインの開発用ライブラリ
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	gstreamer1-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-gstreamer1-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 \
	--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-*
%{_mandir}/man1/gst-*

%{_datadir}/gst-plugins-base/1.0/license-translations.dict

# 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}/libgstencodebin.so
%{_libdir}/gstreamer-%{major}/libgstgio.so
%{_libdir}/gstreamer-%{major}/libgstplayback.so
%{_libdir}/gstreamer-%{major}/libgsttcp.so
%{_libdir}/gstreamer-%{major}/libgsttypefindfunctions.so
%{_libdir}/gstreamer-%{major}/libgstvideoconvert.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}/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
* 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

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

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