aboutsummaryrefslogtreecommitdiff
path: root/clamav/clamav.SlackBuild
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2006-11-05 20:44:03 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2006-11-05 20:44:03 +0000
commitd08c6fb7f38b5afda9ea4a8a06b0b4c39116f175 (patch)
treef8a097ef4bda16249bfbd3b11807f6291f20fbfd /clamav/clamav.SlackBuild
parent6efbbee5cbe80bfe2ffeb08f76d13c227cf827fe (diff)
downloadslackbuilds-d08c6fb7f38b5afda9ea4a8a06b0b4c39116f175.tar.gz
slackbuilds-d08c6fb7f38b5afda9ea4a8a06b0b4c39116f175.tar.bz2
clamav update
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@584 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'clamav/clamav.SlackBuild')
-rwxr-xr-xclamav/clamav.SlackBuild44
1 files changed, 33 insertions, 11 deletions
diff --git a/clamav/clamav.SlackBuild b/clamav/clamav.SlackBuild
index c4af9541..2070d3db 100755
--- a/clamav/clamav.SlackBuild
+++ b/clamav/clamav.SlackBuild
@@ -4,6 +4,18 @@
# by rhatto at riseup.net
#
+if [ -s "slack-required" ]; then
+ echo Recomended and required packages for building cairo are:
+ cat slack-required | sed -e 's/^/\t/'
+ if [ "$INTERACT" != "no" ]; then
+ echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER.
+ read crap
+ else
+ echo Sleeping 3 seconds...
+ sleep 3
+ fi
+fi
+
CWD="`pwd`"
if [ -f "/etc/slackbuildrc" ]; then
@@ -16,13 +28,19 @@ fi
# default settings
PACKAGE="clamav"
-VERSION=${VERSION:=0.88.5}
+VERSION=${VERSION:=0.88.6}
ARCH=${ARCH:=i486}
BUILD=${BUILD:=1rha}
TMP=${TMP:=/tmp}
SRC_DIR=${SRC:=$CWD}
REPOS=${REPOS:=$TMP}
+# ------- error codes for createpkg --------------
+ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
+ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
+ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
+ERROR_PATCH=40
+
if ! grep -qe "^$PACKAGE:" /etc/passwd || ! grep -qe "^$PACKAGE:" /etc/group; then
echo "WARNING: user and/or group $PACKAGE does not exist"
echo "Create it manually with \"groupadd $PACKAGE ; useradd $PACKAGE -g $PACKAGE\" and run this script again."
@@ -50,16 +68,20 @@ fi
SRC_DIR="$SRC_DIR/$PACKAGE"
mkdir -p $SRC_DIR
-if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then
- wget "$URL" -O "$SRC_DIR/$SRC"
- wget "$URL.sig" -O "$SRC_DIR/$SRC.sig"
+if [ "$RTOOL" == "wget" ]; then
+ if [ ! -f "$SRC_DIR/$SRC" ]; then
+ wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
+ fi
+ if [ ! -f "$SRC_DIR/$SRC.sig" ]; then
+ wget "$URL.sig" -O "$SRC_DIR/$SRC.sig" || exit $ERROR_WGET
+ fi
fi
if [ ! -f "$SRC_DIR/$PACKAGE-key.asc" ]; then
- wget "$KEY" -O "$SRC_DIR/$PACKAGE-key.asc" && gpg --import $SRC_DIR/$PACKAGE-key.asc
+ wget "$KEY" -O "$SRC_DIR/$PACKAGE-key.asc" && gpg --import $SRC_DIR/$PACKAGE-key.asc || exit $ERROR_WGET
fi
-gpg --verify $SRC_DIR/$SRC.sig $SRC_DIR/$SRC || echo WARNING: Could not check signature or WRONG signature found.
+gpg --verify $SRC_DIR/$SRC.sig $SRC_DIR/$SRC || exit $ERROR_GPG
sleep 3
if [ "$ARCH" == "x86_64" ]; then
@@ -73,11 +95,11 @@ rm -rf $TMP
mkdir -p $TMP
cd $TMP
-tar xvf$tarflag $SRC_DIR/$PACKAGE-$VERSION.tar.$PACKAGE_EXT
+tar xvf$tarflag $SRC_DIR/$PACKAGE-$VERSION.tar.$PACKAGE_EXT || exit $ERROR_TAR
cd $PACKAGE-$VERSION
-./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR
-make || exit 32
-make DESTDIR=$TMP/package-$PACKAGE install
+./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR || exit $ERROR_CONF
+make || exit $ERROR_MAKE
+make DESTDIR=$TMP/package-$PACKAGE install || exit $ERROR_INSTALL
CWD="`pwd`"
@@ -124,7 +146,7 @@ echo '( if ! grep -qe "^clamav:" etc/passwd; then echo creating user clamav... ;
echo '( if [ ! -f "etc/clamd.conf" ]; then mv etc/clamd.conf.new etc/clamd.conf; fi )' >> install/doinst.sh
echo '( if [ ! -f "etc/freshclam.conf" ]; then mv etc/freshclam.conf.new etc/freshclam.conf; fi )' >> install/doinst.sh
-makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz
+makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG
if [ "$CLEANUP" == "yes" ]; then
rm -rf $TMP