[mod_python] - Merge Review cleanup (#226156)

paragn paragn at fedoraproject.org
Mon Sep 6 04:17:10 UTC 2010


commit 903119808e8cf67b2b086ffebe773cb047424b92
Author: paragn <paragn at fedoraproject.org>
Date:   Mon Sep 6 09:50:53 2010 +0530

    - Merge Review cleanup (#226156)

 mod_python.spec |   31 +++++++++++++++++--------------
 1 files changed, 17 insertions(+), 14 deletions(-)
---
diff --git a/mod_python.spec b/mod_python.spec
index 39684b6..b47a411 100644
--- a/mod_python.spec
+++ b/mod_python.spec
@@ -1,10 +1,9 @@
-%define contentdir /var/www
-%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+%global contentdir /var/www
 
 Summary: An embedded Python interpreter for the Apache HTTP Server
 Name: mod_python
 Version: 3.3.1
-Release: 12
+Release: 13
 Source: http://www.apache.org/dist/httpd/modpython/%{name}-%{version}.tgz
 Source1: python.conf
 Patch1: mod_python-3.1.3-ldflags.patch
@@ -13,10 +12,9 @@ Patch3: mod_python-3.3.1-buckets.patch
 URL: http://www.modpython.org/
 License: ASL 2.0
 Group: System Environment/Daemons
-BuildRequires: httpd-devel >= 2.0.40-6, python, python-devel
+BuildRequires: httpd-devel >= 2.0.40-6, python-devel
 Requires: httpd-mmn = %(cat %{_includedir}/httpd/.mmn || echo missing)
 Requires: httpd >= 2.0.40
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 %description
 Mod_python is a module that embeds the Python language interpreter within
@@ -32,29 +30,31 @@ performance over the traditional CGI approach.
 %patch2 -p1 -b .cflags
 %patch3 -p1 -b .buckets
 
+# Convert to utf-8
+for file in CREDITS NEWS; do
+    iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \
+    touch -r $file $file.new && \
+    mv $file.new $file
+done
+
 %build
 %configure --with-apxs=%{_sbindir}/apxs --with-max-locks=4
 make %{?_smp_mflags} APXS_CFLAGS="-Wc,-fno-strict-aliasing"
 
 %install
-[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
 mkdir -p $RPM_BUILD_ROOT%{_libdir}/httpd/modules
-make install DESTDIR=$RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
 
 # Install the config file
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
-install -m 644 $RPM_SOURCE_DIR/python.conf \
-   $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/
+install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/
 
 # Install the manual.
 mkdir -p $RPM_BUILD_ROOT%{contentdir}/manual/mod/mod_python
 cp -a doc-html/* $RPM_BUILD_ROOT%{contentdir}/manual/mod/mod_python/
 
-%clean
-[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
-
 %files
-%defattr(-,root,root)
+%defattr(-,root,root,-)
 %doc README NEWS CREDITS LICENSE NOTICE
 %{contentdir}/manual/mod/mod_python
 %{_libdir}/httpd/modules/mod_python.so
@@ -62,6 +62,9 @@ cp -a doc-html/* $RPM_BUILD_ROOT%{contentdir}/manual/mod/mod_python/
 %{python_sitearch}/mod_python*
 
 %changelog
+* Mon Sep 06 2010 Parag Nemade <paragn AT fedoraproject.org> - 3.3.1-13
+- Merge Review cleanup (#226156)
+
 * Wed Jul 21 2010 David Malcolm <dmalcolm at redhat.com> - 3.3.1-12
 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
 
@@ -265,7 +268,7 @@ cp -a doc-html/* $RPM_BUILD_ROOT%{contentdir}/manual/mod/mod_python/
 * Mon Jun 25 2001 Nalin Dahyabhai <nalin at redhat.com>
 - update to 2.7.5
 - add URL
-- move docs so that they live under %{contentdir}
+- move docs so that they live under %%{contentdir}
 
 * Thu May 31 2001 Nalin Dahyabhai <nalin at redhat.com>
 - update to 2.7.3


More information about the scm-commits mailing list