aboutsummaryrefslogtreecommitdiffstats
path: root/mail/opensmtpd-devel/Makefile
blob: 4b3a822baea65935309d1e322ec83ecb5f4e3639 (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
# Created by: Ashish SHUKLA <ashish@FreeBSD.org>
# $FreeBSD$

PORTNAME=   opensmtpd
PORTVERSION=    201405202105
PORTREVISION=   1
PORTEPOCH=  1
CATEGORIES= mail
MASTER_SITES=   http://www.opensmtpd.org/archives/ \
        http://distfiles.pirateparty.in/ashish/
PKGNAMESUFFIX=  -devel
DISTNAME=   ${PORTNAME}-${PORTVERSION}p1

MAINTAINER= ashish@FreeBSD.org
COMMENT=    OpenSMTPD is a free MTA (development snapshot)

LICENSE=    ISCL
LICENSE_FILE=   ${WRKSRC}/LICENSE

LIB_DEPENDS=    libevent-1.4.so:${PORTSDIR}/devel/libevent

OPENSMTPD_SNAPSHOT_VER= p1

OPTIONS_DEFINE= CA_BUNDLE PAM SQLITE MYSQL PGSQL LDAP REDIS

OPTIONS_DEFAULT=    CA_BUNDLE PAM

CA_BUNDLE_DESC= Install CA bundle for OpenSSL

GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --with-libevent-dir=${LOCALBASE} --sysconfdir=${PREFIX}/etc/mail/ \
        --with-mailwrapper

USE_RC_SUBR=    smtpd
SUB_FILES=  pkg-install pkg-deinstall

CONFLICTS_INSTALL=  postfix-[0-9]* sendmail-[0-9]* opensmtpd-[0-9]*

MAN8=       makemap.8 newaliases.8 sendmail.8 smtpctl.8 smtpd.8
MAN5=       smtpd.conf.5 aliases.5 forward.5

USERS=      _smtpd _smtpq
GROUPS=     _smtpd

OPTIONS_SUB=        MYSQL SQLITE PGSQL LDAP REDIS

CA_BUNDLE_CONFIGURE_ON= --with-ca-file=${LOCALBASE}/share/certs/ca-root-nss.crt
CA_BUNDLE_RUN_DEPENDS=  ${LOCALBASE}/share/certs/ca-root-nss.crt:${PORTSDIR}/security/ca_root_nss

MYSQL_USE=      MYSQL=yes
MYSQL_CFLAGS=       -I${LOCALBASE}/include/mysql
MYSQL_LDFLAGS=      -L${LOCALBASE}/lib/mysql
MYSQL_CONFIGURE_ON= --with-experimental-mysql

SQLITE_USE=     SQLITE=3
SQLITE_CFLAGS=      -I${LOCALBASE}/include
SQLITE_LDFLAGS=     -L${LOCALBASE}/lib
SQLITE_CONFIGURE_ON=    --with-experimental-sqlite

PGSQL_USE=      PGSQL=yes
PGSQL_CONFIGURE_ON= --with-experimental-postgres

LDAP_CONFIGURE_ON=  --with-experimental-ldap

PAM_CONFIGURE_ON=   --with-pam --with-pam-service=smtpd

REDIS_LIB_DEPENDS=  hiredis:${PORTSDIR}/databases/hiredis
REDIS_CONFIGURE_ON= --with-experimental-redis

USE_OPENSSL=        yes
WITH_OPENSSL_PORT=  yes

post-deinstall:
        @${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-DEINSTALL

.include <bsd.port.mk>