/specs/python-django-reversion/python-django-reversion.spec

http://github.com/repoforge/rpms · Unknown · 90 lines · 65 code · 25 blank · 0 comment · 0 complexity · 72bdf982598dd4deb19ca289a839427b MD5 · raw file

  1. # $Id$
  2. # Authority: yury
  3. # Upstream: Dave Hall <dave$etianen,com>
  4. %if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
  5. %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
  6. %endif
  7. %{?el5:%define _with_python24 1}
  8. %define real_name django-reversion
  9. Name: python-%{real_name}
  10. Version: 1.5
  11. Release: 1%{?dist}
  12. Summary: Version control extension for the Django web framework
  13. Group: Development/Languages
  14. License: BSD
  15. URL: http://github.com/etianen/django-reversion
  16. Source0: http://github.com/downloads/etianen/%{real_name}/%{real_name}-%{version}.tar.gz
  17. Patch0: django-reversion-1.5-python2.4.patch
  18. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  19. BuildArch: noarch
  20. BuildRequires: python-devel >= 2.4
  21. Requires: python-django >= 1.3
  22. %description
  23. Reversion is an extension to the Django web framework that provides
  24. comprehensive version control facilities. Reversion can be easily added to your
  25. existing Django project with a minimum of code changes.
  26. %prep
  27. %setup -n %{real_name}-%{version}
  28. %if 0%{?_with_python24}
  29. %patch0 -p1
  30. %{__rm} src/reversion/test*.py
  31. %endif
  32. %build
  33. %{__python} setup.py build
  34. %install
  35. rm -rf $RPM_BUILD_ROOT
  36. %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
  37. # Language files; not under /usr/share, need to be handled manually
  38. (cd $RPM_BUILD_ROOT && find . -name 'django*.mo') | %{__sed} -e 's|^.||' | %{__sed} -e \
  39. 's:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3:' \
  40. >> %{name}.lang
  41. find $RPM_BUILD_ROOT -name "*.po" | xargs rm -f
  42. %clean
  43. rm -rf $RPM_BUILD_ROOT
  44. %files -f %{name}.lang
  45. %defattr(-, root, root, -)
  46. %doc PKG-INFO LICENSE README.markdown
  47. %dir %{python_sitelib}/reversion
  48. %{!?_with_python24:%{python_sitelib}/*.egg-info}
  49. %{python_sitelib}/reversion/*.py*
  50. %{python_sitelib}/reversion/management/
  51. %{python_sitelib}/reversion/migrations/
  52. %{python_sitelib}/reversion/templates/
  53. %changelog
  54. * Thu Sep 08 2011 Yury V. Zaytsev <yury@shurup.com> - 1.5-1
  55. - Updated to release 1.5.
  56. * Sun Nov 14 2010 Luca Botti <lucabotti@fedoraproject.org> 1.3.2-2
  57. - Fixed locale handling
  58. * Fri Nov 11 2010 Luca Botti <lucabotti@fedoraproject.org> 1.3.2-1
  59. - Update to 1.3.2
  60. * Tue Sep 29 2009 Luca Botti <lucabotti@fedoraproject.org> 1.1.2-2
  61. - Fixed Spec File
  62. * Fri Aug 21 2009 Luca Botti <lucabotti@fedoraproject.org> 1.1.2-1
  63. - Update to 1.1.2 upstream release
  64. * Fri Jul 17 2009 Tim Niemueller <timn@fedoraproject.org> 1.1.1
  65. - Initial RPM release