summaryrefslogtreecommitdiff
path: root/network/mod_chroot/mod_chroot.SlackBuild
diff options
context:
space:
mode:
authorMenno E. Duursma <druiloor@zonnet.nl>2010-05-13 00:37:12 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-13 00:37:12 +0200
commit6dd98402af4e6d95c8151aebbf92ef9a7a6fd561 (patch)
treeb6a4828867cc61e880ccb896729619ac1b7e62bd /network/mod_chroot/mod_chroot.SlackBuild
parent9bc1c57c1fe78955810a51744c30f6aa6f1582d0 (diff)
downloadslackbuilds-6dd98402af4e6d95c8151aebbf92ef9a7a6fd561.tar.gz
network/mod_chroot: Updated for version 0.5
Diffstat (limited to 'network/mod_chroot/mod_chroot.SlackBuild')
-rw-r--r--network/mod_chroot/mod_chroot.SlackBuild18
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}