blob: fb1394495099b769ad08a44aa27c0f6e222c97fd (
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
|
# Contributor: Shiz <hi@shiz.me>
# Maintainer: Shiz <hi@shiz.me>
pkgname=opensmtpd-extras
pkgver=201703132115
pkgrel=5
pkgdesc="OpenSMTPD addons"
url="https://opensmtpd.org/"
arch="all"
license="ISC"
depends=""
makedepends="libevent-dev python2-dev mariadb-connector-c-dev postgresql-dev
hiredis-dev sqlite-dev"
subpackages="$pkgname-doc"
source="https://www.opensmtpd.org/archives/$pkgname-$pkgver.tar.gz
0001-uint8_t-is-defined-in-stdint.h-at-least-on-Linux.patch
0002-wrap-stdint.h-in-autoconf-variables.patch
0003-table-ldap-reconnect.patch
0004-Add-ldap-reconnection-logic-to-lookup-function-reord.patch
fix-opensmtpd-5.9+-compat.patch
remove-decls.patch
"
builddir="$srcdir/$pkgname-$pkgver"
options="!check" # upstream does not provide tests
_extras="
table-ldap
table-mysql
table-passwd
table-postgres
table-python
table-redis
table-socketmap
table-sqlite
table-stub
"
for _extra in $_extras; do
subpackages="$subpackages opensmtpd-$_extra:_package_extra"
depends="$depends opensmtpd-$_extra"
done
build() {
cd "$builddir"
local with_extras
local extra; for extra in $_extras; do
with_extras="$with_extras --with-$extra"
done
./configure \
--prefix=/usr \
--sysconfdir=/etc/smtpd \
--mandir=/usr/share/man \
--libexecdir=/usr/lib \
--with-pie \
--with-mantype=man \
$with_extras
# the Redis table expects <hiredis.h> without subdirectory, so indulge it
make REDIS_CPPFLAGS='-I /usr/include/hiredis'
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
}
_package_extra() {
local name="${subpkgname#opensmtpd-}"
pkgdesc="OpenSMTPD $name addon"
depends=""
mkdir -p "$subpkgdir"/usr/lib/opensmtpd
mv "$pkgdir"/usr/lib/opensmtpd/$name "$subpkgdir"/usr/lib/opensmtpd/
}
sha512sums="d841c63445ca674b368a5aa6012ae90e46b0c31b650067bdcea5badca3d818b1b732be880b2a18421fb39d07291dd413455944b178597bc13ae6ff5c75ac9aed opensmtpd-extras-201703132115.tar.gz
2e12845233437bef691ef92a2b4ffcc307b7cd72ec61b2063604034e28266550940ed432ef66a871fe82030df68b01cdd50ac97a255bf7724ab62a43d45ca4e5 0001-uint8_t-is-defined-in-stdint.h-at-least-on-Linux.patch
df6f52669e1df3d2b134fa8ec99795b0cef3f6aa38ccb5f85def240370b487988d6576fb769dee7d3eba30cfb291298b1c5a22433f4e6243307c589a7bbdb538 0002-wrap-stdint.h-in-autoconf-variables.patch
bc356eca9e74b926979b3fafe14472aa4035a4ad47b9295a24d03906e33b115dbd890a038af563edf8f8d866bb2ab68ccb94a66ce9c5e2b05541e2b086276882 0003-table-ldap-reconnect.patch
202017bfd952acde8fa8edc0e6ae4c38c178c1cba7643bb87cb3d311b1f8a3cacd9d73f9a5617430abd3dd93ba755a37a96fbf4f5a40d794d232752ef847abcd 0004-Add-ldap-reconnection-logic-to-lookup-function-reord.patch
e14990a94c9114958b1070467ca1119162b24a8ef9c4fee1ff6deb8b18bdc2a532e952e65fce1f6e5346c3bb784d623773a237d48384143c2cdcce80f60a5d4a fix-opensmtpd-5.9+-compat.patch
36efd3b6cf75728cc8b75b3d9d6bf464d1e949ccfbe6151ed53dbba0f9ee1e50eb61afcca05af302ab359bc9ea1136e7750a15e5f5b824899141298d3060782a remove-decls.patch"
|