%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: pyparted Version: 3.6 Release: 1ark Summary: A Python interface to libparted Group: Development/Languages License: LGPLv2+ URL: http://fedorahosted.org/pyparted Source0: https://fedorahosted.org/releases/py/pyparted/%name-%version.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: parted-devel python-devel %description Python bindings to the parted library %prep %setup -q %configure %build # Starting with 3.7, pyparted uses setup.py instead of autoconf #CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build make %?_smp_mflags %install # Starting with 3.7, pyparted uses setup.py instead of autoconf #%{__python} setup.py install -O1 --skip-build --root %{buildroot} make install DESTDIR="%buildroot" %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %{python_sitearch}/* %changelog * Sun Jul 17 2011 Bernhard Rosenkraenzer <bero@arklinux.org> 3.6-1ark - Initial rpm -- using outdated 3.6 because newer versions require libparted >= 3.0 (which removes resizing functionality etc. other things may rely on)