Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > ed5b66ea21d0572b44fa08472c27ba95 > files > 2

django-reversion-1.3.2-2.fc14.src.rpm

%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%endif


Name:           django-reversion
Version:        1.3.2
Release:        2%{?dist}
Summary:        Version control extension for the Django web framework

Group:          Development/Languages
License:        BSD
URL:            http://github.com/etianen/django-reversion
Source0:        http://github.com/downloads/etianen/django-reversion/django-reversion-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
BuildRequires:  python2-devel
Requires:       Django

%description
Reversion is an extension to the Django web framework that provides
comprehensive version control facilities. 

Features:
* Roll back to any point in a model's history - an unlimited undo facility!
* Recover deleted models - never lose data again!
* Admin integration for maximum usability.
* Group related changes into revisions that can be rolled back in a single
  transaction.
* Automatically save a new version whenever your model changes using Django's
  flexible signalling framework.
* Automate your revision management with easy-to-use middleware. 

Reversion can be easily added to your existing Django project with a minimum
of code changes. 

%prep
%setup -q 
%build
%{__python} setup.py build


%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
# Language files; not under /usr/share, need to be handled manually
(cd $RPM_BUILD_ROOT && find . -name 'django*.mo') | %{__sed} -e 's|^.||' | %{__sed} -e \
  's:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3:' \
  >> %{name}.lang
  
find $RPM_BUILD_ROOT -name "*.po" | xargs rm -f
  
%clean
rm -rf $RPM_BUILD_ROOT

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc PKG-INFO LICENSE
%dir %{python_sitelib}/reversion
%{python_sitelib}/reversion/*.py*
#%{python_sitelib}/reversion/*.egg-info
%{python_sitelib}/reversion/management/
%{python_sitelib}/reversion/templates/
%{python_sitelib}/reversion/templatetags/

# Leaving these since people may want to rebuild on lower dists
%if 0%{?fedora} >= 9 || 0%{?rhel} >= 6
%{python_sitelib}/*.egg-info
%endif

%changelog
* Sun Nov 14 2010 Luca Botti <lucabotti@fedoraproject.org> 1.3.2-2
- Fixed locale handling

* Fri Nov 11 2010 Luca Botti <lucabotti@fedoraproject.org> 1.3.2-1
- Update to 1.3.2

* Tue Sep 29 2009 Luca Botti <lucabotti@fedoraproject.org> 1.1.2-2
- Fixed Spec File

* Fri Aug 21 2009 Luca Botti <lucabotti@fedoraproject.org> 1.1.2-1
- Update to 1.1.2 upstream release

* Fri Jul 17 2009 Tim Niemueller <timn@fedoraproject.org> 1.1.1
- Initial RPM release