%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: django-sct Version: 0.5 Release: 2%{?dist} Summary: A collection of Django applications for building community websites Group: Development/Languages License: BSD URL: http://sct.sphene.net/ Source0: http://sct-project.googlecode.com/files/sct-0.5.tar.gz Patch0: django-sct-0.5-compile.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel gettext-devel Django Requires: Django %description Sphene Community Tools is a collection of Django applications which can be used to build community websites, news sites or blogs. %prep %setup -q -n sct-%{version} %patch0 -p 1 -b .admin find -type f -exec chmod -x {} \; sed -e 's/\r//' -i communitydraft/community/locale/*/LC_MESSAGES/django.po communitydraft/README mv communitytools/README communitytools/README.sct sed -e 's!share/locale!.*/locale!' /usr/lib/rpm/find-lang.sh > my-find-lang.sh %build cd communitytools/dist/scripts python compile-all-sph-messages.py %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{python_sitelib} cp -a communitytools/sphenecoll/sphene $RPM_BUILD_ROOT%{python_sitelib} find $RPM_BUILD_ROOT%{python_sitelib}/sphene -name '*.po' -exec rm {} + mkdir -p $RPM_BUILD_ROOT%{_datadir}/django-sct cp -a communitytools/static $RPM_BUILD_ROOT%{_datadir}/django-sct sh my-find-lang.sh $RPM_BUILD_ROOT django sphene.lst find $RPM_BUILD_ROOT%{python_sitelib} -mindepth 1 \ \( -name locale -prune \) -o \ -type d -printf '%%%%dir %{python_sitelib}/%%P\n' -o \ ! -name '*.py' -printf '%{python_sitelib}/%%P\n' -o \ -printf '%{python_sitelib}/%%P\n' \ -printf '%{python_sitelib}/%%P[co]\n' >> sphene.lst %clean rm -rf $RPM_BUILD_ROOT %files -f sphene.lst %defattr(-,root,root,-) %doc AUTHORS LICENSE README communitytools/README.sct %doc communitytools/examples communitydraft %{_datadir}/django-sct %changelog * Fri Mar 27 2009 Ignacio Vazquez-Abrams 0.5-2 - Cleaned up some rpmlint errors * Tue Mar 24 2009 Ignacio Vazquez-Abrams 0.5-1 - Initial RPM release