X-Git-Url: https://git.pld-linux.org/?p=packages%2Fapache-mod_python.git;a=blobdiff_plain;f=apache-mod_python.spec;h=c66df8eef0314435a881d8aedd29f7aba4240e08;hp=fdfa1c588c20d7f752941f150fa3fb433ae0939f;hb=a29569d5f4ca73c66c839f24817fa5d8aa48be3d;hpb=1ff1b58064c173a0dfc8713f53974a6f82d0332b diff --git a/apache-mod_python.spec b/apache-mod_python.spec index fdfa1c5..c66df8e 100644 --- a/apache-mod_python.spec +++ b/apache-mod_python.spec @@ -19,7 +19,7 @@ Summary(sl): Vklju Summary(sv): En inbyggd Python-interpretator för webbservern Apache Name: apache-mod_%{mod_name} Version: 3.1.4 -Release: 1 +Release: 5 License: Apache Group License Group: Networking/Daemons Source0: http://www.apache.org/dist/httpd/modpython/mod_%{mod_name}-%{version}.tgz @@ -28,9 +28,9 @@ Source1: %{name}.conf Patch0: %{name}-lib64.patch Patch1: %{name}-apr-status-is-success.patch Patch2: %{name}-httpd-not-needed.patch +Patch3: %{name}-ldflags.patch URL: http://www.modpython.org/ BuildRequires: %{apxs} -#BuildRequires: apache >= 2.0.44 BuildRequires: apache-devel >= 2.0.52-7 BuildRequires: apr-devel >= 1:1.0.0 BuildRequires: autoconf @@ -38,16 +38,17 @@ BuildRequires: automake BuildRequires: flex >= 2.5.31 BuildRequires: python BuildRequires: python-devel >= 2.2 -Requires(post,preun): %{apxs} -Requires: apache >= 2.0.52-7 +BuildRequires: rpm-pythonprov +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 _sysconfdir %(%{apxs} -q SYSCONFDIR) -%define _pkglibdir %(%{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 @@ -131,47 +132,41 @@ prestandan j %endif %patch1 -p1 %patch2 -p1 +%patch3 -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%{_pkglibdir} \ - $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf +install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf} %{__make} install \ DESTDIR=$RPM_BUILD_ROOT 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 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.conf/60_mod_python.conf +%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