diff options
author | Menno E. Duursma | 2010-05-11 15:01:31 +0200 |
---|---|---|
committer | Robby Workman | 2010-05-11 15:01:31 +0200 |
commit | ba122a081aee861e68809372b535a5c92cfa5b80 (patch) | |
tree | dbd0b778a312e1c342f21d0a648c713ea65522ef /network/mod_hosts_access/mod_hosts_access.SlackBuild | |
parent | 4c82c26e60d40fdb758b9b64b94f6c29007a1555 (diff) | |
download | slackbuilds-ba122a081aee861e68809372b535a5c92cfa5b80.tar.gz |
network/mod_hosts_access: Initial import
Diffstat (limited to 'network/mod_hosts_access/mod_hosts_access.SlackBuild')
-rw-r--r-- | network/mod_hosts_access/mod_hosts_access.SlackBuild | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/network/mod_hosts_access/mod_hosts_access.SlackBuild b/network/mod_hosts_access/mod_hosts_access.SlackBuild new file mode 100644 index 0000000000..9aee005834 --- /dev/null +++ b/network/mod_hosts_access/mod_hosts_access.SlackBuild @@ -0,0 +1,71 @@ +#!/bin/sh + +# Slackware build script for mod_hosts_access (libwrap support in Apache) +# Written by Menno E. Duursma + +PRGNAM=mod_hosts_access +VERSION=1.1.0 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +CWD=`pwd` +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +fi + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1 +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R a-s,u+w,go+r-w . + +if [ ! -z CFLAGS ]; then + CFLAGS_OLD="${CFLAGS}" + CFLAGS="$SLKCFLAGS" +else + CFLAGS_WASSET=no + export CFLAGS +fi + +# Compile module as DSO (dynmically shared object) +apxs -ca mod_hosts_access.c -lwrap -lnsl + +# Restore compiler flags +if [ -z CFLAGS_WASSET ]; then + unset CFLAGS +else + CFLAGS="${CFLAGS_OLD}" +fi + +# Strip binary +strip mod_hosts_access.so + +# Create target dir, copy module into place +mkdir -p $PKG/usr/libexec/apache +cp mod_hosts_access.so $PKG/usr/libexec/apache + +# Copy program documentation into the package, including this script +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a [A-Z]* $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz + +# Clean up the extra stuff +if [ "$1" = "--cleanup" ]; then + rm -rf $TMP/$PRGNAM-$VERSION + rm -rf $PKG +fi |