]> git.pld-linux.org Git - packages/apache-mod_python.git/blobdiff - apache-mod_python.spec
- simplified and fixed installation procedure (now it works)
[packages/apache-mod_python.git] / apache-mod_python.spec
index 0cc45aac2caa12d01a29ffd7c6c732a39c970cb8..c7f2b92faac0228cf47b346d363c1d0aec0373ff 100644 (file)
@@ -1,6 +1,8 @@
+
 %include       /usr/lib/rpm/macros.python
 %define                mod_name        python
 %define        apxs            /usr/sbin/apxs
+
 Summary:       An embedded Python interpreter for the Apache Web server
 Summary(cs):   Vestavìný interpret Pythonu pro WWW server Apache
 Summary(da):   En indbygget Python-fortolker for webtjeneren Apache
@@ -11,36 +13,33 @@ Summary(id):        Interpreter Perl untuk web server Apache
 Summary(is):   Perl túlkur fyrir Apache vefþjóninn
 Summary(it):   Interprete Python integrato per il server Web Apache
 Summary(ja):   Apache Web ¥µ¡¼¥Ð¡¼ÍѤÎÁȹþ¤ß Perl ¥¤¥ó¥¿¡¼¥×¥ê¥¿
-Summary(no):   En Python-fortolker for webtjeneren Apache
-Summary(pl):   Wbudowany interpreter Pythona dla serwera WWW Apache
+Summary(nb):   En Python-fortolker for webtjeneren Apache
+Summary(pl):   Wbudowany interpreter jêzyka Python dla serwera WWW Apache
 Summary(pt):   Um interpretador de Perl embebido para o servidor Web Apache
 Summary(ru):   ÷ÓÔÒÏÅÎÎÙÊ ÉÎÔÅÒÐÒÅÔÁÔÏÒ Perl ÄÌÑ WWW-ÓÅÒ×ÅÒÁ Apache
 Summary(sk):   Interpreter jazyka Perl pre webový server Apache
 Summary(sl):   Vkljuèeni pythonski tolmaè za spletni stre¾nik Apache
 Summary(sv):   En inbyggd Python-interpretator för webbservern Apache
 Name:          apache-mod_%{mod_name}
-Version:       2.7.8
-Release:       5
-License:       distributable
+Version:       3.1.3
+Release:       2
+License:       Apache Group License
 Group:         Networking/Daemons
-Source0:       http://www.modpython.org/dist/mod_%{mod_name}-%{version}.tgz
-#Patch0:               %{name}-shared.patch
-Patch1:                %{name}-DESTDIR.patch
-Patch2:                %{name}-Makefile-in.patch
-Patch3:                %{name}-cleanup.patch
-# PLD keeps static libs in /usr/lib default python install stores them in .../config/
-Patch4:        %{name}-static-lib-dir-fix.patch
-
+Source0:       http://www.apache.org/dist/httpd/modpython/mod_%{mod_name}-%{version}.tgz
+# Source0-md5: 2e1983e35edd428f308b0dfeb1c23bfe
+Source1:       %{name}.conf
+Patch0:                %{name}-lib64.patch
 URL:           http://www.modpython.org/
+BuildRequires: %{apxs}
+BuildRequires: apache-devel >= 2.0.44
+BuildRequires: apr-devel >= 1:0.9.4-1
 BuildRequires: autoconf
 BuildRequires: automake
-BuildRequires: apache-devel
+BuildRequires: flex >= 2.5.31
 BuildRequires: python-devel >= 2.2
-BuildRequires:  python-static >= 2.2
 BuildRequires: rpm-pythonprov
-BuildRequires: %{apxs}
-Prereq:                %{_sbindir}/apxs
-Requires:      apache
+Requires(post,preun):  %{apxs}
+Requires:      apache >= 2.0.44
 %pyrequires_eq python
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -123,13 +122,9 @@ prestandan j
 
 %prep
 %setup -q -n mod_%{mod_name}-%{version}
-# Patch reverted. Dynamic build makes apache segfault on all my i686 machines
-# No working reports collected on IRC/mailing lists.
-#%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
+%if "%{_libdir}" == "%{_prefix}/lib64"
+%patch0
+%endif
 
 %build
 %{__aclocal}
@@ -144,22 +139,24 @@ CFLAGS="-DEAPI %{rpmcflags}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{apache_moddir},%{py_sitedir}/mod_%{mod_name}}
+install -d $RPM_BUILD_ROOT%{apache_moddir} \
+       $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf
+
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
 
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
+install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/60_mod_python.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
-%{apxs} -e -a -n %{mod_name} %{apache_moddir}/mod_%{mod_name}.so 1>&2
 if [ -f /var/lock/subsys/httpd ]; then
        /etc/rc.d/init.d/httpd restart 1>&2
 fi
 
 %preun
 if [ "$1" = "0" ]; then
-       %{apxs} -e -A -n %{mod_name} %{apache_moddir}/mod_%{mod_name}.so 1>&2
        if [ -f /var/lock/subsys/httpd ]; then
                /etc/rc.d/init.d/httpd restart 1>&2
        fi
@@ -167,7 +164,9 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc doc-html/*
-%doc README COPYRIGHT NEWS CREDITS
+%doc doc-html/* README COPYRIGHT NEWS CREDITS
+%{_sysconfdir}/httpd/httpd.conf/60_mod_python.conf
 %attr(755,root,root) %{apache_moddir}/*
-%{py_sitedir}/mod_%{mod_name}
+%dir %{py_sitedir}/mod_%{mod_name}
+%attr(755,root,root) %{py_sitedir}/mod_%{mod_name}/*.so
+%{py_sitedir}/mod_%{mod_name}/*.py[co]
This page took 0.031625 seconds and 4 git commands to generate.