Sophie

Sophie

distrib > Fedora > 16 > x86_64 > media > os-src > by-pkgid > e7dc41dbf1d4c97f5865766d97a364b5 > files > 2

django-sct-0.6-1.fc15.src.rpm

%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Name:           django-sct
Version:        0.6
Release:        1%{?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-%{version}.tar.gz
Patch0:         django-sct-0.6-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
* Wed Feb 09 2011 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> 0.6-1
- Update to 0.6

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.5-4
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Fri Mar 27 2009 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> 0.5-2
- Cleaned up some rpmlint errors

* Tue Mar 24 2009 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> 0.5-1
- Initial RPM release