File python-pyside.spec of Package python-pyside
#
# spec file for package python-pyside
#
# Copyright (c) 2014 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 tarname pyside
Name: python-%{tarname}
%define libprefix lib%{tarname}
%define pyname PySide
Version: 1.2.2
Release: 0
%define qtver 4.8
%define rversion qt%{qtver}+%{version}
Summary: PySide - python bindings for Qt
License: LGPL-2.1+
Group: Development/Languages/Python
Url: http://qt-project.org/wiki/PySide
Source0: http://download.qt-project.org/official_releases/pyside/%{tarname}-%{rversion}.tar.bz2
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: graphviz-devel
BuildRequires: libQtWebKit-devel
BuildRequires: libqt4-devel >= %{qtver}
BuildRequires: libshiboken-devel
BuildRequires: libxslt-devel
BuildRequires: phonon-devel
BuildRequires: python-devel
BuildRequires: python-pyside-shiboken
%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.
%package devel
Summary: PySide - python bindings for Qt
Group: Development/Languages/Python
Requires: %{name} = %{version}
Requires: libqt4-devel
Requires: libshiboken-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.
%package doc
Summary: PySide - python bindings for Qt
Group: Development/Languages/Python
%description doc
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 documentation.
%prep
%setup -q -n %{tarname}-%{rversion}
%build
mkdir build
pushd build
cmake .. \
-DBUILD_TESTS=FALSE \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DLIB_SUFFIX=$(echo %{_lib} | cut -b4-) \
-DQT_PHONON_INCLUDE_DIR=%{_includedir}/phonon
make %{?_smp_mflags}
ctest -R qtcore || true
%install
pushd build
%makeinstall DESTDIR=%{buildroot}
%fdupes %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc COPYING ChangeLog
%{_libdir}/%{libprefix}-python%{py_ver}.so.*
%{py_sitedir}/%{pyname}/
%{_datadir}/%{pyname}/
%files devel
%defattr(-,root,root)
%{_includedir}/%{pyname}/
%{_libdir}/%{libprefix}-python%{py_ver}.so
%{_libdir}/cmake/*
%{_libdir}/pkgconfig/%{tarname}.pc
%files doc
%defattr(-,root,root)
%doc COPYING ChangeLog
%changelog