# sitelib for noarch packages, sitearch for others (remove the unneeded one) %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: python-policykit Version: 0.8 Release: 1%{?dist} Summary: Python bindings to PolicyKit Group: Development/Languages License: MIT URL: http://harald.fedorapeople.org/downloads/python-policykit/ Source0: http://harald.fedorapeople.org/downloads/python-policykit/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: PolicyKit BuildRequires: python-devel swig PolicyKit-devel dbus-devel %description python-policykit is a set of Python bindings around PolicyKit. %prep %setup -q %build # Remove CFLAGS=... for noarch packages (unneeded) CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build_ext -i CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc COPYING AUTHORS README.txt # For arch-specific packages: sitearch %{python_sitearch}/*policykit* %attr(0755,root,root) %{python_sitearch}/_policykit.so %changelog * Wed Apr 16 2008 Harald Hoyer - 0.8-1 - initial version