aboutsummaryrefslogtreecommitdiffstats
path: root/main/clamav/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/clamav/APKBUILD')
-rw-r--r--main/clamav/APKBUILD116
1 files changed, 56 insertions, 60 deletions
diff --git a/main/clamav/APKBUILD b/main/clamav/APKBUILD
index c5d2787e0f..4162371b60 100644
--- a/main/clamav/APKBUILD
+++ b/main/clamav/APKBUILD
@@ -4,7 +4,7 @@
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=clamav
pkgver=0.99.2
-pkgrel=4
+pkgrel=5
pkgusers="clamav"
pkggroups="clamav"
pkgdesc="An anti-virus toolkit for UNIX eis-ng backport"
@@ -15,9 +15,11 @@ depends="$pkgname-scanner $pkgname-daemon"
depends_dev="libressl-dev"
install="freshclam.pre-install
clamav-daemon.pre-install clamav-daemon.pre-upgrade"
-makedepends="ncurses-dev zlib-dev bzip2-dev pcre-dev linux-headers $depends_dev fts-dev"
+makedepends="ncurses-dev zlib-dev bzip2-dev pcre-dev linux-headers $depends_dev
+ libmilter-dev fts-dev"
subpackages="$pkgname-doc $pkgname-dev $pkgname-lib $pkgname-libunrar
- $pkgname-daemon $pkgname-scanner $pkgname-db freshclam"
+ $pkgname-daemon $pkgname-scanner $pkgname-db::noarch freshclam
+ $pkgname-milter"
source="http://www.clamav.net/downloads/production/$pkgname-$pkgver.tar.gz
clamd.initd
clamd.confd
@@ -28,21 +30,15 @@ source="http://www.clamav.net/downloads/production/$pkgname-$pkgver.tar.gz
fix-zlib-1.2.1.patch
"
-_builddir="$srcdir/$pkgname-$pkgver"
+builddir="$srcdir/$pkgname-$pkgver"
prepare() {
- local i
- cd "$_builddir"
- update_config_sub || return 1
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
+ update_config_sub
+ default_prepare
}
build() {
- cd "$_builddir"
+ cd "$builddir"
LIBS=-lfts ./configure \
--build=$CBUILD \
--host=$CHOST \
@@ -59,13 +55,13 @@ build() {
--enable-clamdtop \
--enable-bigstack \
--with-pcre \
- || return 1
- make || return 1
+ --enable-milter
+ make
}
package() {
- cd "$_builddir"
- make DESTDIR="$pkgdir" install || return 1
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
# set proper defaults
sed -i -e "s:^\(Example\):\# \1:" \
@@ -88,6 +84,11 @@ package() {
"$pkgdir"/etc/clamav/clamd.conf.sample
}
+check() {
+ cd "$builddir"
+ make check
+}
+
lib() {
pkgdesc="ClamAV library"
depends=""
@@ -113,21 +114,22 @@ freshclam() {
mkdir -p "$subpkgdir"/usr/bin \
"$subpkgdir"/etc/init.d \
"$subpkgdir"/etc/conf.d \
- "$subpkgdir"/etc/clamav
+ "$subpkgdir"/etc/clamav \
- mv "$pkgdir"/usr/bin/freshclam "$subpkgdir"/usr/bin || return 1
+ mv "$pkgdir"/usr/bin/freshclam "$subpkgdir"/usr/bin
mv "$pkgdir"/etc/clamav/freshclam.conf.sample \
- "$subpkgdir"/etc/clamav/freshclam.conf || return 1
+ "$subpkgdir"/etc/clamav/freshclam.conf
+
install -d -m755 -o clamav -g clamav \
"$subpkgdir"/var/log/clamav \
- "$subpkgdir"/var/lib/clamav || return 1
+ "$subpkgdir"/var/lib/clamav
install -m755 -D "$srcdir"/freshclam.initd \
- "$subpkgdir"/etc/init.d/freshclam || return 1
- install -m644 -D "$srcdir"/freshclam.confd \
- "$subpkgdir"/etc/conf.d/freshclam || return 1
+ "$subpkgdir"/etc/init.d/freshclam
+ install -m644 -D "$srcdir"/freshclam.confd \
+ "$subpkgdir"/etc/conf.d/freshclam
install -m644 -D "$srcdir"/freshclam.logrotate \
- "$pkgdir"/etc/logrotate.d/freshclam || return 1
+ "$subpkgdir"/etc/logrotate.d/freshclam
}
db() {
@@ -136,11 +138,10 @@ db() {
depends="freshclam"
mkdir -p "$subpkgdir"/var/lib/ \
"$subpkgdir"/usr/bin \
- "$subpkgdir"/etc/clamav \
- || return 1
+ "$subpkgdir"/etc/clamav
install -d -m755 -o clamav -g clamav \
"$subpkgdir"/var/log/clamav \
- "$subpkgdir"/var/lib/clamav || return 1
+ "$subpkgdir"/var/lib/clamav
}
scanner() {
@@ -149,11 +150,11 @@ scanner() {
depends="freshclam"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/clamscan \
- "$subpkgdir"/usr/bin/ || return 1
+ "$subpkgdir"/usr/bin/
mv "$pkgdir"/usr/bin/sigtool \
- "$subpkgdir"/usr/bin/ || return 1
+ "$subpkgdir"/usr/bin/
mv "$pkgdir"/usr/bin/clambc \
- "$subpkgdir"/usr/bin/ || return 1
+ "$subpkgdir"/usr/bin/
}
daemon() {
@@ -162,48 +163,43 @@ daemon() {
depends="freshclam logrotate"
mkdir -p "$subpkgdir"/usr/bin \
"$subpkgdir"/usr/sbin \
- "$subpkgdir"/etc/clamav \
- || return 1
+ "$subpkgdir"/etc/clamav
install -d -m 755 -o clamav -g clamav \
"$subpkgdir"/var/log/clamav \
"$subpkgdir"/var/lib/clamav
mv "$pkgdir"/usr/bin/clamconf \
- "$subpkgdir"/usr/bin/ || return 1
+ "$subpkgdir"/usr/bin/
mv "$pkgdir"/usr/sbin/clamd \
- "$subpkgdir"/usr/sbin/ || return 1
+ "$subpkgdir"/usr/sbin/
mv "$pkgdir"/usr/bin/clamdtop \
- "$subpkgdir"/usr/bin/ || return 1
+ "$subpkgdir"/usr/bin/
mv "$pkgdir"/usr/bin/clamdscan \
- "$subpkgdir"/usr/bin/ || return 1
+ "$subpkgdir"/usr/bin/
mv "$pkgdir"/etc/clamav/clamd.conf.sample \
- "$subpkgdir"/etc/clamav/clamd.conf || return 1
- install -m755 -D "$srcdir"/clamd.initd \
- "$subpkgdir"/etc/init.d/clamd || return 1
- install -m644 -D "$srcdir"/clamd.confd \
- "$subpkgdir"/etc/conf.d/clamd || return 1
- install -m644 -D "$srcdir"/clamd.logrotate \
- "$pkgdir"/etc/logrotate.d/clamd || return 1
+ "$subpkgdir"/etc/clamav/clamd.conf
+ install -m755 -D "$srcdir"/clamd.initd \
+ "$subpkgdir"/etc/init.d/clamd
+ install -m644 -D "$srcdir"/clamd.confd \
+ "$subpkgdir"/etc/conf.d/clamd
+ install -m644 -D "$srcdir"/clamd.logrotate \
+ "$subpkgdir"/etc/logrotate.d/clamd
+}
+
+milter() {
+ pkgdesc="ClamAV milter"
+ mkdir -p "$subpkgdir"/usr/sbin \
+ "$subpkgdir"/etc/clamav
+ mv "$pkgdir"/usr/sbin/clamav-milter \
+ "$subpkgdir"/usr/sbin/
+ mv "$pkgdir"/etc/clamav/clamav-milter.conf.sample \
+ "$subpkgdir"/etc/clamav/clamav-milter.conf
}
-md5sums="61b51a04619aeafd965892a53f86d192 clamav-0.99.2.tar.gz
-26fbe47be94c56e47b224059ad06bce3 clamd.initd
-e8a03fad6ce603631e8fe71a24d387c6 clamd.confd
-6c79b77c35ce35ba3846b5a4f363a1d4 freshclam.initd
-e48466ddfb56f66c623b83e58777b778 freshclam.confd
-2fb0399fbad82ab17c1c04f2d331214a clamd.logrotate
-56e88ff24d3490af599e34e6f3346d5b freshclam.logrotate"
-sha256sums="167bd6a13e05ece326b968fdb539b05c2ffcfef6018a274a10aeda85c2c0027a clamav-0.99.2.tar.gz
-d95865d671c3757a224cfbd395a42410a626563d2fca97dbe5a89317b608963d clamd.initd
-4d978313004f66d871564b873df27c5459d3cc504788b179e41edba0f04b74dc clamd.confd
-4ba12be50d010269bcd170c1d14a91e6ddcfe85df3f5cbf68803e6e75a420bb5 freshclam.initd
-75551ce7e04bbef4a889bc94a357b160d9da88f06eba32df594ba3cbb2c81ed1 freshclam.confd
-2fee72877bc1fdc788b298319479de9495db85bdae4433143ce83a450a09dae3 clamd.logrotate
-5127ebd370d8c62f3558c9605b4f33f7fb54bac3acf7831dc5f8c4dda1509dfa freshclam.logrotate"
sha512sums="7744ba8a344b163cf98e9737cddfd25d2120b34ee9c4518380e028c9ec3cd50127b198b0dfa9fde30f5ce9aab0c0e6384712fbc11287e77d16ce052fd7b6ac44 clamav-0.99.2.tar.gz
ed81be79bf9a25eec071312252121cc76c96838407377b75077bf94922055f1de99f327982ac4dccd5be85003baa95385e5d002fabab32bb851bb30178475edd clamd.initd
59c561b3dcb0b616b647cd8e4ebc46a2cc5e7144c8c7ea0054cc1c3021d1da8f67e4dad5c083c3fe712ed887aaabfca91b538f4759537e7c4c9ab71ba4fd5794 clamd.confd
00daed8afb67a6e4a29893340246c8840cce970dd9103d26557ecdd26ef60b12551d2291c214fc657faaaa339484052079347411b0cad65e3a33ece56d57cf16 freshclam.initd
ba181fe1abaac7b898ccb40b0713455aa3c9d5e25ad21d687b6cac09b0105b9e376526e7c776a44636234d8db819709d8d6a6cc76119bc3e98b637b1a3f26c08 freshclam.confd
3ae493dd1610a819402c015f6b8c0f080f926b72dc43d2bded60030bf6a55040e4b88e0f64d3aae299dc1133d7e1b89855e7346b4665a64e8b82592f7b75cf6a clamd.logrotate
-d555e40d6424b47afc6375d42379d0798963168eb47dcefaf5d9f5e429827af7cd7461792f3af3875754a97cfc259d5bb5a1fbe254489e43f4135cfa6f90a5b0 fix-zlib-1.2.1.patch
-30cff378bc28c76b795e00c92ae5ee623f3abe4a19bed61dd8403c96e72658bb02b7f040d26a6258104af754464d25ea7d9646918c4b47d2ba9a8cbf4687056c freshclam.logrotate"
+30cff378bc28c76b795e00c92ae5ee623f3abe4a19bed61dd8403c96e72658bb02b7f040d26a6258104af754464d25ea7d9646918c4b47d2ba9a8cbf4687056c freshclam.logrotate
+d555e40d6424b47afc6375d42379d0798963168eb47dcefaf5d9f5e429827af7cd7461792f3af3875754a97cfc259d5bb5a1fbe254489e43f4135cfa6f90a5b0 fix-zlib-1.2.1.patch"