aboutsummaryrefslogtreecommitdiffstats
path: root/main/fetchmail/APKBUILD
blob: 935b2a27cd8e462638d6152a2062d1f7a1ecb5ea (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
63
64
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=fetchmail
pkgver=6.3.26
pkgrel=5
pkgdesc="A remote-mail retrieval and forwarding utility"
url="http://www.fetchmail.info/"
arch="all"
license="GPL"
depends=
pkgusers="fetchmail"
pkggroups="fetchmail"
makedepends="openssl-dev python"
install="fetchmail.pre-install"
subpackages="$pkgname-doc fetchmailconf"
source="http://downloads.sourceforge.net/project/${pkgname}/branch_6.3/fetchmail-${pkgver}.tar.xz
	fetchmail.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 \
		--with-ssl \
		--disable-nls \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install
	install -Dm755 "$srcdir"/fetchmail.initd "$pkgdir"/etc/init.d/fetchmail
	install -o fetchmail -g fetchmail -d "$pkgdir"/var/lib/fetchmail \
		"$pkgdir"/var/run/fetchmail
}

fetchmailconf() {
	depends="python"
	pkgdesc="A GUI for generating fetchmail configuration files"
	install=
	mkdir -p "$subpkgdir"/usr/bin
	cd "$pkgdir"
	mv usr/bin/fetchmailconf "$subpkgdir"/usr/bin/
	mv usr/lib "$subpkgdir"/usr/
}

md5sums="61b66faad044afa26e142bb1791aa2b3  fetchmail-6.3.26.tar.xz
6beab7b7731b3d321904e2a8ec948121  fetchmail.initd"
sha256sums="79b4c54cdbaf02c1a9a691d9948fcb1a77a1591a813e904283a8b614b757e850  fetchmail-6.3.26.tar.xz
c97185a8c1944574025b83ca4fc78f76330881d7e6ea209caf6962913ad66ffe  fetchmail.initd"
sha512sums="8e0a2484e60eaf6c0231e2599e10fec6d207fa1c0fa02ec99b3ef9aea00b6d87275434e79470a25f06e358cdd4a293f9c46a82dd128fe733a99c85144e6caa63  fetchmail-6.3.26.tar.xz
83128465a2e2e0df4ddd589cc7644e63ce013dee36196aa757b839edd5ec36775fc48fedd8c88ad51a8bb882bbfa573fff69546bbca84718ac9c1b915f35ff0a  fetchmail.initd"