diff options
author | Menno E. Duursma <druiloor@zonnet.nl> | 2010-05-11 22:54:54 +0200 |
---|---|---|
committer | David Somero <xgizzmo@slackbuilds.org> | 2010-05-11 22:54:54 +0200 |
commit | ea78ddeb3707c2cf2e12687ca2b9b527fc654367 (patch) | |
tree | a03acbc30f4219778fc39dda766ec5d4f1b4217c /network/mod_chroot/mod_chroot.SlackBuild | |
parent | ee86ce5db70c1c34463d5d057afe546995e88f4a (diff) |
network/mod_chroot: Added to 12.1 repository
Diffstat (limited to 'network/mod_chroot/mod_chroot.SlackBuild')
-rw-r--r-- | network/mod_chroot/mod_chroot.SlackBuild | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/network/mod_chroot/mod_chroot.SlackBuild b/network/mod_chroot/mod_chroot.SlackBuild new file mode 100644 index 000000000000..5ef4c197c72a --- /dev/null +++ b/network/mod_chroot/mod_chroot.SlackBuild @@ -0,0 +1,69 @@ +#!/bin/sh + +# Slackware build script for mod_chroot +# Written by Menno E. Duursma <druiloor@zonnet.nl> + +# This program is free software. It comes without any warranty. +# Granted WTFPL, Version 2, as published by Sam Hocevar. See +# http://sam.zoy.org/wtfpl/COPYING for more details. + +PRGNAM=mod_chroot +VERSION=${VERSION:-0.5} +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} # Drop the package in /tmp + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +fi + +set -e # Exit on most errors + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +# Create destdir +mkdir -p $PKG/usr/lib/httpd/modules + +# Build +CFLAGS="$SLKCFLAGS" \ +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 + +# Create initial environment +mkdir -p $PKG/var/chroot/httpd/{srv,var/run/httpd,var/www} + +# Documentiation +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a [A-Z][A-Z]* $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README$TAG + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +# 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 |