aboutsummaryrefslogtreecommitdiffstats
path: root/testing/exim/APKBUILD
blob: 0e5dc0469e47d3331e3b7d22a2fb4c12ad9c4f24 (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Jesse Young <jlyo@jlyo.org>
# Maintainer: Jesse Young <jlyo@jlyo.org>
pkgname=exim
pkgver=4.86
pkgrel=5
pkgdesc="A Message Transfer Agent"
url="http://www.exim.org/"
arch="all"
license="GPL2"
options="suid"
depends="ca-certificates"
pkgusers="exim"
pkggroups="exim"
depends_dev=""
makedepends="bash gawk perl $depends_dev db-dev pcre-dev openssl-dev libspf2-dev mariadb-dev postgresql-dev sqlite-dev libidn-dev"
install="exim.pre-install exim.post-upgrade"
subpackages="$pkgname-cdb $pkgname-dbmdb $pkgname-dnsdb $pkgname-sqlite $pkgname-mysql $pkgname-postgresql $pkgname-utils $pkgname-scripts $pkgname-doc"
source="ftp://ftp.exim.org/pub/exim/exim4/$pkgname-$pkgver.tar.bz2
	exim.Makefile
	exim.confd
	exim.initd
	exim.logrotate"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
	cp "$srcdir/$pkgname.Makefile" Local/Makefile
	sed	-e 's/^LIBS = -lnsl/LIBS =/g' \
		-e 's/^HAVE_ICONV=yes/#HAVE_ICONV=yes/' \
		-i OS/Makefile-Linux
}

build() {
	cd "$_builddir"
	make makefile || return 1
	make -j1 || return 1
}

package() {
	cd "$_builddir"
	install -m750 -D -g mail -d "$pkgdir"/etc/mail
	make DESTDIR="$pkgdir" INSTALL_ARG="-no_symlink -no_chown exim" install || return 1
	install -D -m644 doc/exim.8 "$pkgdir"/usr/share/man/man8/exim.8
	cd "$pkgdir"/usr/sbin
	mv exim-${pkgver}-* exim
	chmod u+s exim
	for i in mailq rmail rsmtp runq sendmail newaliases; do
		ln -s exim $i
	done
	install -Dm644 "$srcdir"/$pkgname.logrotate "$pkgdir"/etc/logrotate.d/$pkgname
	install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
	install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	# Fix clamav local socket path, Add variant to spamd address
	sed -i \
		-e 's~# av_scanner = clamd:/tmp/clamd~# av_scanner = clamd:/run/clamav/clamd.sock~' \
		-e '/# spamd_address = 127.0.0.1 783/a# spamd_address = 127.0.0.1 11333 variant=rspamd' \
		"$pkgdir"/etc/$pkgname/$pkgname.conf
}

scripts() {
	pkgdesc="exim scripts"
	depends="exim perl"
	arch="noarch"
	cd "$_builddir"
	make	DESTDIR="$subpkgdir" \
		INSTALL_ARG="exicyclog exim_checkaccess eximstats exiqgrep exigrep exinext exiqsumm exipick exiwhat convert4r3 convert4r4" \
		install || return 1
	rm -fr "$subpkgdir"/etc
}

utils() {
	pkgdesc="exim utils"
	depends="exim"
	cd "$_builddir"
	make	DESTDIR="$subpkgdir" \
		INSTALL_ARG="exim_dbmbuild exim_dumpdb exim_tidydb exim_fixdb exim_lock" \
		install || return 1
	rm -fr "$subpkgdir"/etc
}

_mv_ext() {
	pkgdesc="$1 support for EXIM"
	depends="$pkgname"
	install -D -m755 "$_builddir"/build-Linux-*/lookups/$1.so "$subpkgdir"/usr/lib/$pkgname/$1.so
}

sqlite() { _mv_ext sqlite; }
mysql() { _mv_ext mysql; }
postgresql() { _mv_ext pgsql; }
cdb() { _mv_ext cdb; }
dbmdb() { _mv_ext dbmdb; }
dnsdb() { _mv_ext dnsdb; }

md5sums="797f248ef3e0c0e2f178e915f88fc4e9  exim-4.86.tar.bz2
85348d0fed6b35f5c0b4241023269a19  exim.Makefile
186f4491800be8c56ce39320f24d7264  exim.confd
871a2839c3814412a820b79095cc2a4d  exim.initd
2eff3af519bdf8acf0292fffe89871a5  exim.logrotate"
sha256sums="f1ccf2ce2ea51b7fbbf160e7e0e41d24ca401cf44a185128ad99ea04635fc456  exim-4.86.tar.bz2
9afac834b73fe6cdf3b45efdb89428a790e2a2b68bdbaafecd8d9fcfbe2ef35d  exim.Makefile
db711754c48dfb7e3810009a1c6ffa331625c9d74d00dc8fa8256d9fa2c353f0  exim.confd
6dbdf67ab4dc82142c46901ed7ceed5fca09af037071630809929e1fb545b89e  exim.initd
b5a6d449cb1998beb44d4144ef97e66a98b46d164445989a6d624c80549f24bc  exim.logrotate"
sha512sums="0b90cd1b4d99bbb976336ccf9c2c3375f453a74bb306f1b0215f7ecca80fbda83cf5cc38c502516c2903c5d753f1f559c534fc4f4b1b32ee3300db86de6610ab  exim-4.86.tar.bz2
0a3d5908f397c34c21e8a82c8d5d5e02644f30e7323f1da7acce2ebe74918da5eefe04945a5a0f3edf21881d04d1bf1e470e6bac5b6de930a6b82a4e012ce7a5  exim.Makefile
bb6f5ead067af19ace661cc92bcd428da97570aedd1f9dc5b61a34e7e3fb3e028be6c96d51df73353bdfcaf69a3ee053fb03d245f868d63ebf518aa96ec82d66  exim.confd
cd7a27922d6cce59cf2dbedaab6f90159614cd6566b5d7ff7e232acf76a42b697709bb85981ffa88b60a7ee326bb88f1892f2405495ca228b4ec025885e65ed6  exim.initd
28e748693a6a72d9943fa9c342ff041fe650fa6977f468dee127e845e6c2a91872ce33fb6f5698838906bde3ed92de7a91cdb0349cedc40b806261867e8c06cb  exim.logrotate"