summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorrecht <recht>2004-02-02 00:00:48 +0000
committerrecht <recht>2004-02-02 00:00:48 +0000
commit2dc6b51257e6c752ef1ca1dd8022f150bbf34e8e (patch)
tree864f1fc702b3e2abfc8f702e0a900c84b3e03df3 /mail
parenta4032967d9fa6d2ffb3e172c7216a4563669d70f (diff)
downloadpkgsrc-2dc6b51257e6c752ef1ca1dd8022f150bbf34e8e.tar.gz
Add clamd rc start script.
Somewhat based upon PR 24294 by Eric Schnoebelen. While at it also fix configure to always install the example config file to "examples". Bump PKGREVISION to 1.
Diffstat (limited to 'mail')
-rw-r--r--mail/clamav/Makefile4
-rw-r--r--mail/clamav/PLIST3
-rw-r--r--mail/clamav/distinfo4
-rw-r--r--mail/clamav/files/clamd.sh52
-rw-r--r--mail/clamav/patches/patch-aa19
5 files changed, 73 insertions, 9 deletions
diff --git a/mail/clamav/Makefile b/mail/clamav/Makefile
index 7fc8d3b7bd1..ce0e637a1b8 100644
--- a/mail/clamav/Makefile
+++ b/mail/clamav/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.8 2004/01/29 17:14:16 cube Exp $
+# $NetBSD: Makefile,v 1.9 2004/02/02 00:00:48 recht Exp $
DISTNAME= clamav-0.65
+PKGREVISION= 1
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=clamav/}
@@ -22,6 +23,7 @@ CONFIGURE_ARGS+= --with-group=${CLAMAV_GROUP}
BUILD_DEFS+= CLAMAV_USER CLAMAV_GROUP USE_MILTER
+RCD_SCRIPTS= clamd
PKG_GROUPS+= ${CLAMAV_GROUP}
PKG_USERS+= ${CLAMAV_USER}:${CLAMAV_GROUP}::Clamav\\ User
diff --git a/mail/clamav/PLIST b/mail/clamav/PLIST
index a6f436ac8d0..f974ba3d9f2 100644
--- a/mail/clamav/PLIST
+++ b/mail/clamav/PLIST
@@ -1,8 +1,9 @@
-@comment $NetBSD: PLIST,v 1.5 2004/01/29 17:14:16 cube Exp $
+@comment $NetBSD: PLIST,v 1.6 2004/02/02 00:00:48 recht Exp $
bin/clamdscan
bin/clamscan
bin/freshclam
bin/sigtool
+etc/rc.d/clamd
include/clamav.h
lib/libclamav.a
lib/libclamav.la
diff --git a/mail/clamav/distinfo b/mail/clamav/distinfo
index 3bcf2fc1fde..93f0d848f88 100644
--- a/mail/clamav/distinfo
+++ b/mail/clamav/distinfo
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.5 2004/01/29 17:14:16 cube Exp $
+$NetBSD: distinfo,v 1.6 2004/02/02 00:00:48 recht Exp $
SHA1 (clamav-0.65.tar.gz) = 15cfd1f736d01d3039de87eaf1167b119b100bf0
Size (clamav-0.65.tar.gz) = 1438425 bytes
-SHA1 (patch-aa) = fb71cea4fde55a39744acd57a9ddac343a436871
+SHA1 (patch-aa) = b13503c4073df21532d9ce64924d88123b116c3f
SHA1 (patch-ab) = 0d1ef00c0c1c64642461e353f7e4ed7f81e3a042
SHA1 (patch-ac) = 920297ccb7659c7e70e9ae1b657059066b962310
SHA1 (patch-ad) = eb593a2ab4d587e62e61e88ab9a6ca64799afea6
diff --git a/mail/clamav/files/clamd.sh b/mail/clamav/files/clamd.sh
new file mode 100644
index 00000000000..be5630a752d
--- /dev/null
+++ b/mail/clamav/files/clamd.sh
@@ -0,0 +1,52 @@
+#!/bin/sh
+#
+# $NetBSD: clamd.sh,v 1.1 2004/02/02 00:00:48 recht Exp $
+#
+# clamd does anti-virus checking.
+#
+## only for NetBSD
+# PROVIDE: clamd
+# REQUIRE: LOGIN
+## only because it might be used by mimedefang
+# BEFORE: mail
+# KEYWORD: shutdown
+##
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin:@PREFIX@/sbin:@PREFIX@/bin
+export PATH
+
+if [ -f /etc/rc.subr ]
+then
+ . /etc/rc.subr
+fi
+
+name="clamd"
+rcvar=$name
+required_files="@PKG_SYSCONFDIR@/clamav.conf"
+command="@PREFIX@/sbin/${name}"
+pidfile=$(@AWK@ '/^#/ {next}; /PidFile/ {print $2}' ${required_files})
+socket=$(@AWK@ '/^#/ {next}; /LocalSocket/ {print $2}' ${required_files})
+clamd_user=$(@AWK@ '/^#/ {next}; /User/ {print $2}' ${required_files})
+
+start_precmd="clamd_precmd"
+stop_postcmd="clamd_postcmd"
+
+clamd_precmd()
+{
+ @TOUCH@ ${pidfile}
+ @CHOWN@ ${clamd_user} ${pidfile}
+}
+
+clamd_postcmd()
+{
+ if [ -f "${pidfile}" ]; then
+ @RM@ -f ${pidfile}
+ fi
+
+ if [ -e "${socket}" ]; then
+ @RM@ -f ${socket}
+ fi
+}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/mail/clamav/patches/patch-aa b/mail/clamav/patches/patch-aa
index e13e63c2041..88d3ed8aa68 100644
--- a/mail/clamav/patches/patch-aa
+++ b/mail/clamav/patches/patch-aa
@@ -1,8 +1,8 @@
-$NetBSD: patch-aa,v 1.5 2004/01/29 17:14:16 cube Exp $
+$NetBSD: patch-aa,v 1.6 2004/02/02 00:00:48 recht Exp $
---- configure.in.orig Wed Nov 12 02:27:29 2003
-+++ configure.in
-@@ -74,12 +74,15 @@ then
+--- configure.in.orig 2003-11-12 02:27:29.000000000 +0100
++++ configure.in 2004-02-02 00:03:11.000000000 +0100
+@@ -74,12 +74,15 @@
AC_CHECK_LIB(bz2, bzReadOpen, AC_DEFINE(NOBZ2PREFIX),)
fi
@@ -22,7 +22,16 @@ $NetBSD: patch-aa,v 1.5 2004/01/29 17:14:16 cube Exp $
want_dsig="yes"
AC_ARG_ENABLE(dsig,
-@@ -271,8 +274,12 @@ openbsd*)
+@@ -193,7 +196,7 @@
+ AC_DEFINE_UNQUOTED(CONFDIR,"$cfg_dir",)
+
+ dnl Do not overwrite the current config file
+-AM_CONDITIONAL(INSTALL_CONF, test ! -r "$cfg_dir/clamav.conf")
++AM_CONDITIONAL(INSTALL_CONF, test "yes" = "yes")
+
+ if test "$test_urandom" = "yes"
+ then
+@@ -271,8 +274,12 @@
AC_DEFINE(C_BSD)
;;
netbsd*)