mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-03 01:23:49 +00:00
mail/milter-greylist: Fix and simplify makefile
This port was conditionally installing manpages per option, which is not allowed. While fixing this, align it with the recently modernized milter-greylist-devel port, which includes: * Remove assignment of BUILD_DEPENDS to RUN_DEPENDS (illegal). The BUILD_DEPENDS is empty by default * Use options to set dependencies and configure arguments * Use PORTDOCS and PORTEXAMPLES * Wrap to 80 columns * Combine post-install target with do-install target * include local .mk with relative path instead of hardcoded PORTSDIR PR: 192740 Submitted by: Daniel Austin (per my request) Approved by: Just Fix It
This commit is contained in:
parent
60257e8c61
commit
6864059d78
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=365186
@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= milter-greylist
|
||||
PORTVERSION= 4.4.3
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= mail
|
||||
MASTER_SITES= ftp://ftp.espci.fr/pub/milter-greylist/ \
|
||||
http://fossies.org/unix/privat/
|
||||
@ -30,71 +30,71 @@ MAKE_JOBS_UNSAFE= yes
|
||||
# installed port preference over it.
|
||||
##
|
||||
|
||||
OPTIONS_DEFINE= MANPAGES SPF GEOIP CURL LDAP P0F POSTFIX DOCS EXAMPLES
|
||||
OPTIONS_DEFAULT= MANPAGES
|
||||
OPTIONS_DEFINE= SPF GEOIP CURL LDAP P0F POSTFIX DOCS EXAMPLES
|
||||
SPF_DESC= SPF support
|
||||
CURL_DESC= curl support
|
||||
P0F_DESC= P0F support
|
||||
POSTFIX_DESC= Use Postfix instead of Sendmail
|
||||
|
||||
P0F_RUN_DEPENDS+= p0f:${PORTSDIR}/net-mgmt/p0f
|
||||
SPF_BUILD_DEPENDS+= libspf2>=1.2.5:${PORTSDIR}/mail/libspf2
|
||||
CURL_BUILD_DEPENDS+= curl>=7.18:${PORTSDIR}/ftp/curl
|
||||
GEOIP_BUILD_DEPENDS+= GeoIP>=1.4.4:${PORTSDIR}/net/GeoIP
|
||||
|
||||
POSTFIX_CONFIGURE_ENABLE= postfix
|
||||
P0F_CONFIGURE_ENABLE= p0f306
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MMANPAGES}
|
||||
PLIST_FILES+= man/man5/greylist.conf.5.gz \
|
||||
man/man8/milter-greylist.8.gz
|
||||
.endif
|
||||
.if ${PORT_OPTIONS:MSPF}
|
||||
BUILD_DEPENDS+= libspf2>=1.2.5:${PORTSDIR}/mail/libspf2
|
||||
CONFIGURE_ARGS+= --with-libspf2=${LOCALBASE}
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MGEOIP}
|
||||
BUILD_DEPENDS+= GeoIP>=1.4.4:${PORTSDIR}/net/GeoIP
|
||||
CONFIGURE_ARGS+= --with-libGeoIP=${LOCALBASE}
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MCURL}
|
||||
BUILD_DEPENDS+= curl>=7.18:${PORTSDIR}/ftp/curl
|
||||
CONFIGURE_ARGS+= --with-libcurl=${LOCALBASE}
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MLDAP}
|
||||
# We can't use LDAP_CONFIGURE_WITH because configure script is buggy
|
||||
USE_OPENLDAP=yes
|
||||
CONFIGURE_ARGS+= --with-openldap
|
||||
.endif
|
||||
.if ${PORT_OPTIONS:MP0F}
|
||||
RUN_DEPENDS+= p0f:${PORTSDIR}/net-mgmt/p0f
|
||||
CONFIGURE_ARGS+= --enable-p0f306
|
||||
.endif
|
||||
.if ${PORT_OPTIONS:MPOSTFIX}
|
||||
CONFIGURE_ARGS+= --enable-postfix
|
||||
.else
|
||||
|
||||
.if ! ${PORT_OPTIONS:MPOSTFIX}
|
||||
LDFLAGS+= ${SENDMAIL_LDFLAGS}
|
||||
LIBS+= ${SENDMAIL_LDADD}
|
||||
.endif
|
||||
RUN_DEPENDS+= ${BUILD_DEPENDS}
|
||||
|
||||
CFLAGS+= ${PTHREAD_CFLAGS}
|
||||
LIBS+= ${PTHREAD_LIBS}
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_ARGS+= --with-user=mailnull --with-libmilter=${MILTERBASE} \
|
||||
--enable-dnsrbl --with-thread-safe-resolver \
|
||||
CONFIGURE_ARGS+= --with-user=mailnull \
|
||||
--with-libmilter=${MILTERBASE} \
|
||||
--enable-dnsrbl \
|
||||
--with-thread-safe-resolver \
|
||||
--with-dumpfile=/var/milter-greylist/greylist.db
|
||||
|
||||
ALL_TARGET= milter-greylist
|
||||
SUB_FILES+= pkg-message
|
||||
|
||||
USE_RC_SUBR= milter-greylist
|
||||
PORTDOCS= README
|
||||
PORTEXAMPLES= greylist.conf
|
||||
|
||||
do-install:
|
||||
${MKDIR} ${STAGEDIR}${PREFIX}/etc/mail
|
||||
.if ${PORT_OPTIONS:MMANPAGES}
|
||||
${INSTALL_MAN} ${WRKSRC}/greylist.conf.5 ${STAGEDIR}${PREFIX}/man/man5/
|
||||
${INSTALL_MAN} ${WRKSRC}/milter-greylist.8 ${STAGEDIR}${PREFIX}/man/man8/
|
||||
.endif
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/milter-greylist ${STAGEDIR}${PREFIX}/libexec/
|
||||
${INSTALL_MAN} ${WRKSRC}/greylist.conf.5 \
|
||||
${STAGEDIR}${PREFIX}/man/man5/
|
||||
${INSTALL_MAN} ${WRKSRC}/milter-greylist.8 \
|
||||
${STAGEDIR}${PREFIX}/man/man8/
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/milter-greylist \
|
||||
${STAGEDIR}${PREFIX}/libexec/
|
||||
${INSTALL_DATA} ${WRKSRC}/greylist.conf \
|
||||
${STAGEDIR}${PREFIX}/etc/mail/greylist.conf.sample
|
||||
|
||||
post-install:
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}/
|
||||
@ -104,6 +104,6 @@ post-install:
|
||||
${INSTALL_DATA} ${WRKSRC}/greylist.conf ${STAGEDIR}${EXAMPLESDIR}/
|
||||
.endif
|
||||
|
||||
.include "${PORTSDIR}/mail/sendmail/bsd.milter.mk"
|
||||
.include "${.CURDIR}/../sendmail/bsd.milter.mk"
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,11 +1,9 @@
|
||||
libexec/milter-greylist
|
||||
man/man5/greylist.conf.5.gz
|
||||
man/man8/milter-greylist.8.gz
|
||||
etc/mail/greylist.conf.sample
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/greylist.conf
|
||||
@exec /bin/mkdir -p /var/milter-greylist
|
||||
@exec /usr/sbin/chown -R mailnull:mailnull /var/milter-greylist
|
||||
@exec [ -f /var/db/milter-greylist/greylist.db ] && printf '\n\n************************************************************\n************************************************************\n** **\n** WARNING **\n** **\n** The default dump file location has changed. **\n** Please move greylist.db from /var/db/milter-greylist/ **\n** to /var/milter-greylist/ and update your greylist.conf **\n** accordingly. **\n** **\n************************************************************\n************************************************************\n' ||true
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%
|
||||
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
|
||||
@dirrmtry etc/mail
|
||||
@unexec [ -f /var/milter-greylist/greylist.db ] || rmdir /var/milter-greylist || true
|
||||
|
Loading…
Reference in New Issue
Block a user