X-Git-Url: https://git.pld-linux.org/?p=packages%2Fapache-mod_python.git;a=blobdiff_plain;f=apache-mod_python.spec;h=d2ae2556d1f1152f0e647559cabbac2c68c44cf2;hp=44bb78616d0e58b20a06c9e0d82f72018aeeffa5;hb=5a404cd5a32db32cbc7444886c3f419988e4d1c4;hpb=7caf45e1f67b02e6237a1055aa46c12748e81a37 diff --git a/apache-mod_python.spec b/apache-mod_python.spec index 44bb786..d2ae255 100644 --- a/apache-mod_python.spec +++ b/apache-mod_python.spec @@ -1,8 +1,5 @@ - -%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 @@ -21,31 +18,35 @@ Summary(sk): Interpreter jazyka Perl pre webov 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: 3.1.3 -Release: 3 +Version: 3.2.10 +Release: 0.1 License: Apache Group License Group: Networking/Daemons Source0: http://www.apache.org/dist/httpd/modpython/mod_%{mod_name}-%{version}.tgz -# Source0-md5: 2e1983e35edd428f308b0dfeb1c23bfe +# Source0-md5: cc6439f546a6e70cfff7ca51b8c62541 Source1: %{name}.conf -Patch0: %{name}-lib64.patch +Patch0: %{name}-httpd-not-needed.patch +Patch1: %{name}-ldflags.patch URL: http://www.modpython.org/ BuildRequires: %{apxs} -BuildRequires: apache-devel >= 2.0.44 -BuildRequires: apr-devel >= 1:0.9.4-1 +BuildRequires: apache-devel >= 2.0.52-7 +BuildRequires: apr-devel >= 1:1.0.0 BuildRequires: autoconf BuildRequires: automake BuildRequires: flex >= 2.5.31 +BuildRequires: python BuildRequires: python-devel >= 2.2 BuildRequires: rpm-pythonprov -Requires(post,preun): %{apxs} -Requires: apache >= 2.0.44 +BuildRequires: rpmbuild(macros) >= 1.268 +Requires: apache(modules-api) = %apache_modules_api +Requires: apr >= 1:1.0.0 # apache.py uses pdb module Requires: python-devel-tools -%pyrequires_eq python +%requires_eq python-libs BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%define apache_moddir %(%{apxs} -q LIBEXECDIR) +%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) +%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) %description Mod_python is a module that embeds the Python language interpreter @@ -124,51 +125,43 @@ prestandan j %prep %setup -q -n mod_%{mod_name}-%{version} -%if "%{_libdir}" == "%{_prefix}/lib64" -%patch0 -%endif +%patch0 -p1 +%patch1 -p1 %build %{__aclocal} %{__autoconf} - -# new apache needs it -CFLAGS="-DEAPI %{rpmcflags}" %configure \ --with-apxs=%{apxs} - %{__make} dso %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT%{apache_moddir} \ - $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf +install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf} %{__make} install \ DESTDIR=$RPM_BUILD_ROOT -install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/60_mod_python.conf +install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/60_mod_python.conf +%py_postclean %clean rm -rf $RPM_BUILD_ROOT %post -if [ -f /var/lock/subsys/httpd ]; then - /etc/rc.d/init.d/httpd restart 1>&2 -fi +%service -q httpd restart -%preun +%postun if [ "$1" = "0" ]; then - if [ -f /var/lock/subsys/httpd ]; then - /etc/rc.d/init.d/httpd restart 1>&2 - fi + %service -q httpd restart fi %files %defattr(644,root,root,755) %doc doc-html/* README COPYRIGHT NEWS CREDITS -%{_sysconfdir}/httpd/httpd.conf/60_mod_python.conf -%attr(755,root,root) %{apache_moddir}/* +%doc examples +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf +%attr(755,root,root) %{_pkglibdir}/*.so %dir %{py_sitedir}/mod_%{mod_name} %attr(755,root,root) %{py_sitedir}/mod_%{mod_name}/*.so %{py_sitedir}/mod_%{mod_name}/*.py[co]