File python-pyside.spec of Package python-pyside
#
# spec file for package python-pyside (Version 0.3.3.20100701)
#
# Copyright (c) 2010 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/
#
# norootforbuild
%if 0%{?fedora}
%{!?py_sitedir: %define py_sitedir %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif
%if 0%{?mdkversion}
%define py_sitedir %{py_platsitedir}
%endif
%define libprefix libpyside
%define libsoversion 0_3
%define libname %{libprefix}%{libsoversion}
%define rversion 0.3.3
Name: python-pyside
BuildRequires: gcc-c++ python-devel cmake libqt4-devel libshiboken-devel shiboken generatorrunner phonon-devel
%if 0%{?suse_version}
BuildRequires: libQtWebKit-devel fdupes
%endif
License: LGPL v2.1 or later
Group: Development/Libraries/Python
Summary: PySide - python bindings for Qt
Version: 0.3.3.20100701
Release: 1
Url: http://www.pyside.org
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: pyside-%{version}.tar.bz2
Patch2: python-pyside-fedora_lrelease.diff
%if 0%{?suse_version}
%{py_requires}
%endif
%description
The PySide project provides LGPL-licensed Python bindings for the Qt
cross-platform application and UI framework. PySide Qt bindings allow both free
open source and proprietary software development and ultimately aim to support
all of the platforms as Qt itself.
Authors:
--------
Anderson Lizardo <anderson.lizardo@openbossa.org>
Bruno Araujo <bruno.araujo@openbossa.org>
Hugo Parente Lima <hugo.lima@openbossa.org>
Lauro Moura <lauro.neto@openbossa.org>
Luciano Wolf <luciano.wolf@openbossa.org>
Marcelo Lira <marcelo.lira@openbossa.org>
Renato Araujo Oliveira Filho <renato.filho@openbossa.org>
%package -n %{libname}
License: GPL v2 or later
Group: Development/Libraries/C and C++
Summary: Plugin-based application to run apiextractor-based generators
%description -n %{libname}
Support library for Python bindings of Qt-based libraries.
Authors:
--------
Anderson Lizardo <anderson.lizardo@openbossa.org>
Bruno Araujo <bruno.araujo@openbossa.org>
Hugo Parente Lima <hugo.lima@openbossa.org>
Lauro Moura <lauro.neto@openbossa.org>
Luciano Wolf <luciano.wolf@openbossa.org>
Marcelo Lira <marcelo.lira@openbossa.org>
Renato Araujo Oliveira Filho <renato.filho@openbossa.org>
%package -n %{libprefix}-devel
License: LGPL v2 or later
Group: Development/Libraries/C and C++
Summary: Plugin-based application to run apiextractor-based generators
Requires: %{libname} = %{version} libqt4-devel
%description -n %{libprefix}-devel
Support library for Python bindings of Qt-based libraries.
This package contains all the developer tools you need to create your own PyQt
applications.
Authors:
--------
Anderson Lizardo <anderson.lizardo@openbossa.org>
Bruno Araujo <bruno.araujo@openbossa.org>
Hugo Parente Lima <hugo.lima@openbossa.org>
Lauro Moura <lauro.neto@openbossa.org>
Luciano Wolf <luciano.wolf@openbossa.org>
Marcelo Lira <marcelo.lira@openbossa.org>
Renato Araujo Oliveira Filho <renato.filho@openbossa.org>
%prep
%setup -q -n pyside-%{version}
%if 0%{?fedora}
%patch2
%endif
%build
%{__mkdir} build
pushd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=%_prefix \
-DLIB_SUFFIX=$(echo %_lib | cut -b4-) \
-DCMAKE_BUILD_TYPE=Debug \
-DGENERATOR=%{_bindir}/shiboken \
-DQT_PHONON_INCLUDE_DIR=%{_includedir}/phonon
make %{?jobs:-j%jobs}
%install
pushd build
%makeinstall DESTDIR=$RPM_BUILD_ROOT
%if 0%{?suse_version}
%fdupes $RPM_BUILD_ROOT
%endif
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc COPYING
%dir %{py_sitedir}/PySide
%dir %_datadir/PySide
%dir %_datadir/PySide/typesystems
%{py_sitedir}/PySide/__init__.py
%{py_sitedir}/PySide/*.so
%_datadir/PySide/typesystems/typesystem_*.xml
%files -n %{libname}
%defattr(-,root,root)
%{_libdir}/libpyside.so.*
%files -n %{libprefix}-devel
%defattr(-,root,root)
%dir %{_includedir}/PySide
%dir %{_includedir}/PySide/Qt*
%dir %{_includedir}/PySide/phonon
%dir %_libdir/cmake/PySide-%{rversion}
%{_includedir}/PySide/*.h
%{_includedir}/PySide/Qt*/*.h
%{_includedir}/PySide/phonon/*.h
%{_libdir}/libpyside.so
%_libdir/cmake/PySide-%{rversion}/*.cmake
%_libdir/pkgconfig/pyside.pc
%changelog