File python3-gst.spec of Package python-gst

#
# spec file for package python-gstreamer
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

%define build_for_python3 1

%if %{build_for_python3}
%define local_py_requires Requires: python(abi) = %py3_ver
%define local_py_sitedir  %{python3_sitearch}
%define local_py_suffix   3
%define local_py_pkg      python3
%define local_lib_ver     3-0
%else
%define local_py_requires %{py_requires}
%define local_py_sitedir  %{py_sitedir}
%define local_py_suffix   2
%define local_py_pkg      python
%define local_lib_ver     2-0
%endif

Name:           python3-gst
%define _name gst-python
Version:        1.2.1
Release:        0
Summary:        Python Bindings for GStreamer
License:        LGPL-2.1+
Group:          Development/Languages/Python
Url:            http://www.gstreamer.net/
Source:         http://gstreamer.freedesktop.org/src/gst-python/%{_name}-%{version}.tar.bz2
BuildRequires:  gstreamer-plugins-base-devel
%if %{build_for_python3}
BuildRequires:  python3-devel
%else
BuildRequires:  python-devel
%endif
BuildRequires:  pkgconfig(pygobject-3.0) >= 3.0
Requires:       gstreamer >= 1.0.0
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%{py_requires}

%description
This module contains a wrapper that allows GStreamer applications to be
written in Python.

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

%build
%if %{build_for_python3}
export PYTHON=python3
%endif
%configure \
    --disable-static
make %{?_smp_mflags}

%install
%make_install
find %{buildroot} -name '*.la' -delete -print

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc COPYING NEWS TODO
%{local_py_sitedir}/gi/overrides/

%changelog
openSUSE Build Service is sponsored by