Lines 1-131
Link Here
|
1 |
# ex:ts=8 |
|
|
2 |
# Ports collection makefile for: anubis |
1 |
# Ports collection makefile for: anubis |
3 |
# Date created: Jul 31, 2002 |
2 |
# Date created: Jul 31, 2002 |
4 |
# Whom: ijliao |
3 |
# Whom: ijliao |
5 |
# |
4 |
# |
6 |
# $FreeBSD: ports/mail/anubis/Makefile,v 1.36 2010/05/31 01:59:35 ade Exp $ |
5 |
# $FreeBSD: ports/mail/anubis/Makefile,v 1.36 2010/05/31 01:59:35 ade Exp $ |
7 |
# |
6 |
# |
8 |
########################################################################### |
|
|
9 |
# |
10 |
# Following compile-time options are available: |
11 |
# |
12 |
# WITH_GNUTLS=yes Enable GnuTLS API instead of default OpenSSL API |
13 |
# WITHOUT_OPENSSL=yes Disable the OpenSSL support; unless WITH_GNUTLS |
14 |
# is specified, this will disables TLS/SSL suport |
15 |
# WITHOUT_GPGME=yes Disable the GnuPG (GPGME library) support |
16 |
# WITH_PCRE=yes Enable the PCRE library support |
17 |
# |
18 |
########################################################################### |
19 |
|
7 |
|
20 |
PORTNAME= anubis |
8 |
PORTNAME= anubis |
21 |
PORTVERSION= 3.6.2 |
9 |
PORTVERSION= 4.1.1 |
22 |
PORTREVISION= 10 |
10 |
CATEGORIES= mail |
23 |
CATEGORIES= mail |
11 |
MASTER_SITES= ${MASTER_SITE_GNU} |
24 |
MASTER_SITES= ${MASTER_SITE_GNU} |
|
|
25 |
MASTER_SITE_SUBDIR= ${PORTNAME} |
12 |
MASTER_SITE_SUBDIR= ${PORTNAME} |
26 |
|
13 |
|
27 |
MAINTAINER= ports@FreeBSD.org |
14 |
MAINTAINER= bsdkaffee@gmail.com |
28 |
COMMENT= Outgoing SMTP mail processor |
15 |
COMMENT= Outgoing SMTP mail processor |
|
|
16 |
|
17 |
USE_RC_SUBR= anubis |
18 |
USE_AUTOTOOLS= aclocal autoheader autoconf automake |
19 |
ACLOCAL_ARGS= -I m4 -I am |
20 |
AUTOMAKE_ARGS= --force |
21 |
|
22 |
LICENSE= GPLv3 |
23 |
LICENSE_FILE= ${WRKSRC}/COPYING |
24 |
|
25 |
MAN1= anubis.1 |
26 |
INFO= anubis |
27 |
PORTEXAMPLES= 1anubisrc 2anubisrc |
28 |
|
29 |
CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib" \ |
30 |
CPPFLAGS="-I${LOCALBASE}/include" |
31 |
MAKE_JOBS_UNSAFE= yes |
32 |
|
33 |
OPTIONS= NLS "Native language support" on \ |
34 |
GUILE "Guile support" on \ |
35 |
GPGME "GPG support via gpgme" on \ |
36 |
GNUTLS "GNU TLS support" on \ |
37 |
GSASL "GSASL support (required for databases)" on \ |
38 |
GDBM "GDBM database support" off \ |
39 |
MYSQL "MySQL database support" off \ |
40 |
PGSQL "PostgreSQL database support" off \ |
41 |
PCRE "Perl-style regular expressions" off \ |
42 |
PAM "PAM support" off \ |
43 |
SOCKS "SOCKS proxy support" off \ |
44 |
TCPWRAP "TCP wrappers" off |
45 |
|
46 |
.include <bsd.port.options.mk> |
29 |
|
47 |
|
30 |
GNU_CONFIGURE= yes |
48 |
# Default requirement for anubis rc script |
31 |
CONFIGURE_ENV= MAKEINFO="makeinfo --no-split" LDFLAGS="${LDFLAGS}" \ |
49 |
_REQUIRE= mail |
32 |
CFLAGS="${CFLAGS}" CPPFLAGS="${CFLAGS}" |
|
|
33 |
LDFLAGS+= -L${LOCALBASE}/lib |
34 |
|
50 |
|
35 |
.if defined(WITHOUT_NLS) |
51 |
.if defined(WITHOUT_NLS) |
36 |
CONFIGURE_ARGS+= --disable-nls |
52 |
CONFIGURE_ARGS+=--disable-nls |
37 |
PLIST_SUB+= NLS="@comment " |
53 |
PLIST_SUB+= NLS="@comment " |
38 |
.else |
54 |
.else |
39 |
USE_ICONV= yes |
55 |
USE_ICONV= yes |
40 |
USE_GETTEXT= yes |
56 |
USE_GETTEXT= yes |
41 |
PLIST_SUB+= NLS="" |
57 |
PLIST_SUB+= NLS="" |
42 |
.endif |
58 |
.endif |
43 |
|
59 |
|
44 |
# Select TLS/SSL API: either OpenSSL (default), GnuTLS, or none |
60 |
.if defined(WITHOUT_GUILE) |
45 |
.if defined(WITH_GNUTLS) |
61 |
CONFIGURE_ARGS+=--without-guile |
46 |
LIB_DEPENDS+= gnutls:${PORTSDIR}/security/gnutls |
62 |
PLIST_SUB+= GUILE="@comment " |
47 |
.elif !defined(WITHOUT_OPENSSL) |
|
|
48 |
USE_OPENSSL= yes |
49 |
CONFIGURE_ARGS+= --with-openssl |
50 |
.else |
63 |
.else |
51 |
CONFIGURE_ARGS+= --without-gnutls |
64 |
LIB_DEPENDS+= guile:${PORTSDIR}/lang/guile |
|
|
65 |
PORTEXAMPLES+= anubis.scm anubisrc.guile |
66 |
PLIST_SUB+= GUILE="" |
52 |
.endif |
67 |
.endif |
53 |
|
68 |
|
54 |
# GPGME |
|
|
55 |
.if defined(WITHOUT_GPGME) |
69 |
.if defined(WITHOUT_GPGME) |
56 |
CONFIGURE_ARGS+= --without-gpgme |
70 |
CONFIGURE_ARGS+=--without-gpgme |
57 |
.else |
71 |
.else |
58 |
LIB_DEPENDS+= gpgme03.9:${PORTSDIR}/security/gpgme03 |
72 |
LIB_DEPENDS+= gpgme.18:${PORTSDIR}/security/gpgme |
59 |
CFLAGS+= -I${LOCALBASE}/include/gpgme03 |
|
|
60 |
.endif |
73 |
.endif |
61 |
|
74 |
|
62 |
# PCRE |
75 |
.if defined(WITHOUT_GNUTLS) |
63 |
.if defined(WITH_PCRE) |
76 |
CONFIGURE_ARGS+=--without-gnutls |
64 |
LIB_DEPENDS+= pcre:${PORTSDIR}/devel/pcre |
77 |
.else |
65 |
CONFIGURE_ARGS+= --with-pcre |
78 |
LIB_DEPENDS+= gnutls.40:${PORTSDIR}/security/gnutls |
66 |
.endif |
79 |
.endif |
67 |
|
80 |
|
68 |
# PAM |
81 |
.if defined(WITH_GDBM) |
69 |
.if exists(/usr/lib/libpam.so) |
82 |
.undef WITHOUT_GSASL |
70 |
WITH_PAM= yes |
83 |
WITH_GSASL= yes |
71 |
CONFIGURE_ARGS+= --with-pam |
84 |
LIB_DEPENDS+= gdbm:${PORTSDIR}/databases/gdbm |
72 |
PLIST_SUB+= PAM="" |
85 |
CONFIGURE_ARGS+=--with-gdbm |
73 |
.else |
|
|
74 |
PLIST_SUB+= PAM="@comment " |
75 |
.endif |
86 |
.endif |
76 |
|
87 |
|
77 |
# TCP Wrappers |
88 |
.if defined(WITH_MYSQL) |
78 |
.if exists(/usr/include/tcpd.h) |
89 |
.undef WITHOUT_GSASL |
79 |
WITH_TCP_WRAPPERS= yes |
90 |
WITH_GSASL= yes |
80 |
CONFIGURE_ARGS+= --with-tcp-wrappers |
91 |
USE_MYSQL= yes |
|
|
92 |
CONFIGURE_ARGS+=--with-mysql |
93 |
_REQUIRE+= mysql |
81 |
.endif |
94 |
.endif |
82 |
|
95 |
|
83 |
MAN1= anubis.1 |
96 |
.if defined(WITH_PGSQL) |
84 |
INFO= anubis |
97 |
.undef WITHOUT_GSASL |
85 |
DOCS= AUTHORS INSTALL NEWS README THANKS TODO |
98 |
WITH_GSASL= yes |
|
|
99 |
USE_PGSQL= yes |
100 |
CONFIGURE_ARGS+=--with-postgres |
101 |
_REQUIRE+= postgresql |
102 |
.endif |
86 |
|
103 |
|
87 |
pre-configure: |
104 |
.if defined(WITHOUT_GSASL) |
88 |
@${ECHO_MSG} "" |
105 |
CONFIGURE_ARGS+=--without-gsasl |
89 |
.if defined(WITH_GNUTLS) |
106 |
PLIST_SUB+= GSASL="@comment " |
90 |
@${ECHO_MSG} "Using GnuTLS as TLS/SSL API" |
|
|
91 |
.elif !defined(WITHOUT_OPENSSL) |
92 |
@${ECHO_MSG} "Using OpenSSL as TLS/SSL API" |
93 |
.else |
107 |
.else |
94 |
@${ECHO_MSG} "Disabling TLS/SSL support" |
108 |
LIB_DEPENDS+= gsasl.14:${PORTSDIR}/security/gsasl |
95 |
.endif |
109 |
PLIST_SUB+= GSASL="" |
96 |
.if defined(WITHOUT_GPGME) |
|
|
97 |
@${ECHO_MSG} "Disabling GnuPG (GPGME) support" |
98 |
.endif |
110 |
.endif |
|
|
111 |
|
99 |
.if defined(WITH_PCRE) |
112 |
.if defined(WITH_PCRE) |
100 |
@${ECHO_MSG} "Enabling PCRE support" |
113 |
LIB_DEPENDS+= pcre:${PORTSDIR}/devel/pcre |
101 |
.else |
114 |
CONFIGURE_ARGS+=--with-pcre |
102 |
@${ECHO_MSG} "You could define WITH_PCRE to enable PCRE support" |
|
|
103 |
.endif |
115 |
.endif |
104 |
.if defined(WITH_PAM) |
116 |
|
105 |
@${ECHO_MSG} "Enabling PAM support" |
117 |
.if defined(WITH_PAM) && exists(/usr/lib/libpam.so) |
|
|
118 |
CONFIGURE_ARGS+=--with-pam |
119 |
PORTEXAMPLES+= pam |
106 |
.endif |
120 |
.endif |
107 |
.if defined(WITH_TCP_WRAPPERS) |
121 |
|
108 |
@${ECHO_MSG} "Enabling TCP wrappers support" |
122 |
.if defined(WITH_TCPWRAP) && exists(/usr/include/tcpd.h) |
|
|
123 |
CONFIGURE_ARGS+=--with-tcp-wrappers |
124 |
.endif |
125 |
|
126 |
.if defined(WITH_SOCKS) |
127 |
CONFIGURE_ARGS+=--with-socks-proxy |
109 |
.endif |
128 |
.endif |
110 |
@${ECHO_MSG} "" |
129 |
|
111 |
@${RM} -f ${WRKSRC}/doc/anubis.info* |
130 |
SUB_LIST+= REQUIRE="${_REQUIRE}" |
112 |
|
131 |
|
113 |
post-patch: |
132 |
post-patch: |
114 |
@${REINPLACE_CMD} -e "s|/etc|${PREFIX}/etc|g" ${WRKSRC}/src/headers.h |
133 |
@${REINPLACE_CMD} -e "s|/etc|${PREFIX}/etc|g" ${WRKSRC}/src/headers.h |
115 |
@${SED} -e "s|%%PREFIX%%|${PREFIX}|g" ${FILESDIR}/anubis.sh > \ |
|
|
116 |
${WRKSRC}/anubis.sh |
117 |
|
134 |
|
|
|
135 |
.if !defined(NOPORTEXAMPLES) |
118 |
post-install: |
136 |
post-install: |
119 |
${INSTALL_SCRIPT} ${WRKSRC}/anubis.sh ${PREFIX}/etc/rc.d/anubis.sh.sample |
|
|
120 |
@${MKDIR} ${EXAMPLESDIR} |
137 |
@${MKDIR} ${EXAMPLESDIR} |
121 |
${INSTALL_DATA} ${WRKSRC}/examples/*rc ${EXAMPLESDIR} |
138 |
${INSTALL_DATA} ${WRKSRC}/examples/*rc ${EXAMPLESDIR} |
|
|
139 |
.if defined(WITH_GUILE) |
140 |
cd ${WRKSRC}/examples && \ |
141 |
${INSTALL_DATA} anubis.scm anubisrc.guile ${EXAMPLESDIR} |
142 |
.endif |
122 |
.if defined(WITH_PAM) |
143 |
.if defined(WITH_PAM) |
123 |
@${MKDIR} ${EXAMPLESDIR}/pam |
144 |
@${MKDIR} ${EXAMPLESDIR}/pam |
124 |
${INSTALL_DATA} ${WRKSRC}/examples/pam/* ${EXAMPLESDIR}/pam |
145 |
${INSTALL_DATA} ${WRKSRC}/examples/pam/anubis* ${EXAMPLESDIR}/pam |
125 |
.endif |
146 |
.endif |
126 |
.if !defined(NOPORTDOCS) |
|
|
127 |
@${MKDIR} ${DOCSDIR} |
128 |
cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR} |
129 |
.endif |
147 |
.endif |
130 |
|
148 |
|
131 |
.include <bsd.port.mk> |
149 |
.include <bsd.port.mk> |