aboutsummaryrefslogtreecommitdiffstats
path: root/testing/dovecot-antispam-plugin/APKBUILD
blob: 0dff2c94ef2643a54da2738b519a0a601baddc3e (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: Kozak Ivan <kozak-iv@yandex.ru>
# Maintainer: Kozak Ivan <kozak-iv@yandex.ru>
pkgname=dovecot-antispam-plugin
pkgver=51
pkgrel=1
pkgdesc="Integrates DSPAM into dovecot IMAP server. Mercurial Version for dovecot >= 2.1"
url="http://hg.dovecot.org/dovecot-antispam-plugin/"
arch="all"
license="GPL"
depends="dovecot"
depends_dev="dovecot-dev mercurial autoconf automake gawk"
makedepends="$depends_dev"
install=""
subpackages="$pkgname-doc"
source=""

_hgroot="http://hg.dovecot.org/dovecot-antispam-plugin"
_hgrepo="dovecot-antispam-plugin"
_builddir="$srcdir/$_hgrepo"

prepare() {
	cd "$srcdir"
	msg "Connecting to Mercurial server..."
	if [ -d "$_hgrepo" ]; then
		cd "$_hgrepo"
		hg pull -r 51 -u
		msg "The local files are updated."
	else
		hg clone -r 51 "$_hgroot" "$_hgrepo"
	fi
	update_config_guess || return 1
}

build() {
	cd "$_builddir"
	./autogen.sh || return 1
	./configure --prefix=/usr --with-dovecot=/usr/lib/dovecot || return 1
	sed -i -e 's/install -o/install -D -o/' -e 's|$(INSTALLDIR)/|$(INSTALLDIR)/$(LIBRARY_NAME)|' Makefile || return 1
	make || return 1
}

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