n/mod_python: Updated for Slackware-13.0.

slackware-14.2
Damien Goutte-Gattat 13 years ago
parent 283c57c072
commit 942b98d198
  1. 11
      n/mod_python/doinst.sh
  2. 14
      n/mod_python/mod_python.SlackBuild

@ -1,11 +0,0 @@
#!/bin/sh
config()
{
NEW="$1"
OLD="`dirname $NEW`/`basename $NEW .new`"
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then
rm $NEW
fi
}

@ -31,15 +31,16 @@ ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tgz}
WGET=${WGET:-http://apache.cict.fr/httpd/modpython//$ARCHIVE}
# Build infos
NAMETGZ=${NAMETGZ:-mod_python}
BUILD=${BUILD:-2GGD}
NAMEPKG=${NAMEPKG:-mod_python}
BUILD=${BUILD:-3GGD}
ARCH=${ARCH:-i486}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
# Directories
TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMETGZ}
PKG=${PKG:-$OUT/$NAMEPKG}
CWD=$(pwd)
set -e # Quit if a command returns non-zero
@ -55,12 +56,14 @@ if [ ! -d $TMP ]; then
fi
# Compilation flags
LIBDIRSUFFIX=""
case "$ARCH" in
i?86)
CPUOPT="-O2 -march=$ARCH -mtune=i686"
;;
x86_64)
CPUOPT="-O2 -fPIC"
LIBDIRSUFFIX="64"
;;
*)
CPUOPT="-O2"
@ -85,12 +88,13 @@ CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \
./configure \
--prefix=/usr \
--libdir=/usr/lib$LIBDIRSUFFIX \
--with-apxs=/usr/sbin/apxs
make LDFLAGS="-L/usr/lib" -j $JOBS
make install DESTDIR=$PKG
# Strip binaries
find $PKG | xargs file | grep "ELF 32-bit LSB" | cut -d : -f 1 | \
find $PKG | xargs file | grep "ELF \(32\|64\)-bit LSB" | cut -d : -f 1 | \
xargs strip --strip-unneeded 2> /dev/null
# Install the documentation
@ -108,7 +112,7 @@ cd $PKG
mkdir -p $OUT
PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMETGZ-$VERSION-$ARCH-$BUILD.tgz
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT
rm -rf $PKG
rm -rf $TMP/$NAME
"

Loading…
Cancel
Save