X-Git-Url: https://git.pld-linux.org/?p=packages%2Fapache-mod_python.git;a=blobdiff_plain;f=apache-mod_python.spec;h=069363e3f8d52e4be9b9aeb3ea40a56cffee8346;hp=49be525dc15aa83fa3a1c0de1d03fa5affcda630;hb=f756415013657797fa4715a680e79707a9cd92e7;hpb=a5780fec4f88c6fc650b30646c9563a1ce572aba diff --git a/apache-mod_python.spec b/apache-mod_python.spec index 49be525..069363e 100644 --- a/apache-mod_python.spec +++ b/apache-mod_python.spec @@ -1,12 +1,14 @@ %define mod_name python Summary: A Python for the Apache Web server Name: apache-mod_%{mod_name} -Version: 2.4 +Version: 2.6.4 Release: 1 License: distributable Group: Networking/Daemons Group(pl): Sieciowe/Serwery Source: http://www.modpython.org/dist/mod_%{mod_name}-%{version}.tgz +Patch0: apache-mod_python-shared.patch +Patch1: apache-mod_python-DESTDIR.patch URL: http://www.modpython.org/ Requires: apache Requires: python @@ -22,7 +24,6 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define python_includedir %{python_prefix}/include/python%{python_version} %define python_sitedir %{python_libdir}/site-packages - %description mod_python allows embedding Python within the Apache Web server for a considerable boost in performance and added flexibility @@ -32,37 +33,21 @@ NOTE: This versions should still be considered Beta %prep %setup -q -n mod_%{mod_name}-%{version} +%patch0 -p1 +%patch1 -p1 %build -python %{python_libdir}/compileall.py lib/python/mod_python/ - -LDFLAGS= -# RH -if [ -f %{python_libdir}/config/libpython%{python_version}.a ]; then - LDFLAGS="$LDFLAGS -L%{python_libdir}/config/ -lpython%{python_version}" -# PLD -else - LDFLAGS="$LDFLAGS -lpython" -fi - -if ldd %{python_prefix}/bin/python | grep libpthread >/dev/null; then - LDFLAGS="$LDFLAGS -lpthread" -fi - -cd src -/usr/sbin/apxs -I%{python_includedir} $LDFLAGS -o mod_%{mod_name}.so -c mod_%{mod_name}.c -cd .. -gzip -9nf README COPYRIGHT +autoconf +%{configure} --with-apxs=/usr/sbin/apxs +%{__make} dso %install rm -rf $RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT{%{apache_moddir},%{python_sitedir}/mod_%{mod_name}} -install -d $RPM_BUILD_ROOT%{apache_moddir} -install src/mod_%{mod_name}.so $RPM_BUILD_ROOT%{apache_moddir} -strip --strip-unneeded $RPM_BUILD_ROOT%{apache_moddir}/* +%{__make} install DESTDIR=$RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT%{python_sitedir}/mod_%{mod_name} -install lib/python/mod_python/* $RPM_BUILD_ROOT%{python_sitedir}/mod_%{mod_name} +gzip -9nf README COPYRIGHT NEWS CREDITS %post /usr/sbin/apxs -e -a -n %{mod_name} %{apache_moddir}/mod_%{mod_name}.so 1>&2 @@ -83,7 +68,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) +%doc doc/* +%doc {README,COPYRIGHT,NEWS,CREDITS}.gz %attr(755,root,root) %{apache_moddir}/* %{python_sitedir}/mod_%{mod_name} -%doc doc/* -%doc {README,COPYRIGHT}.gz