blob: c773420e873a39d0ee58df715cf717a3eb5a77c6 (
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
|
# Maintainer: Wilhelm Schuster <wilhelm [aT] wilhelm [.] re>
pkgname=opensmtpd-extras
pkgver=5.7.1
pkgrel=2
pkgdesc="Additional filters, tables, queues, etc. for OpenSMTPd"
arch=('i686' 'x86_64')
url="https://opensmtpd.org"
license=('custom:opensmtpd')
depends=('opensmtpd')
makedepends=('python2' 'lua' 'perl' 'libmariadbclient' 'postgresql-libs' 'hiredis' 'sqlite' 'libasr' 'openssl')
optdepends=('python2: python support for filters, tables, scheduler, and queues'
'clamav: clamav filters'
'lua: lua support for filters'
'perl: perl support for filters'
'spamassassin: spamassassin filters'
'libmariadbclient: mysql support for tables'
'postgresql-libs: postgresql support for tables'
'hiredis: redis support for tables'
'sqlite: sqlite support for tables')
backup=('etc/smptd/filter-regex.conf')
source=("https://www.opensmtpd.org/archives/$pkgname-$pkgver.tar.gz")
sha256sums=('b56dc24427afe7d6156c85232427fe33a260aca8873eb118d0229dff3a248dce')
prepare() {
cd "$pkgname-$pkgver"
# Fix for python2
sed -i 's/python-config/python2-config/g' configure
# Fix config file locations
sed -i 's;/etc/mail/filter-regex.conf;/etc/smtpd/filter-regex.conf;g' "extras/wip/filters/filter-regex/filter_regex.c"
}
build() {
cd "$pkgname-$pkgver"
./configure \
--prefix=/usr \
--sysconfdir=/etc/smtpd \
--libexecdir=/usr/lib/smtpd \
--with-sock-dir=/run \
--with-privsep-path=/var/empty \
--with-privsep-user=smtpd \
--with-queue-user=smtpq \
--with-filter-clamav \
--with-filter-dkim-signer \
--with-filter-dnsbl \
--with-filter-lua \
--with-filter-monkey \
--with-filter-pause \
--with-filter-perl \
--with-filter-python \
--with-filter-regex \
--with-filter-spamassassin \
--with-filter-trace \
--with-filter-void \
--with-queue-null \
--with-queue-python \
--with-queue-ram \
--with-table-ldap \
--with-table-mysql \
--with-table-postgres \
--with-table-redis \
--with-table-socketmap \
--with-table-passwd \
--with-table-python \
--with-table-sqlite \
--with-scheduler-ram \
--with-scheduler-python
make
}
check() {
cd "$pkgname-$pkgver"
make -k check
}
package() {
cd "$pkgname-$pkgver"
make DESTDIR="$pkgdir/" install
install -Dm644 "extras/wip/filters/filter-regex/filter-regex.conf" "$pkgdir/etc/smtpd/filter-regex.conf"
install -Dm644 "extras/wip/queues/queue-python/scripts/queue_ram.py" "$pkgdir/usr/share/opensmtpd/queues/queue-python/scripts/queue_ram.py"
}
|