aboutsummaryrefslogtreecommitdiffstats
path: root/main/clamsmtp/APKBUILD
blob: cdcefb7a7be26554f2bc665d572932dda2e9c9fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=clamsmtp
pkgver=1.10
pkgrel=11
pkgdesc="An SMTP Virus Filter"
url="http://thewalter.net/stef/software/clamsmtp/"
arch="all"
license="as-is"
depends=
makedepends=
install="$pkgname.pre-install $pkgname.pre-upgrade $pkgname.post-upgrade"
subpackages="$pkgname-doc"
source="http://thewalter.net/stef/software/clamsmtp/clamsmtp-$pkgver.tar.gz
	clamsmtpd.confd
	clamsmtpd.initd
	"

_builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	cd "$_builddir"
	update_config_sub || return 1
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1

	# set default clam address and user
	sed -e 's|^\#ClamAddress:.*|ClamAddress: /var/run/clamav/clamd.sock|'\
		-e 's|^\#User:.*|User: clamav|' \
		-i doc/clamsmtpd.conf

	install -Dm644 doc/clamsmtpd.conf "$pkgdir"/etc/clamsmtpd.conf
	install -Dm755 "$srcdir"/clamsmtpd.initd "$pkgdir"/etc/init.d/clamsmtpd
	install -Dm644 "$srcdir"/clamsmtpd.confd "$pkgdir"/etc/conf.d/clamsmtpd
	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

md5sums="b068ba6e444859782bbdd88f290c1abf  clamsmtp-1.10.tar.gz
e84205681f64c07af9ec5b6a3dd8bc38  clamsmtpd.confd
d34b382f2b4b3bc2497eb05f16cfc1ba  clamsmtpd.initd"
sha256sums="a52fdb4b26e11ece30c478a806c95b1eda16f4e73937bd560ece7017fb0df92a  clamsmtp-1.10.tar.gz
2383e93e39f5228d50a6e94ae3d3d4983443a6981db23ab0fc8faac11b2518cc  clamsmtpd.confd
6c467f9300736c07634013d717a04a655b91abbbc77ca7da6248c5a428ea0af8  clamsmtpd.initd"
sha512sums="f28e2c1d78c965245d8d7a8810fbeb11d41e40383eba2e8fca500f94c2e4b8d9a2c0b9e4e8e967965bf50266968e0b9549fb62369f37724350a20174c89a044b  clamsmtp-1.10.tar.gz
007b948a11ab4c8da737328d2088abd5b66dc7f83bf1b8bcb26a5deb639864e77553b7e7434139ddb8a916fe39beb4aabb35f766ce96274449b414268703a6ee  clamsmtpd.confd
96320044b7cd965dd4ee284b5d4babdd2e7c59534a5ec499b78865fc6e6630c360f56ad69e602213feebeec8acd3fad98cce35d5ed46c2be70a00117d67b5c5a  clamsmtpd.initd"