Lines 7-12
Link Here
|
7 |
|
7 |
|
8 |
PORTNAME= milter-greylist |
8 |
PORTNAME= milter-greylist |
9 |
PORTVERSION= 4.0 |
9 |
PORTVERSION= 4.0 |
|
|
10 |
PORTREVISION= 1 |
10 |
CATEGORIES= mail |
11 |
CATEGORIES= mail |
11 |
MASTER_SITES= ftp://ftp.espci.fr/pub/milter-greylist/ |
12 |
MASTER_SITES= ftp://ftp.espci.fr/pub/milter-greylist/ |
12 |
DISTNAME= milter-greylist-${PORTVERSION} |
13 |
DISTNAME= milter-greylist-${PORTVERSION} |
Lines 29-38
Link Here
|
29 |
# installed port preference over it. |
30 |
# installed port preference over it. |
30 |
## |
31 |
## |
31 |
|
32 |
|
|
|
33 |
.if !defined (NO_INSTALL_MANPAGES) |
32 |
MAN5= greylist.conf.5 |
34 |
MAN5= greylist.conf.5 |
33 |
MAN8= milter-greylist.8 |
35 |
MAN8= milter-greylist.8 |
34 |
|
36 |
.endif |
35 |
.include <bsd.port.pre.mk> |
|
|
36 |
|
37 |
|
37 |
.if !defined(WITH_SENDMAIL_BASE) && \ |
38 |
.if !defined(WITH_SENDMAIL_BASE) && \ |
38 |
!defined(WITH_SENDMAIL_PORT) && \ |
39 |
!defined(WITH_SENDMAIL_PORT) && \ |
Lines 45-51
Link Here
|
45 |
_MILT_DEP= |
46 |
_MILT_DEP= |
46 |
MILTERBASE= /usr |
47 |
MILTERBASE= /usr |
47 |
.else |
48 |
.else |
48 |
BROKEN= "Base system sendmail not found or too old, rebuild with WITH_SENDMAIL_PORT=yes" |
49 |
BROKEN= Base system sendmail not found or too old, rebuild with WITH_SENDMAIL_PORT=yes |
49 |
.endif |
50 |
.endif |
50 |
.else |
51 |
.else |
51 |
_MILT_DEP= ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/sendmail |
52 |
_MILT_DEP= ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/sendmail |
Lines 56-78
Link Here
|
56 |
# If you have a reentrant resolver (starting with RELENG_5_2) you can use SPF |
57 |
# If you have a reentrant resolver (starting with RELENG_5_2) you can use SPF |
57 |
## |
58 |
## |
58 |
.if defined(WITH_LIBSPF2) |
59 |
.if defined(WITH_LIBSPF2) |
59 |
.if ${OSVERSION} < 502102 |
|
|
60 |
IGNORE= Using libspf2 requires a thread safe resolver |
61 |
.else |
62 |
BUILD_DEPENDS+= libspf2>=1.2.5:${PORTSDIR}/mail/libspf2 |
60 |
BUILD_DEPENDS+= libspf2>=1.2.5:${PORTSDIR}/mail/libspf2 |
63 |
CONFIGURE_ARGS+= --with-libspf2=${LOCALBASE} |
61 |
CONFIGURE_ARGS+= --with-libspf2=${LOCALBASE} |
64 |
.endif |
|
|
65 |
.endif |
62 |
.endif |
66 |
.if defined(WITH_GEOIP) |
63 |
.if defined(WITH_GEOIP) |
67 |
BUILD_DEPENDS+= GeoIP>=1.4.4:${PORTSDIR}/net/GeoIP |
64 |
BUILD_DEPENDS+= GeoIP>=1.4.4:${PORTSDIR}/net/GeoIP |
68 |
CONFIGURE_ARGS+= --with-libGeoIP=${LOCALBASE} |
65 |
CONFIGURE_ARGS+= --with-libGeoIP=${LOCALBASE} |
69 |
.endif |
66 |
.endif |
70 |
.if defined(WITH_CURL) |
67 |
.if defined(WITH_CURL) |
71 |
BUILD_DEPENDS+= curl>=7.18:${PORTSDIR}/ftp/curl |
68 |
BUILD_DEPENDS+= curl>=7.18:${PORTSDIR}/ftp/curl |
72 |
CONFIGURE_ARGS+= --with-curl=${LOCALBASE} |
69 |
CONFIGURE_ARGS+= --with-curl=${LOCALBASE} |
73 |
.endif |
70 |
.endif |
74 |
RUN_DEPENDS+= ${BUILD_DEPENDS} |
71 |
RUN_DEPENDS+= ${BUILD_DEPENDS} |
75 |
BUILD_DEPENDS+= ${_MILT_DEP} |
72 |
BUILD_DEPENDS+= ${_MILT_DEP} |
76 |
|
73 |
|
77 |
CFLAGS+= ${PTHREAD_CFLAGS} |
74 |
CFLAGS+= ${PTHREAD_CFLAGS} |
78 |
LIBS+= ${PTHREAD_LIBS} |
75 |
LIBS+= ${PTHREAD_LIBS} |
Lines 80-118
Link Here
|
80 |
GNU_CONFIGURE= yes |
77 |
GNU_CONFIGURE= yes |
81 |
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} |
78 |
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} |
82 |
CONFIGURE_ARGS+= --with-user=mailnull --with-libmilter=${MILTERBASE} |
79 |
CONFIGURE_ARGS+= --with-user=mailnull --with-libmilter=${MILTERBASE} |
83 |
.if ${OSVERSION} >= 502102 |
|
|
84 |
CONFIGURE_ARGS+= --enable-dnsrbl --with-thread-safe-resolver |
85 |
.endif |
86 |
CONFIGURE_ENV+= CFLAGS="${CFLAGS}" LIBS="${LIBS} " |
80 |
CONFIGURE_ENV+= CFLAGS="${CFLAGS}" LIBS="${LIBS} " |
87 |
|
81 |
|
88 |
ALL_TARGET= milter-greylist |
82 |
ALL_TARGET= milter-greylist |
|
|
83 |
SUB_FILES+= pkg-message |
89 |
|
84 |
|
90 |
USE_RC_SUBR= yes |
85 |
USE_RC_SUBR= milter-greylist |
91 |
RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} |
|
|
92 |
|
93 |
post-extract: |
94 |
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ |
95 |
${FILESDIR}/milter-greylist.sh > ${WRKSRC}/milter-greylist.sh |
96 |
|
86 |
|
97 |
do-install: |
87 |
do-install: |
98 |
@${MKDIR} ${PREFIX}/etc/mail |
88 |
@${MKDIR} ${PREFIX}/etc/mail |
99 |
@${INSTALL_PROGRAM} ${WRKSRC}/milter-greylist ${PREFIX}/libexec |
|
|
100 |
@${INSTALL_MAN} ${WRKSRC}/greylist.conf.5 ${PREFIX}/man/man5 |
89 |
@${INSTALL_MAN} ${WRKSRC}/greylist.conf.5 ${PREFIX}/man/man5 |
101 |
@${INSTALL_MAN} ${WRKSRC}/milter-greylist.8 ${PREFIX}/man/man8 |
90 |
@${INSTALL_MAN} ${WRKSRC}/milter-greylist.8 ${PREFIX}/man/man8 |
|
|
91 |
@${INSTALL_PROGRAM} ${WRKSRC}/milter-greylist ${PREFIX}/libexec |
102 |
@${INSTALL_DATA} ${WRKSRC}/greylist.conf \ |
92 |
@${INSTALL_DATA} ${WRKSRC}/greylist.conf \ |
103 |
${PREFIX}/etc/mail/greylist.conf.sample |
93 |
${PREFIX}/etc/mail/greylist.conf.sample |
104 |
@${INSTALL_SCRIPT} ${WRKSRC}/milter-greylist.sh ${PREFIX}/etc/rc.d/ |
|
|
105 |
@${SED} -e "s,%%DOCSDIR%%,${DOCSDIR},g" \ |
106 |
-e "s,%%PREFIX%%,${PREFIX},g" \ |
107 |
${.CURDIR}/pkg-message > ${PKGMESSAGE} |
108 |
|
94 |
|
109 |
post-install: |
95 |
post-install: |
110 |
@${MKDIR} /var/milter-greylist |
96 |
@${MKDIR} /var/milter-greylist |
111 |
@${CHOWN} -R mailnull /var/milter-greylist |
97 |
@${CHOWN} -R mailnull /var/milter-greylist |
112 |
.if !defined(NOPORTDOCS) |
98 |
.if !defined(NOPORTDOCS) |
113 |
@${MKDIR} ${DOCSDIR} |
99 |
@${MKDIR} ${DOCSDIR} |
114 |
@${MKDIR} ${EXAMPLESDIR} |
|
|
115 |
@${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} |
100 |
@${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} |
|
|
101 |
.endif |
102 |
.if !defined (NOPORTEXAMPLES) |
103 |
@${MKDIR} ${EXAMPLESDIR} |
116 |
@${INSTALL_DATA} ${WRKSRC}/greylist.conf ${EXAMPLESDIR} |
104 |
@${INSTALL_DATA} ${WRKSRC}/greylist.conf ${EXAMPLESDIR} |
117 |
.endif |
105 |
.endif |
118 |
@${TEST} -f /var/db/milter-greylist/greylist.db && ( \ |
106 |
@${TEST} -f /var/db/milter-greylist/greylist.db && ( \ |
Lines 131-134
Link Here
|
131 |
) || ${TRUE} |
119 |
) || ${TRUE} |
132 |
@${CAT} ${PKGMESSAGE} |
120 |
@${CAT} ${PKGMESSAGE} |
133 |
|
121 |
|
134 |
.include <bsd.port.post.mk> |
122 |
.include <bsd.port.mk> |