# 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: pypolkit Version: 0.1 Release: 0.1%{?dist} Summary: Python bindings to PolicyKit Group: Development/Languages License: MIT URL: http://svn.pardus.org.tr/uludag/trunk/python-modules/python-polkit/ Source0: http://cekirdek.pardus.org.tr/~bahadir/polkit/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: augeas-libs BuildRequires: python-setuptools python-devel %description pypolkit 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 PKG-INFO %{python_sitearch}/*polkit* %changelog * Thu Jul 10 2008 Harald Hoyer 0.1-1 - initial version