diff options
author | Richard Scott Smith <pilbender@gmail.com> | 2010-05-13 01:01:07 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-13 01:01:07 +0200 |
commit | 720ef9f1923db7e4151335b6bd1b27a8afd5f274 (patch) | |
tree | 3f715dedb3eb744728aa67007862a0d96c211f1f /system/samhain/samhain.SlackBuild | |
parent | e2e6713f8cb15fc6fe7bde7ee06e68a72ea67c31 (diff) | |
download | slackbuilds-720ef9f1923db7e4151335b6bd1b27a8afd5f274.tar.gz |
system/samhain: Added to 13.0 repository
Diffstat (limited to 'system/samhain/samhain.SlackBuild')
-rw-r--r-- | system/samhain/samhain.SlackBuild | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/system/samhain/samhain.SlackBuild b/system/samhain/samhain.SlackBuild new file mode 100644 index 0000000000..537714add8 --- /dev/null +++ b/system/samhain/samhain.SlackBuild @@ -0,0 +1,105 @@ +#!/bin/sh + +# Slackware build script for samhain + +# Copyright 2009 Richard Scott smith <pilbender@gmail.com> +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=samhain +VERSION=2.6.1b +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${OUTPUT:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +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 + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -f $PRGNAM-$VERSION.tar.gz{,.asc} +tar xf $CWD/$PRGNAM-current.tar.gz +rm -rf $PRGNAM-$VERSION +tar xvf $PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +# Don't clobber the config file +mv $PKG/etc/samhainrc $PKG/etc/samhainrc.new + +# No need for /var/log and /var/run directories here +rmdir $PKG/var/{log,run} + +# Stripping does not seem to work for 32 bit builds. Commenting it out +# until I can find a reason or answer. Richard Scott Smith, 1-3-2010 +#( cd $PKG +# find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ +# xargs strip --strip-unneeded 2> /dev/null || true +# find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ +# xargs strip --strip-unneeded 2> /dev/null || true +#) + +( cd $PKG/usr/man + find . -type f -exec gzip -9 {} \; + for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done +) + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a COPYING LICENSE README \ + $PKG/usr/doc/$PRGNAM-$VERSION +find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \; +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |