aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/clamav/APKBUILD48
-rw-r--r--main/clamav/clamav.post-install3
-rw-r--r--main/clamav/clamd.logrotate8
-rw-r--r--main/clamav/freshclam.logrotate7
4 files changed, 53 insertions, 13 deletions
diff --git a/main/clamav/APKBUILD b/main/clamav/APKBUILD
index 63eeef57d6..d508168df3 100644
--- a/main/clamav/APKBUILD
+++ b/main/clamav/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Carlo Landmeter <clandmeter at gmail>
pkgname=clamav
pkgver=0.97.7
-pkgrel=0
+pkgrel=1
pkgusers=clamav
pkggroups=clamav
pkgdesc="An anti-virus toolkit for UNIX"
@@ -10,7 +10,7 @@ url="http://www.clamav.net/"
arch="all"
license="GPL"
depends="logrotate"
-install="$pkgname.pre-install $pkgname.post-install $pkgname.pre-upgrade"
+install="$pkgname.pre-install $pkgname.pre-upgrade"
makedepends="ncurses-dev zlib-dev"
subpackages="$pkgname-doc $pkgname-dev"
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
@@ -20,6 +20,7 @@ source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
freshclam.confd
clamav-0.95.1-nls.patch
clamav.logrotate
+ freshclam.logrotate
"
_builddir="$srcdir/$pkgname-$pkgver"
@@ -39,7 +40,11 @@ build() {
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--without-iconv \
- --disable-llvm
+ --disable-llvm \
+ --with-user=clamav \
+ --with-group=clamav \
+ --with-dbdir=/var/lib/clamav \
+ --enable-clamdtop
make || return 1
}
@@ -69,12 +74,18 @@ package() {
-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
+ install -m755 -D "$srcdir"/clamd.initd "$pkgdir"/etc/init.d/clamd || return 1
+ install -m644 -D "$srcdir"/clamd.confd "$pkgdir"/etc/conf.d/clamd || return 1
+ install -m755 -D "$srcdir"/freshclam.initd "$pkgdir"/etc/init.d/freshclam || return 1
+ install -m644 -D "$srcdir"/freshclam.confd "$pkgdir"/etc/conf.d/freshclam || return 1
+ install -m644 -D "$srcdir"/clamav.logrotate "$pkgdir"/etc/logrotate.d/clamav || return 1
+ install -m644 -D "$srcdir"/freshclam.logrotate \
+ "$pkgdir"/etc/logrotate.d/freshclam || return 1
+ install -d -m755 -o clamav -g clamav \
+ "$pkgdir"/var/run/clamav \
+ "$pkgdir"/var/log/clamav \
+ "$pkgdir"/var/lib/clamav || return 1
+ find "$pkgdir" -iname *.la -delete
}
md5sums="c6e6e333d8c9bd3785cbc6ec296c146f clamav-0.97.7.tar.gz
@@ -83,4 +94,21 @@ d64432c463850663c5041c3097f3e903 clamd.initd
f4d1f415322905128dc27135566ad136 freshclam.initd
e48466ddfb56f66c623b83e58777b778 freshclam.confd
0d08fd29656bd4b018ecf8ce9706ac55 clamav-0.95.1-nls.patch
-dffa5af2e7a563fc00fcd52ec4c02347 clamav.logrotate"
+dffa5af2e7a563fc00fcd52ec4c02347 clamav.logrotate
+226824214c021b2366f0be1289561d17 freshclam.logrotate"
+sha256sums="8527754e7eb235317e37a50706d94d3fc9d880fd0bf6f3cb83757d64a720e9ff clamav-0.97.7.tar.gz
+f42b7ea4c48efec5922efe03eba1834e11e5418d46e2034dc1bf8d8da0e44d32 clamd.initd
+5103f07f1a7326011cd5256003f570bda1da08e08d0ab6b4ff7a348e99f4e322 clamd.confd
+104006d6d223068f4faf5dd33befeee51dfb2d43ec90e302adcd643378311409 freshclam.initd
+75551ce7e04bbef4a889bc94a357b160d9da88f06eba32df594ba3cbb2c81ed1 freshclam.confd
+4aa3ba46cdea229355f90e2c6533c0f3c91f52ce869f7bc6dcc870a29450e312 clamav-0.95.1-nls.patch
+6d7383604b4a361a668166ca9099b0a889edd691761ef1ed8938f25aea969008 clamav.logrotate
+84006ac3d2e8dc2e13a01f5e313c20e4978cdc93d831c181e0075badcbf4ada0 freshclam.logrotate"
+sha512sums="92120250afb882b7fb9f956f2095797f8e3c93076a229967123261c907d9b4436cda6cf2d18b2c61cec8b33afeacba9c2701ad3322aa3316163fe4f36f7a7bc7 clamav-0.97.7.tar.gz
+db30ce24417dca168ebf59a4334d8a4f866626dc178d8826131a6526567eacf53852789d20de46c73b087bf335b41067420f19fc1211957723c320fc9a5b0eff clamd.initd
+5a8b8b8b978c3b5462b98e929fc9f7064347a7dec553a950a7319a2cdb988e45478523df80d463241ec1f73029356db4174ce04e605986d492bc37d9a309565f clamd.confd
+9f0949a77738b864ecf04429ec313e8ce87fab0ced6fcea3c93cd5af1dffffa5001abfcb7527e6e9fa0ac5b68e569afc0ff2045f32b3c79bf88fb5ebf0649282 freshclam.initd
+ba181fe1abaac7b898ccb40b0713455aa3c9d5e25ad21d687b6cac09b0105b9e376526e7c776a44636234d8db819709d8d6a6cc76119bc3e98b637b1a3f26c08 freshclam.confd
+8363ba0e69918ce2cbfef3adf3406d3f73d29adacc1f1382f11c1ef3b55baba96ee581beb5f9eaafbfbad1e00ffb0e4af39cd09b597cdba1e3ab2db39a3c5a04 clamav-0.95.1-nls.patch
+fb0afeb8ae68e12dacc5933da9a00482515d2be98f1ef2743ba60221cf4e228dde4bbd30d4af537a1fdd79553ff58d2a9e61a71a66fd850f77475c603128db8a clamav.logrotate
+f1cd8df6d47824009a6df130bd60bf5e9f9deaef87fbeaceec8fe71e6c8b2772b5dba017390a2190deee851723256f06e9aef2182b0a2881119f22ba68740554 freshclam.logrotate"
diff --git a/main/clamav/clamav.post-install b/main/clamav/clamav.post-install
deleted file mode 100644
index 4930206101..0000000000
--- a/main/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/main/clamav/clamd.logrotate b/main/clamav/clamd.logrotate
new file mode 100644
index 0000000000..3d7fc79cad
--- /dev/null
+++ b/main/clamav/clamd.logrotate
@@ -0,0 +1,8 @@
+/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
+}
+
diff --git a/main/clamav/freshclam.logrotate b/main/clamav/freshclam.logrotate
new file mode 100644
index 0000000000..df42d6084f
--- /dev/null
+++ b/main/clamav/freshclam.logrotate
@@ -0,0 +1,7 @@
+/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
+}