aboutsummaryrefslogtreecommitdiffstats
path: root/main/clamsmtp/APKBUILD
blob: 1bb0fe59ce554bdce945cb7835a2b44bbe36988a (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
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=clamsmtp
pkgver=1.10
pkgrel=10
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
	"

build() {
	cd "$srcdir/$pkgname-$pkgver"

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		|| return 1
	make || return 1
	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"