File python-pyside.spec of Package python-pyside
#
# spec file for package python-pyside (Version 0.2.3)
#
# Copyright (c) 2009 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
Name: python-pyside
BuildRequires: gcc-c++ python-devel boost-devel boostpythongenerator cmake libqt4-devel generatorrunner phonon-devel graphviz-devel
%if 0%{?suse_version}
BuildRequires: libQtWebKit-devel fdupes
%endif
%if 0%{?fedora} < 12
BuildRequires: PolicyKit-gnome
%endif
License: LGPL v2.1 or later
Group: Development/Libraries/Python
Summary: PySide - python bindings for Qt
Version: 0.2.3
Release: 2
Url: http://www.pyside.org
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: pyside-qt4.6+%{version}.tar.bz2
Patch0: python-pyside-cmake_fix_dirs.patch
Patch1: pyside-build_boost_1.36.patch
#Patch2: pyside-link_against_lutil.patch
#Patch3: pyside-old_cmake_versions.patch
%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 devel
License: LGPL v2.1 or later
Group: Development/Libraries/Python
Summary: PySide - python bindings for Qt
Requires: %{name} = %{version} libqt4-devel
%description devel
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.
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-qt4.6+%{version}
%patch0
%patch1
#%if 0%{?suse_version} > 1110
#%patch2
#%endif
#%if 0%{?suse_version} < 1120
#%patch3
#%endif
%build
%{__mkdir} build
pushd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=%_prefix \
-DLIB_SUFFIX=$(echo %_lib | cut -b4-) \
-DGENERATOR=%{_bindir}/boostpythongenerator \
-DQT_PHONON_INCLUDE_DIR=%{_includedir}/phonon
make %{?jobs:-j%jobs}
ctest -R qtcore || true
%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 AUTHORS COPYING README ChangeLog
%dir %{py_sitedir}/PySide
%{py_sitedir}/PySide/*.so
%_libdir/libpysidebase.so.*
%{py_sitedir}/PySide/__init__.py
%_datadir/PySide/typesystem/typesystem_*.xml
%files devel
%defattr(-,root,root)
%dir %_includedir/PySide
%dir %_datadir/PySide
%dir %_datadir/PySide/typesystem
%_includedir/PySide/*.hpp
%_libdir/libpysidebase.so
%_libdir/pkgconfig/pyside.pc
%_datadir/cmake/Modules/FindPySide.cmake
%changelog