diff options
-rw-r--r-- | system/clamav/clamav.SlackBuild | 27 | ||||
-rw-r--r-- | system/clamav/clamav.info | 6 | ||||
-rw-r--r-- | system/clamav/doinst.sh | 2 |
3 files changed, 24 insertions, 11 deletions
diff --git a/system/clamav/clamav.SlackBuild b/system/clamav/clamav.SlackBuild index cb8707ea4e18..d009572a43b3 100644 --- a/system/clamav/clamav.SlackBuild +++ b/system/clamav/clamav.SlackBuild @@ -27,7 +27,7 @@ # No additional license terms added PRGNAM=clamav -VERSION=${VERSION:-0.98.7} +VERSION=${VERSION:-0.99} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -86,18 +86,29 @@ else with_jsonc="" fi +# Some people don't have sendmail installed: don't build milter stuff +# in this case. +# This is your call, not having sendmail is *UNSUPPORTED* +if [ ! -f /usr/lib$LIBDIRSUFFIX/libmilter.a ]; then + milter="dis" + milter_cf="" +else + milter="en" + milter_cf="clamav-milter" +fi + set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +tar xvf $CWD/$PRGNAM-$VERSION.tar.?z* cd $PRGNAM-$VERSION || exit 1 chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; @@ -142,7 +153,7 @@ CXXFLAGS="$SLKCFLAGS" \ --with-user=clamav \ --with-group=clamav \ --with-dbdir=/var/lib/clamav \ - --enable-milter \ + --${milter}able-milter \ --enable-id-check \ --enable-clamdtop \ --disable-static \ @@ -154,7 +165,7 @@ make V=1 make install DESTDIR=$PKG # Prepare the config files: -for cf in clamd freshclam clamav-milter; do +for cf in clamd freshclam $milter_cf; do mv $PKG/etc/$cf.conf.sample $PKG/etc/$cf.conf.new done @@ -171,8 +182,10 @@ chmod 771 $PKG/var/lib/clamav $PKG/var/log/clamav $PKG/var/run/clamav # Fixup some ownership and permissions issues chown -R root:root $PKG chmod -R o-w $PKG -chown clamav $PKG/usr/sbin/clamav-milter -chmod 4700 $PKG/usr/sbin/clamav-milter +if [ "$milter" = "en" ]; then + chown clamav $PKG/usr/sbin/clamav-milter + chmod 4700 $PKG/usr/sbin/clamav-milter +fi chmod 0770 $PKG/var/lib/clamav touch $PKG/var/lib/clamav/main.cvd $PKG/var/lib/clamav/daily.cvd chmod 0660 $PKG/var/lib/clamav/* diff --git a/system/clamav/clamav.info b/system/clamav/clamav.info index 43654626910c..6b478947db2f 100644 --- a/system/clamav/clamav.info +++ b/system/clamav/clamav.info @@ -1,8 +1,8 @@ PRGNAM="clamav" -VERSION="0.98.7" +VERSION="0.99" HOMEPAGE="http://www.clamav.net/" -DOWNLOAD="http://downloads.sourceforge.net/clamav/clamav-0.98.7.tar.gz" -MD5SUM="157c601161da1c2d5a0e48ea1b49e067" +DOWNLOAD="http://www.clamav.net/downloads/production/clamav-0.99.tar.gz" +MD5SUM="ae79c3982761ba1815dbce17f846bab6" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/system/clamav/doinst.sh b/system/clamav/doinst.sh index 4d177d91b401..6ee0edcffc9e 100644 --- a/system/clamav/doinst.sh +++ b/system/clamav/doinst.sh @@ -27,7 +27,7 @@ preserve_perms() { preserve_perms etc/rc.d/rc.clamav.new config etc/freshclam.conf.new config etc/clamd.conf.new -config etc/clamav-milter.conf.new +[ -f etc/clamav-milter.conf.new ] && config etc/clamav-milter.conf.new config etc/logrotate.d/clamav.new # Remove new log if one is already present config var/log/clamav/clamd.log.new ; rm -f var/log/clamav/clamd.log.new |