summaryrefslogtreecommitdiffstats
path: root/main/clamav/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/clamav/APKBUILD')
-rw-r--r--main/clamav/APKBUILD72
1 files changed, 72 insertions, 0 deletions
diff --git a/main/clamav/APKBUILD b/main/clamav/APKBUILD
new file mode 100644
index 000000000..a4daebc2f
--- /dev/null
+++ b/main/clamav/APKBUILD
@@ -0,0 +1,72 @@
+# 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"