diff options
Diffstat (limited to 'network/mod_chroot/mod_chroot.SlackBuild')
-rw-r--r-- | network/mod_chroot/mod_chroot.SlackBuild | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/network/mod_chroot/mod_chroot.SlackBuild b/network/mod_chroot/mod_chroot.SlackBuild index 5ef4c197c7..3808faf7fb 100644 --- a/network/mod_chroot/mod_chroot.SlackBuild +++ b/network/mod_chroot/mod_chroot.SlackBuild @@ -16,14 +16,17 @@ TAG=${TAG:-_SBo} CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM -OUTPUT=${OUTPUT:-/tmp} # Drop the package in /tmp +OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" fi set -e # Exit on most errors @@ -42,7 +45,7 @@ find . \ -exec chmod 644 {} \; # Create destdir -mkdir -p $PKG/usr/lib/httpd/modules +mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/httpd/modules # Build CFLAGS="$SLKCFLAGS" \ @@ -50,11 +53,16 @@ CXXFLAGS="$SLKCFLAGS" \ apxs -ca mod_chroot.c # Copy into place, and strip -install --mode=755 --strip .libs/mod_chroot.so $PKG/usr/lib/httpd/modules +install --mode=755 --strip .libs/mod_chroot.so $PKG/usr/lib${LIBDIRSUFFIX}/httpd/modules # Create initial environment mkdir -p $PKG/var/chroot/httpd/{srv,var/run/httpd,var/www} +# Install a sample mod_chroot.conf file +mkdir -p $PKG/etc/httpd/ +sed "s%@baselibdir@%lib${LIBDIRSUFFIX}%" $CWD/mod_chroot.conf > \ + $PKG/etc/httpd/mod_chroot.conf.new + # Documentiation mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a [A-Z][A-Z]* $PKG/usr/doc/$PRGNAM-$VERSION @@ -63,7 +71,7 @@ cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README$TAG mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh -# Make the package; be sure to leave it in $OUTPUT cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |