summaryrefslogtreecommitdiffstats
path: root/antivirus
diff options
context:
space:
mode:
authorVlad Glagolev2012-03-07 18:58:53 +0400
committerVlad Glagolev2012-03-07 18:58:53 +0400
commit486b87cae8e5cf7917914c3f08fd8dc5dd70bf98 (patch)
tree902069f63626a75e3d7e587f2be90c528a130183 /antivirus
parent666e2113f9d0e803d88c716553cee13f5bc51559 (diff)
clamav: corrected pidfile dir
Diffstat (limited to 'antivirus')
-rwxr-xr-xantivirus/clamav/BUILD3
-rwxr-xr-xantivirus/clamav/DEPENDS5
-rwxr-xr-xantivirus/clamav/DETAILS9
-rwxr-xr-xantivirus/clamav/FINAL11
-rw-r--r--antivirus/clamav/HISTORY10
-rwxr-xr-xantivirus/clamav/INSTALL3
-rwxr-xr-xantivirus/clamav/PRE_BUILD9
-rwxr-xr-xantivirus/clamav/init.d/freshclam5
8 files changed, 30 insertions, 25 deletions
diff --git a/antivirus/clamav/BUILD b/antivirus/clamav/BUILD
index 9dd0fcff1d..8be896f4cb 100755
--- a/antivirus/clamav/BUILD
+++ b/antivirus/clamav/BUILD
@@ -1,2 +1,5 @@
+create_account clamav &&
+
OPTS="${CLAM_EXP} $OPTS" &&
+
default_build
diff --git a/antivirus/clamav/DEPENDS b/antivirus/clamav/DEPENDS
index e0845a2565..381c07b3b7 100755
--- a/antivirus/clamav/DEPENDS
+++ b/antivirus/clamav/DEPENDS
@@ -1,5 +1,5 @@
depends -sub CXX gcc &&
-depends zlib &&
+depends zlib &&
optional_depends bzip2 "--enable-bzip2" \
"--disable-bzip2" \
"for bzip2 support" &&
@@ -12,5 +12,4 @@ optional_depends gmp "--enable-dsig" \
"--disable-dsig" \
"for digital signature support" &&
-optional_depends SYSTEM-LOGGER "" "" "to log activity"
-
+optional_depends SYSTEM-LOGGER "" "" "to log activity"
diff --git a/antivirus/clamav/DETAILS b/antivirus/clamav/DETAILS
index 30311fbbd4..771c7266a4 100755
--- a/antivirus/clamav/DETAILS
+++ b/antivirus/clamav/DETAILS
@@ -1,10 +1,11 @@
SPELL=clamav
VERSION=0.97.3
+ PATCHLEVEL=1
SOURCE=$SPELL-$VERSION.tar.gz
- SOURCE2=$SPELL-$VERSION.tar.gz.sig
- SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-${VERSION//-/}
- SOURCE_URL=$SOURCEFORGE_URL/$SPELL/$SOURCE
- SOURCE2_URL=$SOURCEFORGE_URL/$SPELL/$SOURCE2
+ SOURCE2=$SOURCE.sig
+ SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-${VERSION//-/}"
+ SOURCE_URL=$SOURCEFORGE_URL/$SPELL/$SOURCE
+ SOURCE2_URL=$SOURCE_URL.sig
SOURCE2_IGNORE=signature
SOURCE_GPG=vendor_clamav.gpg:$SOURCE2:UPSTREAM_KEY
WEB_SITE=http://www.clamav.net
diff --git a/antivirus/clamav/FINAL b/antivirus/clamav/FINAL
index 23b347f559..0a134a2295 100755
--- a/antivirus/clamav/FINAL
+++ b/antivirus/clamav/FINAL
@@ -1,10 +1,5 @@
-
-for LOG in /var/log/clam-update.log /var/log/clamd.log;do
- touch $LOG
- chown clamav $LOG
- chmod 600 $LOG
-done
-echo -e "\033[1mThis is a test of the virus scanner\033[0m"
+message "This is a test of the virus scanner:" &&
clamscan -r -i $SOURCE_DIRECTORY/test
-echo -e "\033[1mTest complete\033[0m"
+message "Test complete." &&
+
ldconfig
diff --git a/antivirus/clamav/HISTORY b/antivirus/clamav/HISTORY
index c716977a9a..88a0c647d5 100644
--- a/antivirus/clamav/HISTORY
+++ b/antivirus/clamav/HISTORY
@@ -1,3 +1,13 @@
+2012-03-07 Vlad Glagolev <stealth@sourcemage.org>
+ * DETAILS: PATCHLEVEL++; quoting paths; optimized variables
+ * DEPENDS: removed <tab>s
+ * BUILD: create clamav system account here
+ * PRE_BUILD: removed
+ * INSTALL: added, to install run dir
+ * FINAL: don't do anything for SA
+ (see 31fd01824fc63c45617e1a300c3265adcf9448ee)
+ * init.d/freshclam: use default pid file inplace
+
2011-10-18 Treeve Jelbert <treeve@sourcemage.org>
* DETAILS: version 0.97.3
diff --git a/antivirus/clamav/INSTALL b/antivirus/clamav/INSTALL
new file mode 100755
index 0000000000..8b6b33e03b
--- /dev/null
+++ b/antivirus/clamav/INSTALL
@@ -0,0 +1,3 @@
+default_install &&
+
+install -vm 755 -d -o clamav -g clamav "$INSTALL_ROOT/var/run/clamav"
diff --git a/antivirus/clamav/PRE_BUILD b/antivirus/clamav/PRE_BUILD
deleted file mode 100755
index 008c750585..0000000000
--- a/antivirus/clamav/PRE_BUILD
+++ /dev/null
@@ -1,9 +0,0 @@
-create_account clamav &&
-
-# use the following command to recreate ./clam.gpg
-#gpg --no-default-keyring --keyring ./clam.gpg --keyserver \
-#hkp://subkeys.pgp.net --recv-keys 985A444B
-
-#gpg --keyring $SCRIPT_DIRECTORY/clam.gpg \
-# --verify $SOURCE_CACHE/$SOURCE2 &&
-default_pre_build
diff --git a/antivirus/clamav/init.d/freshclam b/antivirus/clamav/init.d/freshclam
index 2722569e94..8fac2a4157 100755
--- a/antivirus/clamav/init.d/freshclam
+++ b/antivirus/clamav/init.d/freshclam
@@ -1,6 +1,9 @@
#!/bin/bash
+
PROGRAM=/usr/bin/freshclam
+PIDFILE="/var/run/clamav/freshclam.pid"
+ARGS="-d --pid=$PIDFILE"
RUNLEVEL=3
NEEDS="+network"
-ARGS="-d"
+
. /etc/init.d/smgl_init