aboutsummaryrefslogtreecommitdiffstats
path: root/main/opensmtpd/APKBUILD
blob: 7c58936aeddf7d0ff037ddcacd8d8ca8c5c593df (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
# 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=1
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
	missing-decls.patch
	libressl-compat.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
}

sha512sums="1e4275795dd2c43174ffa268398a0d9864ce4cb7d370330f7b8c55a9b40e757616bbd280919a409ebde403769e3dea62047857dc2ff98d7ecce660b459c7ff1c  opensmtpd-6.0.2p1.tar.gz
6cbcca9fc74cc0bb007164442dea87d039b06668da1b43da5e1fac2160a96da95d6644437c79a92480a3ab1fc252686bd10eceed38a19971344b0a8fca65a3d6  smtpd.initd
929ba0b8befca6cad558602f9793a9c653923924ee524902916b8ef4952d1ea8a391895e7450ed9768eb82a07bd307b49561f5d49ea4711bd87a1a73eb8d7dad  aliases
e61b7b0ab98acca9c092469d3ed756161225af5126e2fc0611b2676b8e1df05db7037549febe85b860fa48e47536a01fa3bfa37976f42e47666065ba4198e903  autoconf-decl-checks.patch
217e7212345f4202bf7e136b2d5b347a9967ea10d15ef50a216bfcd8e4a522076e4ee2044d18a606baf670c0fe6a339951b6381cdb9047730e06987ab7796790  missing-decls.patch
67b5bb221f10e014749592d24f7681bea6872785fa4a70e4e4b978f94859b527c4999aabb489586f7c19fac182acca450bdfa01af3ebc52c009f723830212058  libressl-compat.patch"