aboutsummaryrefslogtreecommitdiffstats
path: root/main/opensmtpd/APKBUILD
blob: f50be56199afdf672bd7f5bdbb815a1ec583ef62 (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
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Jonathan Curran <jonathan@curran.in>
# Contributor: Shiz <hi@shiz.me>
# Maintainer: Jonathan Curran <jonathan@curran.in>
pkgname=opensmtpd
pkgver=6.0.2p1
pkgrel=0
pkgdesc="secure, reliable, lean, and easy-to configure SMTP server"
url="http://www.opensmtpd.org"
arch="all"
license="ISC"
depends=""
makedepends="automake autoconf libtool mdocml db-dev libasr-dev libevent-dev
	fts-dev zlib-dev libressl-dev bison flex-dev"
install="$pkgname.pre-install $pkgname.post-install"
subpackages="$pkgname-doc"
source="https://www.opensmtpd.org/archives/${pkgname}-${pkgver}.tar.gz
	smtpd.initd
	aliases
	autoconf-decl-checks.patch"
options="suid"

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

build() {
	cd "$builddir"
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc/smtpd \
		--with-libssl=/usr/include/openssl \
		--mandir=/usr/share/man \
		--libexecdir=/usr/lib/$pkgname \
		--with-table-db \
		--with-user-queue=smtpq \
		--with-group-queue=smtpq \
		--with-user-smtpd=smtpd \
		--with-path-socket=/run \
		--with-libs="-lfts" \
		--with-pie \
		--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt \
		--with-mantype=man || return 1
        make || return 1
}

package() {
	make DESTDIR="${pkgdir}" -C "$builddir" install || return 1
	sed -i 's#/etc/mail#/etc/smtpd#g' "$pkgdir"/etc/smtpd/smtpd.conf

	install -Dm755 "$srcdir"/smtpd.initd "$pkgdir"/etc/init.d/smtpd || return 1
	install -Dm644 "$srcdir"/aliases "$pkgdir"/etc/smtpd/aliases || return 1

	# Create compatibility symlinks for mailq, newaliases, makemap and sendmail.
	for binary in mailq newaliases makemap sendmail; do
		ln -s /usr/sbin/smtpctl "$pkgdir"/usr/sbin/$binary || return 1
	done
}

md5sums="1ebc232624f2e2e31010c810ea0a3b88  opensmtpd-6.0.2p1.tar.gz
0327ef7a8479130fea26051f334ef51f  smtpd.initd
561d2aead043a64a4ce5d66b4f78223e  aliases
7159c1af3a1ff8a676e6d865940bc173  autoconf-decl-checks.patch"
sha256sums="2af9b6d08784c7e546bf124bb61e311a6aa0c9835507710a76f5c242383190ac  opensmtpd-6.0.2p1.tar.gz
8bddc52a03cad563e229064bd41d64919ce7538e0149f9b7396a43798f54cba9  smtpd.initd
7bef80f8d86aa5463c864681482a4908d22ff8b6f3e47d2a410ef2d59b316b53  aliases
5efee2a6d5ddd99662ef314ac5928f722ffa2fd615024171ddbda869933bf3b2  autoconf-decl-checks.patch"
sha512sums="1e4275795dd2c43174ffa268398a0d9864ce4cb7d370330f7b8c55a9b40e757616bbd280919a409ebde403769e3dea62047857dc2ff98d7ecce660b459c7ff1c  opensmtpd-6.0.2p1.tar.gz
3653c8bdb0666c99c54fa7c7cd799080407f96ccaf54af1d4fa316d7a2b7c0576c4c1513428335e40dc0dc763081c69711dd22171096cd5a7e8f96041b2e201d  smtpd.initd
929ba0b8befca6cad558602f9793a9c653923924ee524902916b8ef4952d1ea8a391895e7450ed9768eb82a07bd307b49561f5d49ea4711bd87a1a73eb8d7dad  aliases
e61b7b0ab98acca9c092469d3ed756161225af5126e2fc0611b2676b8e1df05db7037549febe85b860fa48e47536a01fa3bfa37976f42e47666065ba4198e903  autoconf-decl-checks.patch"