%{!?python_sitearch:	%define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%{!?python_sitelib:	%define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

%define	majorminor	0.10
%define pkg_release	2%{?_dist_release}

Summary:	Python bindings for GStreamer
Summary(ja): 	GStreamer の Python バインディング
Name:		gstreamer-python
Version:	0.10.21
Release: 	%{pkg_release}
Source0:	http://gstreamer.freedesktop.org/src/gst-python/gst-python-%{version}.tar.bz2
License:	LGPLv2+
Group:		Development/Languages
URL:		http://gstreamer.freedesktop.org/

BuildRoot:	%{_tmppath}/%{name}-%{version}-root
BuildRequires:	python, python-devel
BuildRequires:	pygtk2-devel
BuildRequires:	gstreamer-devel
BuildRequires:	gstreamer-plugins-base-devel
BuildRequires:	pygobject-devel	
Requires:	python, pygtk2
Requires:	gstreamer, gstreamer-plugins-base

Vendor:		Project Vine
Distribution:	Vine Linux

%description
This package contains a python bindings to the GStreamer 
streaming-media framework.

%description -l ja
このパッケージは GStreamer ストリーミングメディアフレームワーク
向けの Python バインディングを含みます。

%package devel
Summary:        Development environment for gstreamer-python
Summary(ja):    gstreamer-pythonの開発環境
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       pkgconfig

%description devel
Header files and libraries for building a extension library for the
gstreamer-python.


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

%build
%configure
%{__make} %{?_smp_mflags}

%install
%{__rm} -rf ${RPM_BUILD_ROOT}
%{__make} install DESTDIR=${RPM_BUILD_ROOT}

# remove unnecessary .la files
find ${RPM_BUILD_ROOT} -type f -name "*.la" -exec rm -f {} ';'


%clean
%{__rm} -rf ${RPM_BUILD_ROOT}


%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog INSTALL NEWS README RELEASE TODO
%{_libdir}/gstreamer-%{majorminor}/lib*.so
%{python_sitearch}/*.so
#%{python_sitelib}/*.py*
#%{python_sitelib}/pygst.p*
#%{python_sitelib}/gst-%{majorminor}
%{python_sitearch}/pygst.p*
%{python_sitearch}/gst-%{majorminor}
%{_datadir}/gst-python/%{majorminor}/defs/*.defs
%{_datadir}/gst-python/%{majorminor}/examples

%files devel
%{_libdir}/pkgconfig/gst-python-%{majorminor}.pc


%changelog
* Thu Feb 16 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.10.21-2
- rebuild with python-2.7.2

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

* Thu Dec 09 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.10.20-1
- new upstream release
- create -devel sub package

* Sat Oct 02 2010 Shu KONNO <owa@bg.wakwak.com> 0.10.17-3
- rebuilt with rpm-4.8.1 for pkg-config

* Tue Feb 02 2010 Shu KONNO <owa@bg.wakwak.com> 0.10.17-2
- rebuild with python-2.6

* Sun Nov 29 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.10.17-1
- new upstream release

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

* Wed Dec 31 2008 Shu KONNO <owa@bg.wakwak.com> 0.10.13-2
- changed python-lib directory to %%{python_sitearch}

* Sat Dec 20 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.10.13-1
- initial build for Vine Linux

