X-Git-Url: https://git.pld-linux.org/?p=packages%2Fapache-mod_python.git;a=blobdiff_plain;f=apache-mod_python.spec;h=ebe2d49eef8b31e5020a60d0018c784d354485f8;hp=42a6bc5d0aec2de7960defe920b912a4c8e37fab;hb=79184ed7aeeb00997dc855ff6b28b978ef99c0e8;hpb=a58b005acf437a8e5c3e959141076ea4fe81bc11 diff --git a/apache-mod_python.spec b/apache-mod_python.spec index 42a6bc5..ebe2d49 100644 --- a/apache-mod_python.spec +++ b/apache-mod_python.spec @@ -1,10 +1,3 @@ - -# -# todo: -# - configuration file in /etc/httpd/httpd.conf/ _directory_ -# - -%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 @@ -17,39 +10,43 @@ 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: 3.0.1 -Release: 0.2 +Version: 3.2.10 +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}-no-compile.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: cc6439f546a6e70cfff7ca51b8c62541 +Source1: %{name}.conf +Patch0: %{name}-httpd-not-needed.patch +Patch1: %{name}-ldflags.patch URL: http://www.modpython.org/ +BuildRequires: %{apxs} +BuildRequires: apache-devel >= 2.0.52-7 +BuildRequires: apr-devel >= 1:1.0.0 BuildRequires: autoconf BuildRequires: automake -BuildRequires: apache-devel >= 2.0.44 +BuildRequires: flex >= 2.5.31 +BuildRequires: python BuildRequires: python-devel >= 2.2 BuildRequires: rpm-pythonprov -BuildRequires: %{apxs} -Prereq: %{_sbindir}/apxs -Requires: apache -%pyrequires_eq python +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 +%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 @@ -128,53 +125,43 @@ 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 +%patch0 -p1 %patch1 -p1 -%patch2 -p1 -#%patch3 -p1 -#%patch4 -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},%{py_sitedir}/mod_%{mod_name}} +install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf} -%{__make} install DESTDIR=$RPM_BUILD_ROOT +%{__make} install \ + DESTDIR=$RPM_BUILD_ROOT -%py_comp $RPM_BUILD_ROOT%{py_sitedir} -%py_ocomp $RPM_BUILD_ROOT%{py_sitedir} +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/* -%doc README COPYRIGHT NEWS CREDITS -%attr(755,root,root) %{apache_moddir}/* +%doc doc-html/* README COPYRIGHT NEWS CREDITS +%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]