[Django/f17] - added forgotten bcond - fixed language handling for el6 build

Matthias Runge mrunge at fedoraproject.org
Tue Apr 3 14:58:39 UTC 2012


commit 08b4fc97040b802d21cf28eef0890faa555a80fc
Author: Matthias Runge <mrunge at matthias-runge.de>
Date:   Tue Apr 3 16:57:40 2012 +0200

    - added forgotten bcond
    - fixed language handling for el6 build

 Django.spec |   26 +++++++++++++++++++++++++-
 1 files changed, 25 insertions(+), 1 deletions(-)
---
diff --git a/Django.spec b/Django.spec
index 3df9a46..f3da1d1 100644
--- a/Django.spec
+++ b/Django.spec
@@ -1,9 +1,14 @@
 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
 %{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:3]")}
 
+# Tests requiring Internet connections are disabled by default
+# pass --with internet to run them (e.g. when doing a local rebuild
+# for sanity checks before committing)
+%bcond_with internet
+
 Name:           Django
 Version:        1.4
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        A high-level Python Web framework
 
 Group:          Development/Languages
@@ -87,11 +92,26 @@ cp -p %{SOURCE1} __init__.py
 rm -rf $RPM_BUILD_ROOT
 %{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
 
+%if 0%{?rhel} > 6 || 0%{?fedora} >= 16
 %find_lang django
 %find_lang djangojs
 # append djangojs.lang to django.lang
 cat djangojs.lang >> django.lang
 
+%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
+
 # If it's rhel5+ or any Fedora over 12 build docs
 %if 0%{?rhel} > 4 || 0%{?fedora} >= 12
     # build documentation
@@ -234,6 +254,10 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Sun Apr 01 2012 Matthias Runge <mrunge at matthias-runge.de> - 1.4-2
+- include forgotten %%bcond_with internet
+- fix language handling for el6
+
 * Wed Mar 27 2012 Matthias Runge <mrunge at matthias-runge.de> - 1.4-1
 - Update to 1.4
 - backport simplejson-import from python-django package


More information about the scm-commits mailing list