File python-pyside-tools.spec of Package python-pyside-tools
#
# spec file for package python-pyside-tools
#
# Copyright (c) 2016 SUSE LINUX 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-tools
Name: python-%{tarname}
Version: 0.2.15
Release: 0
Summary: Useful utilities for creating PySide applications
License: BSD-3-Clause or GPL-2.0
Group: Development/Libraries/C and C++
Url: http://qt-project.org/wiki/PySide
# git clone git@github.com:PySide/Tools.git && cd Tools
# git archive 0.2.15 --prefix=pyside-tools-0.2.15/ | bzip2 > ../pyside-tools-0.2.15.tar.bz2
Source0: %{tarname}-%{version}.tar.bz2
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: python-devel
BuildRequires: python-pyside-devel
Requires: python-pyside
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
%py_requires
%endif
%description
Some useful tools and utilities for making and working with PySide applications.
%prep
%setup -q -n %{tarname}-%{version}
%build
mkdir build
pushd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DLIB_SUFFIX=$(echo %{_lib} | cut -b4-) \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_TESTS=False
make %{?_smp_mflags}
%install
pushd build
%makeinstall DESTDIR=%{buildroot}
chmod a+x %{buildroot}%{python_sitearch}/pysideuic/icon_cache.py
%if 0%{?suse_version}
%fdupes %{buildroot}
%endif
%files
%defattr(-,root,root)
%doc AUTHORS LICENSE-rcc LICENSE-uic
%{_bindir}/pyside-lupdate
%{_bindir}/pyside-rcc
%{_bindir}/pyside-uic
%{_mandir}/man1/pyside-lupdate.1.gz
%{_mandir}/man1/pyside-rcc.1.gz
%{_mandir}/man1/pyside-uic.1.gz
%{python_sitearch}/pysideuic
%changelog