# keep in sync with the VERSION.  gstreamer can append a .0.1 to CVS snapshots.
%define major		1.0

%define _gtk_doc_ver	1.6

%define po_package	gstreamer-%{major}

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

Name:		gstreamer1
Summary:	GStreamer streaming media framework runtime.
Summary(ja):	GStreamer ストリーミングメディアフレームワークランタイム
Version:	1.0.7
Release:	1%{?_dist_release}

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

BuildRoot:	%{_tmppath}/%{name}-%{version}-root

BuildRequires:	gobject-introspection-devel
BuildRequires:	bison
BuildRequires:	gtk-doc >= %{_gtk_doc_ver}
BuildRequires:	flex

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.

%package devel
Summary:	Libraries/header files for GStreamer streaming media framework.
Summary(ja):	GStreamer ストリーミングメディアフレームワークのライブラリ/ヘッダファイル
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}

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

# compat32
%package -n compat32-%{name}
Summary:	GStreamer streaming media framework runtime.
Summary(ja):	GStreamer ストリーミングメディアフレームワークランタイム
Group:		System Environment/Libraries

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

%package -n compat32-%{name}-devel
Summary:	Libraries/header files for GStreamer streaming media framework.
Summary(ja):	GStreamer ストリーミングメディアフレームワークのライブラリ/ヘッダファイル
Group:		Development/Libraries
Requires:	compat32-%{name} = %{version}-%{release}
Requires:	%{name}-devel = %{version}-%{release}

%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 the libraries and includes files necessary to develop
applications and plugins for GStreamer.

%prep
%setup -q -n gstreamer-%{version}

%build
%configure \
	--with-package-name='Vine Linux gstreamer package' \
	--with-cachedir=%{_var}/cache/gstreamer-%{major} \
	--enable-introspection=yes \
	--disable-docbook --enable-gtk-doc \
	--disable-static --disable-examples \
	--disable-tests --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

mkdir -p $RPM_BUILD_ROOT%{_var}/cache/gstreamer-%{major}

rm -f $RPM_BUILD_ROOT%{_libdir}/gstreamer-%{major}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
#rm -f $RPM_BUILD_ROOT%{_libdir}/libgstmedia-info*.so.0.0.0

%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 README NEWS RELEASE
%doc TODO ABOUT-NLS
%{_bindir}/*
%dir %{_libdir}/gstreamer-%{major}
%{_libdir}/gstreamer-%{major}/*.so*
%{_libdir}/*.so.*
%{_libdir}/girepository-1.0/*.typelib
%dir %{_libexecdir}/gstreamer-%{major}
%{_libexecdir}/gstreamer-%{major}/gst-plugin-scanner
%{_mandir}/man1/*
%dir %{_var}/cache/gstreamer-%{major}

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

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

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

%changelog
* 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

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

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