diff options
author | Eric Hameleers <alien@slackware.com> | 2008-02-27 20:20:56 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2008-02-27 20:20:56 +0000 |
commit | 1c5103f5a5bb9d9a8ffc046f209bc89e5cee11e1 (patch) | |
tree | 4d14219f072232d426f60947dea02be43cbe2102 /dansguardian/build | |
parent | b6c74617a94511e59fea537e0ad6cf11869cf392 (diff) | |
download | asb-1c5103f5a5bb9d9a8ffc046f209bc89e5cee11e1.tar.gz asb-1c5103f5a5bb9d9a8ffc046f209bc89e5cee11e1.tar.xz |
Oops... the previous commit was actually not meant to be
Diffstat (limited to 'dansguardian/build')
-rwxr-xr-x | dansguardian/build/dansguardian.SlackBuild | 70 |
1 files changed, 40 insertions, 30 deletions
diff --git a/dansguardian/build/dansguardian.SlackBuild b/dansguardian/build/dansguardian.SlackBuild index f9fd5a87..cf51998d 100755 --- a/dansguardian/build/dansguardian.SlackBuild +++ b/dansguardian/build/dansguardian.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh # $Id$ -# Copyright (c) 2008 Eric Hameleers <alien@slackware.com> +# Copyright (c) 2006-2008 Eric Hameleers <alien@slackware.com> # All rights reserved. # # Permission to use, copy, modify, and distribute this software for @@ -30,8 +30,12 @@ # URL: http://dansguardian.org/ # Needs: # Changelog: -# 2.9.9.3-1: 27/Feb/2008 by Eric Hameleers <alien@slackware.com> +# 2.9.7.0-1: 29/mei/2006 by Eric Hameleers <alien@slackware.com> # * Initial build. +# 2.9.7.1-1: 08/jun/2006 by Eric Hameleers <alien@slackware.com> +# * Bugfix release. +# 2.9.9.3-1: 27/Feb/2008 by Eric Hameleers <alien@slackware.com> +# * Update. # # Run 'sh dansguardian.SlackBuild --cleanup' to build a Slackware package. # The package (.tgz) plus descriptive .txt file are created in /tmp . @@ -46,9 +50,10 @@ VERSION=${VERSION:-2.9.9.3} ARCH=${ARCH:-i486} BUILD=${BUILD:-1} -# This covers most filenames you'd want as documentation. Change if needed. -DOCS="ABOUT* AUTHORS BUGS ChangeLog* COPYING CREDITS FAQ GPL* HACKING \ - LICENSE MAINTAINERS NEWS README* TODO" +DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README" + +PROXY_USR=nobody +PROXY_GRP=nobody # Where do we look for sources? CWD=$(pwd) @@ -60,7 +65,6 @@ TMP=${TMP:-/tmp/build} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -# Input URL: http://dansguardian.org/downloads/2/Beta/dansguardian-2.9.9.3.tar.gz SOURCE="$SRCDIR/${PRGNAM}-${VERSION}.tar.gz" SRCURL="http://dansguardian.org/downloads/2/Beta/${PRGNAM}-${VERSION}.tar.gz" @@ -144,23 +148,12 @@ echo "++" echo "|| $PRGNAM-$VERSION" echo "++" -# Explode the package framework: -if [ -f $SRCDIR/_$PRGNAM.tar.gz ]; then - cd $PKG - explodepkg $SRCDIR/_$PRGNAM.tar.gz - cd - -fi - cd $TMP/tmp-$PRGNAM echo "Extracting the source archive(s) for $PRGNAM..." if $(file ${SOURCE} | grep -q ": bzip2"); then tar -xjvf ${SOURCE} elif $(file ${SOURCE} | grep -q ": gzip"); then tar -xzvf ${SOURCE} -elif $(file ${SOURCE} | grep -qi ": zip"); then - unzip ${SOURCE} -elif $(file ${SOURCE} | grep -qi ": 7-zip"); then - 7za -x ${SOURCE} fi cd ${PRGNAM}-${VERSION} chown -R root:root . @@ -174,6 +167,11 @@ CFLAGS="$SLKCFLAGS" \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --localstatedir=/var \ --sysconfdir=/etc \ + --enable-pcre \ + --enable-clamd \ + --enable-email \ + --with-proxyuser=${PROXY_USR} \ + --with-proxygroup=${PROXY_GRP} \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ @@ -189,6 +187,23 @@ else make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log fi +# We'll correct this in the doinst.sh +chown root:root $PKG/var/log/dansguardian + +# Prepare the configuration files +for cf in $(find $PKG/etc/dansguardian -name *.conf) ; do + mv $cf{,.new} +done + +# Install the init script +mkdir -p $PKG/etc/rc.d +cp $SRCDIR/rc.dansguardian $PKG/etc/rc.d/ +chmod 644 $PKG/etc/rc.d/rc.dansguardian + +# Install the logrotate script +mkdir -p $PKG/etc/logrotate.d +cp $SRCDIR/logrotate.dansguardian $PKG/etc/logrotate.d/dansguardian + # Add this to the doinst.sh: ! [ -d $PKG/install ] && mkdir -p $PKG/install cat <<EOINS >> $PKG/install/doinst.sh @@ -208,39 +223,34 @@ config() { done } -# An example of how you handle your '.new' config files: -#config etc/dansguardian.conf.new +# Handle the configuration files +for cf in \`find etc/dansguardian -name *.conf.new\` +do + config \$cf +done -EOINS +# Fix permissions of the log directory: +chown ${PROXY_USR}:${PROXY_GRP} var/log/dansguardian +EOINS # Add documentation: mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true find $PKG/usr/doc -type f -exec chmod 644 {} \; -# Move incorrectly installed man pages, if any: -[ -d $PKG/usr/share/man ] && \ - mv $PKG/usr/share/man $PKG/usr/ && rmdir $PKG/usr/share || true # Compress the man page(s): if [ -d $PKG/usr/man ]; then find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \; for i in $(find $PKG/usr/man -type l -name "*.?") ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done fi -# Compress info pages and remove the package's dir file: -if [ -d $PKG/usr/info ]; then - rm -rf $PKG/usr/info/dir - gzip -9f $PKG/usr/info/*.info* -fi - # Strip binaries: 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 - - # Add a package description: mkdir -p $PKG/install cat $SRCDIR/slack-desc > $PKG/install/slack-desc |