From 2e214981bb60f42a0a33fbc690fbe46e85a49f51 Mon Sep 17 00:00:00 2001 From: mis Date: Wed, 7 Jun 2000 08:23:46 +0000 Subject: [PATCH] - can be build with rh-like python package Changed files: apache-mod_python.spec -> 1.4 --- apache-mod_python.spec | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/apache-mod_python.spec b/apache-mod_python.spec index a3f324c..e1b7fdb 100644 --- a/apache-mod_python.spec +++ b/apache-mod_python.spec @@ -36,12 +36,21 @@ NOTE: This versions should still be considered Beta %build python %{python_libdir}/compileall.py lib/python/mod_python/ -PTHREADS= +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 - PTHREADS=-lpthread -fi + LDFLAGS="$LDFLAGS -lpthread" +fi + cd src -/usr/sbin/apxs -I%{python_includedir} -lpython $PTHREADS -o mod_%{mod_name}.so -c mod_%{mod_name}.c +/usr/sbin/apxs -I%{python_includedir} $LDFLAGS -o mod_%{mod_name}.so -c mod_%{mod_name}.c cd .. gzip -9nf README COPYRIGHT -- 2.44.0