# sitelib for noarch packages, sitearch for others (remove the unneeded one) %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: mediascrapper Version: 0.1 Release: 1%{?dist} Summary: A script to scrap media files from different sites Group: Development/Languages License: GPLv2 URL: http://kushal.fedorapeople.org/mediascrapper Source0: http://kushal.fedorapeople.org/mediascrapper/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel Requires: python-BeautifulSoup %description A script to scrap media files from different sites. Currently only supports apunkabollywood.net %prep %setup -q %build # Remove CFLAGS=... for noarch packages (unneeded) 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 %{_docdir}/mediascrapper/README %{_bindir}/mediascrapper %{python_sitelib}/* %changelog * Thu Jul 31 2008 Kushal Das 0.1-1 - Initial release