aboutsummaryrefslogtreecommitdiffstats
path: root/testing/opensmtpd/APKBUILD
blob: 278d004ed348e0ac583059ba9527f47af475a1b8 (plain) (blame)
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
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Jonathan Curran <jonathan@curran.in>
# Maintainer: Jonathan Curran <jonathan@curran.in>
pkgname=opensmtpd
pkgver=5.7.2p1
pkgrel=0
pkgdesc="secure, reliable, lean, and easy-to configure SMTP server"
url="http://www.opensmtpd.org"
arch="x86_64"
license="ISC"
depends=""
depends_dev=""
makedepends="automake autoconf libtool mdocml db-dev libasr-dev libevent-dev
	fts-dev openssl-dev bison flex-dev"
install="$pkgname.pre-install $pkgname.post-install"
subpackages="$pkgname-doc"
source="https://www.opensmtpd.org/archives/opensmtpd-${pkgver}.tar.gz
	00-opensmtpd.patch
	smtpd.initd
	aliases"

_builddir=${srcdir}/${pkgname}-${pkgver}
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	aclocal -I m4
	autoconf
	autoheader
	automake --foreign --add-missing --copy
        ./configure --build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc/smtpd \
		--enable-table-db \
		--with-privsep-user=smtpd \
		--with-queue-user=smtpq \
		--with-maildir=/var/spool/mail \
		--with-sock-dir=/run \
		--with-libs="-lfts" \
		--with-pie \
		--with-Werror \
		--mandir=/usr/share/man \
		--libexecdir=/usr/lib/$pkgname \
		--with-mantype=doc || 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

	# Move sendmail to /usr/sbin to overwrite busyboxs sendmail.
	mv "$pkgdir"/usr/bin/sendmail "$pkgdir"/usr/sbin/ || return 1
}

md5sums="6aa96c61336d19f7680bb45a705e6b64  opensmtpd-5.7.2p1.tar.gz
e90e077ee170c7806a4657f0fd5778b1  00-opensmtpd.patch
a2f311a82c9a85f5c52975c4dbbdbd53  smtpd.initd
561d2aead043a64a4ce5d66b4f78223e  aliases"
sha256sums="daae044488d456b33aa9c84ebcc79aef2f9ab2d17ebe0c0f09e41e1f4b60d992  opensmtpd-5.7.2p1.tar.gz
1daa9b94e598db9b34e9a1fc717c834519824bdf7e87f1d6729c815ea5ca6acf  00-opensmtpd.patch
ab4b7f066a38dadd7a2dc6d7c3a06c3a8ac2367340d97e2a8b54f571ea0f8cf8  smtpd.initd
7bef80f8d86aa5463c864681482a4908d22ff8b6f3e47d2a410ef2d59b316b53  aliases"
sha512sums="ef9487ba38711fd2a4076022c8fef89c4daf0aac346a72814a9c17f20f830bcd3cba4d85da53867cbc726d2c10fd6773c907ae533e0e022165d7f4aa3bdf1260  opensmtpd-5.7.2p1.tar.gz
c3a60ec3785903b3118feebde6021e20f1eb26a8d6e8b8c72ae19c6f9d6a9a2ceaee32c45a0ac3ff29d24018d169273f931378c1269eec32d7e36e5d98dd475d  00-opensmtpd.patch
8152fecadeb1d818b7865eae040123f855e81fafbb4b40d12a64336e09dc486c10e6828809182c8172bfd9f54dc7d050a154b61d5e6049df6ffd8a7b6e5e1277  smtpd.initd
929ba0b8befca6cad558602f9793a9c653923924ee524902916b8ef4952d1ea8a391895e7450ed9768eb82a07bd307b49561f5d49ea4711bd87a1a73eb8d7dad  aliases"