summaryrefslogtreecommitdiff
blob: 6229e20cb006747f2eeea34f7c928b5a3d73af28 (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
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=5

inherit eutils flag-o-matic autotools versionator

DESCRIPTION="Extra tables, filters, and various other addons for OpenSMTPD"
HOMEPAGE="https://github.com/OpenSMTPD/OpenSMTPD-extras"
SRC_URI="https://www.opensmtpd.org/archives/${PN}-$(get_version_component_range 4-).tar.gz"

LICENSE="ISC BSD BSD-1 BSD-2 BSD-4"
SLOT="0"
KEYWORDS=""
MY_COMPONENTS="
	filter-monkey
	filter-stub
	filter-trace
	filter-void

	queue-null
	queue-python
	queue-ram
	queue-stub

	scheduler-python
	scheduler-ram
	scheduler-stub

	table-ldap
	table-mysql
	table-passwd
	table-postgres
	table-python
	table-redis
	table-socketmap
	table-sqlite
	table-stub
"
IUSE="${MY_COMPONENTS} libressl luajit"

# Deps:
# mysql needs -lmysqlclient
# sqlite needs -lsqlite3
# redis needs -lhiredis
# postgres requires -lpq
# ldap uses internal library and requires no deps
# spamassassin uses internal library and requires no deps
# clamav uses internal library and requires no deps
# dnsbl needs -lasr
# python requires python, currently pegged at 2.7
# lua requires any lua version

#filter-python? ( dev-lang/python:2.7 )
#filter-perl? ( dev-lang/perl )
#filter-dnsbl? ( net-libs/libasr )
#filter-lua? ( luajit? ( dev-lang/luajit:2 ) !luajit? ( dev-lang/lua:* ) )
DEPEND="mail-mta/opensmtpd
	dev-libs/libevent
	!libressl? ( dev-libs/openssl:0 )
	libressl? ( dev-libs/libressl )
	table-sqlite? ( dev-db/sqlite:3 )
	table-mysql? ( dev-db/mysql-connector-c:0= )
	table-postgres? ( dev-db/postgresql:* )
	table-redis? ( dev-libs/hiredis )
	table-python? ( dev-lang/python:2.7 )
	scheduler-python? ( dev-lang/python:2.7 )
	queue-python? ( dev-lang/python:2.7 )
"
RDEPEND="${DEPEND}"

S=${WORKDIR}/${PN}-$(get_version_component_range 4-)

src_prepare() {
	eautoreconf
}
src_configure() {
	econf $(for use in $MY_COMPONENTS; do use_with $use; done) \
		--with-user-smtpd=smtpd \
		--sysconfdir=/etc/opensmtpd
		#--with-lua-type=$(usex luajit luajit lua) \
}