aboutsummaryrefslogtreecommitdiffstats
path: root/testing/opensmtpd/APKBUILD
blob: ad80dcdf38c6505656aab5d0e2b00b02c8241808 (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
# Contributor: Jonathan Curran <jonathan@curran.in>
# Maintainer: Jonathan Curran <jonathan@curran.in>
pkgname=opensmtpd
pkgver=5.7.1p1
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 \
		--with-mantype=man || return 1
        make || return 1
}

package() {
	cd "$_builddir"
        make DESTDIR=${pkgdir} 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
	install -Dm644 "$srcdir"/aliases "$pkgdir"/etc/smtpd/aliases
}

md5sums="bf81fdc691808efa6acd7bdde5df757f  opensmtpd-5.7.1p1.tar.gz
e90e077ee170c7806a4657f0fd5778b1  00-opensmtpd.patch
a2f311a82c9a85f5c52975c4dbbdbd53  smtpd.initd
561d2aead043a64a4ce5d66b4f78223e  aliases"
sha256sums="67e9dd9682ca8c181e84e66c76245a4a8f6205834f915a2c021cdfeb22049e3a  opensmtpd-5.7.1p1.tar.gz
1daa9b94e598db9b34e9a1fc717c834519824bdf7e87f1d6729c815ea5ca6acf  00-opensmtpd.patch
ab4b7f066a38dadd7a2dc6d7c3a06c3a8ac2367340d97e2a8b54f571ea0f8cf8  smtpd.initd
7bef80f8d86aa5463c864681482a4908d22ff8b6f3e47d2a410ef2d59b316b53  aliases"
sha512sums="df09c980b25a6e91a62f6de83b18e376f6c81a5bf0039fa91da90b2fe4d67bf4bc2dc6787b2d9aca0eb859cc149f980dd9c342516af5262231c97b133f804c1a  opensmtpd-5.7.1p1.tar.gz
c3a60ec3785903b3118feebde6021e20f1eb26a8d6e8b8c72ae19c6f9d6a9a2ceaee32c45a0ac3ff29d24018d169273f931378c1269eec32d7e36e5d98dd475d  00-opensmtpd.patch
8152fecadeb1d818b7865eae040123f855e81fafbb4b40d12a64336e09dc486c10e6828809182c8172bfd9f54dc7d050a154b61d5e6049df6ffd8a7b6e5e1277  smtpd.initd
929ba0b8befca6cad558602f9793a9c653923924ee524902916b8ef4952d1ea8a391895e7450ed9768eb82a07bd307b49561f5d49ea4711bd87a1a73eb8d7dad  aliases"