[python-django-profile/el6] build for EPEL6, fix lang handling there
Matthias Runge
mrunge at fedoraproject.org
Fri May 17 07:56:25 UTC 2013
commit d650f12c03f602034d71dcd2edbf27d57b34a049
Author: Matthias Runge <mrunge at redhat.com>
Date: Fri May 17 09:56:00 2013 +0200
build for EPEL6, fix lang handling there
python-django-profile.spec | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/python-django-profile.spec b/python-django-profile.spec
index d8fd71f..5a72d48 100644
--- a/python-django-profile.spec
+++ b/python-django-profile.spec
@@ -2,7 +2,7 @@
%global vcsdate 20110216
%global vcstag r458
-%global release 3
+%global release 4
%global obs_ver 0.6-0.6.20090813svnr420
Name: python-%{upstream_name}
@@ -22,7 +22,7 @@ Patch0: %{name}-django15.patch
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
-Requires: python-django
+Requires: Django
Requires: python-gdata
Requires: python-imaging
@@ -50,7 +50,22 @@ chmod a-x userprofile/templates/userprofile/base_2col.html
%install
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+
+%if 0%{?fedora} >= 16
%find_lang django
+%else
+# Handling locale files
+# This is adapted from the %%find_lang macro, which cannot be directly
+# used since Django locale files are not located in %%{_datadir}
+#
+# The rest of the packaging guideline still apply -- do not list
+# locale files by hand!
+(cd $RPM_BUILD_ROOT && find . -name 'django*.mo') | %{__sed} -e 's|^.||' |
+%{__sed} -e \
+ 's:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3:' \
+ >> django.lang
+%endif
+
# remove useless django.po files
find $RPM_BUILD_ROOT -type f -name '*.po' -exec rm {} \;
@@ -69,6 +84,9 @@ find $RPM_BUILD_ROOT -type f -name '*.po' -exec rm {} \;
%exclude %{python_sitelib}/demo
%changelog
+* Fri May 17 2013 Matthias Runge <mrunge at redhat.com> - 0.6-0.4.20110216svnr458
+- build for EPEL6, fix lang handling there
+
* Fri May 10 2013 Miro HronĨok <mhroncok at redhat.com> - 0.6-0.3.20110216svnr458
- Patched to support Django 1.5
- Added Require python-gdata
More information about the scm-commits
mailing list