diff options
Diffstat (limited to 'system/clamav/clamav.SlackBuild')
-rw-r--r-- | system/clamav/clamav.SlackBuild | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/system/clamav/clamav.SlackBuild b/system/clamav/clamav.SlackBuild index cb8707ea4e..d009572a43 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/* |