diff options
Diffstat (limited to 'extra/clamav')
-rw-r--r-- | extra/clamav/APKBUILD | 72 | ||||
-rw-r--r-- | extra/clamav/clamav-0.95.1-nls.patch | 11 | ||||
-rw-r--r-- | extra/clamav/clamav.logrotate | 15 | ||||
-rw-r--r-- | extra/clamav/clamav.post-install | 3 | ||||
-rw-r--r-- | extra/clamav/clamav.pre-install | 4 | ||||
-rw-r--r-- | extra/clamav/clamav.pre-upgrade | 16 | ||||
-rw-r--r-- | extra/clamav/clamd.confd | 6 | ||||
-rw-r--r-- | extra/clamav/clamd.initd | 56 | ||||
-rw-r--r-- | extra/clamav/freshclam.confd | 3 | ||||
-rw-r--r-- | extra/clamav/freshclam.initd | 58 |
10 files changed, 0 insertions, 244 deletions
diff --git a/extra/clamav/APKBUILD b/extra/clamav/APKBUILD deleted file mode 100644 index a4daebc2ff..0000000000 --- a/extra/clamav/APKBUILD +++ /dev/null @@ -1,72 +0,0 @@ -# Contributor: Carlo Landmeter <clandmeter at gmail> -# Maintainer: Carlo Landmeter <clandmeter at gmail> -pkgname=clamav -pkgver=0.95.2 -pkgrel=0 -pkgdesc="An anti-virus toolkit for UNIX" -url="http://www.clamav.net/" -license="GPL" -depends="logrotate" -install="$pkgname.pre-install $pkgname.post-install $pkgname.pre-upgrade" -makedepends="ncurses-dev zlib-dev" -subpackages="$pkgname-doc $pkgname-dev" -source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz - clamd.initd - clamd.confd - freshclam.initd - freshclam.confd - clamav-0.95.1-nls.patch - clamav.logrotate - $install" - -build() { - cd "$srcdir/$pkgname-$pkgver" - - patch -p0 -i "$srcdir/clamav-0.95.1-nls.patch" || return 1 - - ./configure --prefix=/usr \ - --sysconfdir=/etc/clamav \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info \ - --without-iconv - make || return 1 - make DESTDIR="$pkgdir" install - - # Change /etc/clamd.conf to be usable out of the box - sed -i -e "s:^\(Example\):\# \1:" \ - -e "s:.*\(PidFile\) .*:\1 /var/run/clamav/clamd.pid:" \ - -e "s:.*\(LocalSocket\) .*:\1 /var/run/clamav/clamd.sock:" \ - -e "s:.*\(User\) .*:\1 clamav:" \ - -e "s:^\#\(LogFile\) .*:\1 /var/log/clamav/clamd.log:" \ - -e "s:^\#\(LogTime\).*:\1 yes:" \ - -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \ - "$pkgdir"/etc/clamav/clamd.conf - - # Do the same for /etc/freshclam.conf - sed -i -e "s:^\(Example\):\# \1:" \ - -e "s:.*\(PidFile\) .*:\1 /var/run/clamav/freshclam.pid:" \ - -e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \ - -e "s:^\#\(UpdateLogFile\) .*:\1 /var/log/clamav/freshclam.log:" \ - -e "s:^\#\(NotifyClamd\).*:\1 /etc/clamav/clamd.conf:" \ - -e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \ - -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \ - "$pkgdir"/etc/clamav/freshclam.conf - - install -m755 -D "$srcdir"/clamd.initd "$pkgdir"/etc/init.d/clamd - install -m644 -D "$srcdir"/clamd.confd "$pkgdir"/etc/conf.d/clamd - install -m755 -D "$srcdir"/freshclam.initd "$pkgdir"/etc/init.d/freshclam - install -m644 -D "$srcdir"/freshclam.confd "$pkgdir"/etc/conf.d/freshclam - install -m644 -D "$srcdir"/clamav.logrotate "$pkgdir"/etc/logrotate.d/clamav - mkdir -p "$pkgdir"/var/run/clamav "$pkgdir"/var/log/clamav -} - -md5sums="930362397d30e01ba81b5f24c1046d48 clamav-0.95.2.tar.gz -adbbfa835f9dea213289719d983f1600 clamd.initd -567bc32b657dd7031b9b7beaa946203a clamd.confd -f43b987a0c37e6576face04a830263ac freshclam.initd -e48466ddfb56f66c623b83e58777b778 freshclam.confd -0d08fd29656bd4b018ecf8ce9706ac55 clamav-0.95.1-nls.patch -dffa5af2e7a563fc00fcd52ec4c02347 clamav.logrotate -275e05587e2da782781829a1862d57b1 clamav.pre-install -ec4d600097a15e64dfb714e7739a1804 clamav.post-install -c9e80578c6e82d6154bc91f18dfd23ea clamav.pre-upgrade" diff --git a/extra/clamav/clamav-0.95.1-nls.patch b/extra/clamav/clamav-0.95.1-nls.patch deleted file mode 100644 index 82ae88f576..0000000000 --- a/extra/clamav/clamav-0.95.1-nls.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- shared/output.c-orig 2009-04-04 10:17:42 +0000 -+++ shared/output.c 2009-04-04 10:18:30 +0000 -@@ -67,7 +67,7 @@ - pthread_mutex_t logg_mutex = PTHREAD_MUTEX_INITIALIZER; - #endif - --#ifdef C_LINUX -+#if defined(C_LINUX) && defined(HAVE_LIBINTL_H) - #include <libintl.h> - #include <locale.h> - diff --git a/extra/clamav/clamav.logrotate b/extra/clamav/clamav.logrotate deleted file mode 100644 index 7574428413..0000000000 --- a/extra/clamav/clamav.logrotate +++ /dev/null @@ -1,15 +0,0 @@ -/var/log/clamav/clamd.log { - missingok - postrotate - /etc/init.d/clamd logfix - /bin/kill -HUP `cat /var/run/clamav/clamd.pid 2> /dev/null` 2>/dev/null || true - endscript -} - -/var/log/clamav/freshclam.log { - missingok - postrotate - /etc/init.d/freshclam logfix - /bin/kill -HUP `cat /var/run/clamav/freshclam.pid 2> /dev/null` 2>/dev/null || true - endscript -} diff --git a/extra/clamav/clamav.post-install b/extra/clamav/clamav.post-install deleted file mode 100644 index 4930206101..0000000000 --- a/extra/clamav/clamav.post-install +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -chown -R clamav:clamav /usr/share/clamav /var/run/clamav /var/log/clamav diff --git a/extra/clamav/clamav.pre-install b/extra/clamav/clamav.pre-install deleted file mode 100644 index 59ac60a44d..0000000000 --- a/extra/clamav/clamav.pre-install +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -adduser -H -s /bin/false -D clamav 2>/dev/null -exit 0 diff --git a/extra/clamav/clamav.pre-upgrade b/extra/clamav/clamav.pre-upgrade deleted file mode 100644 index 9956f95d63..0000000000 --- a/extra/clamav/clamav.pre-upgrade +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -# make sure we don't lose our config -mkdir -p /etc/clamav -if [ -f /etc/clamav.conf ]; then - mv /etc/clamav.conf /etc/clamav/ - ln -s clamav/clamav.conf /etc/clamav.conf -fi - -if [ -f /etc/freshclam.conf ]; then - mv /etc/freshclam.conf /etc/clamav/ - ln -s clamav/freshclam.conf /etc/freshclam.conf -fi - -exit 0 - diff --git a/extra/clamav/clamd.confd b/extra/clamav/clamd.confd deleted file mode 100644 index bc8072aead..0000000000 --- a/extra/clamav/clamd.confd +++ /dev/null @@ -1,6 +0,0 @@ - -CLAMD_NICELEVEL=0 - -# make sure we also start freshclam -# comment out if you dont want start freshclam -rc_need="freshclam" diff --git a/extra/clamav/clamd.initd b/extra/clamav/clamd.initd deleted file mode 100644 index d3b9155572..0000000000 --- a/extra/clamav/clamd.initd +++ /dev/null @@ -1,56 +0,0 @@ -#!/sbin/runscript - -opts="logfix reload" -NAME=clamd -CONF=/etc/clamav/clamd.conf - -depend() { - need net - provide antivirus -} - -start() { - local clamd_socket=$(awk '$1 == "LocalSocket" { print $2 }' $CONF) - - logfix - - if [ -S "${clamd_socket:=/tmp/clamd}" ]; then - rm -f ${clamd_socket} - fi - ebegin "Starting ${NAME}" - start-stop-daemon --start --quiet \ - --nicelevel ${CLAMD_NICELEVEL:-0} \ - --exec /usr/sbin/clamd - eend $? "Failed to start ${NAME}" -} - -stop() { - ebegin "Stopping ${NAME}" - start-stop-daemon --stop --quiet --exec /usr/sbin/clamd - eend $? -} - -reload() { - ebegin "Reloading ${NAME}" - if ! service_started "${NAME}" ; then - eend 1 "${NAME} is not started" - return 1 - fi - start-stop-daemon --stop --oknodo --signal HUP \ - --exec /usr/sbin/clamd - eend $? -} - -logfix() { - # fix clamd log permissions - # (might be clobbered by logrotate or something) - local logfile=`awk '$1 == "LogFile" { print $2 }' $CONF` - local clamav_user=`awk '$1 == "User" { print $2 }' $CONF` - if [ -n "${logfile}" ] && [ -n "${clamav_user}" ]; then - if [ ! -f "${logfile}" ]; then - touch ${logfile} - fi - chown ${clamav_user} ${logfile} - chmod 640 ${logfile} - fi -} diff --git a/extra/clamav/freshclam.confd b/extra/clamav/freshclam.confd deleted file mode 100644 index 17559037da..0000000000 --- a/extra/clamav/freshclam.confd +++ /dev/null @@ -1,3 +0,0 @@ - -FRESHCLAM_NICELEVEL=0 - diff --git a/extra/clamav/freshclam.initd b/extra/clamav/freshclam.initd deleted file mode 100644 index 7961c7f807..0000000000 --- a/extra/clamav/freshclam.initd +++ /dev/null @@ -1,58 +0,0 @@ -#!/sbin/runscript - -opts="logfix reload" - -NAME=freshclam -DAEMON=/usr/bin/$NAME -CONF=/etc/clamav/freshclam.conf - -depend() { - need net -} - -start() { - ebegin "Starting freshclam" - start-stop-daemon --start --quiet \ - --nicelevel ${FRESHCLAM_NICELEVEL:-0} \ - --exec /usr/bin/freshclam -- -d - retcode=$? - if [ ${retcode} = 1 ]; then - eend 0 - einfo "Virus databases are already up to date." - else - eend ${retcode} "Failed to start freshclam" - fi -} - -stop() { - ebegin "Stopping ${NAME}" - start-stop-daemon --stop --quiet --name ${NAME} - eend $? -} - -reload() { - ebegin "Reloading ${NAME}" - if ! service_started "${NAME}" ; then - eend 1 "${NAME} is not started" - return 1 - fi - start-stop-daemon --stop --oknodo --signal HUP \ - --exec ${DAEMON} --name $NAME - eend $? -} - - -logfix() { - # fix freshclam log permissions - # (might be clobbered by logrotate or something) - logfile=$(awk '$1 == "UpdateLogFile" { print $2 }' $CONF) - local freshclam_user=$(awk '$1 == "DatabaseOwner" { print $2 }' $CONF) - if [ -n "${logfile}" -a -n "${clamav_user}" ]; then - if [ ! -f "${logfile}" ]; then - touch ${logfile} - fi - chown ${freshclam_user} ${logfile} - chmod 640 ${logfile} - fi -} - |