summaryrefslogtreecommitdiff
path: root/mail/spamassassin
diff options
context:
space:
mode:
authorjlam <jlam>2003-09-13 17:57:21 +0000
committerjlam <jlam>2003-09-13 17:57:21 +0000
commita6df378a353717500576ab4fc16c0be3eea76fcc (patch)
tree6d8e848d8cad9bd741edc24d32d8ce0bf6cf7a75 /mail/spamassassin
parent88c286ed8cd47c1cb907ecc76e48da4740f993a8 (diff)
downloadpkgsrc-a6df378a353717500576ab4fc16c0be3eea76fcc.tar.gz
* Provide a default SPAMASSASSIN_USE_SSL?=NO.
* Use ALL_TARGET appropriately instead of using a post-build target. * Get rid of DEPTHFIRST* variables and do the "depth-first" listing by using a reverse sort instead. * Get rid of extra shell processes. * Tabify.
Diffstat (limited to 'mail/spamassassin')
-rw-r--r--mail/spamassassin/Makefile124
1 files changed, 61 insertions, 63 deletions
diff --git a/mail/spamassassin/Makefile b/mail/spamassassin/Makefile
index 5f139062e4b..2840dc5fe99 100644
--- a/mail/spamassassin/Makefile
+++ b/mail/spamassassin/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.30 2003/09/13 17:17:09 jlam Exp $
+# $NetBSD: Makefile,v 1.31 2003/09/13 17:57:21 jlam Exp $
DISTNAME= Mail-SpamAssassin-2.55
PKGNAME= spamassassin-2.55
@@ -26,14 +26,19 @@ DEPENDS+= p5-MIME-Base64>=2.11:../../converters/p5-MIME-Base64
DEPENDS+= p5-DB_File-[0-9]*:../../databases/p5-DB_File
.endif
-.if defined(SPAMASSASSIN_USE_SSL) && ${SPAMASSASSIN_USE_SSL} == "YES"
+ALL_TARGET= all
+
+SPAMASSASSIN_USE_SSL?= NO
+BUILD_DEFS+= SPAMASSASSIN_USE_SSL
+
+.if !empty(SPAMASSASSIN_USE_SSL:M[yY][eE][sS])
. include "../../security/openssl/buildlink2.mk"
DEPENDS+= p5-IO-Socket-SSL>=0.92:../../security/p5-IO-Socket-SSL
CONFIGURE_ARGS+= --enable-ssl
+ALL_TARGET+= spamd/sslspamc
.else
CONFIGURE_ARGS+= --disable-ssl
.endif
-BUILD_DEFS+= SPAMASSASSIN_USE_SSL
USE_BUILDLINK2= YES
USE_PKGINSTALL= YES
@@ -55,8 +60,9 @@ RCD_SCRIPTS= spamd
RCD_SCRIPT_SRC.spamd= ${WRKDIR}/${DISTNAME}/spamd/netbsd-rc-script.sh
EGDIR= ${PREFIX}/share/examples/spamassassin
-DOCDIRNOPREFIX= share/doc/spamassassin
-DOCDIR= ${PREFIX}/${DOCDIRNOPREFIX}
+DOCDIR= ${PREFIX}/share/doc/spamassassin
+DOC_SUBDIR= ${DOCDIR:S,^${PREFIX}/,,}
+HTMLDIR= ${PREFIX}/share/doc/html/spamassassin
RULESDIR= ${PREFIX}/share/spamassassin
CONF_FILES+= ${EGDIR}/local.cf ${PKG_SYSCONFDIR}/local.cf
@@ -67,21 +73,17 @@ SUPPORT_FILES_PERMS+= ${EGDIR}/netbsd_lists.cf \
${SHAREGRP} ${SHAREMODE}
.if ${OPSYS} == "NetBSD"
-DEPTHFIRST1= -d
-DEPTHFIRST2= # empty
# the 'spamd' RCD_SCRIPT behaves differently if we run NetBSD 1.6 or later
. if ${OS_VERSION:M1.[0-5]*}
- INTERPRETER_SUPPORT=NO
+INTERPRETER_SUPPORT= NO
. else
- INTERPRETER_SUPPORT=YES
+INTERPRETER_SUPPORT= YES
. endif
-.else
-# this needs to be more OS-specific
-DEPTHFIRST1= # empty
-DEPTHFIRST2= -depth
.endif
-FILES_SUBST+= INTERPRETER_SUPPORT="${INTERPRETER_SUPPORT}"
-FILES_SUBST+= OPSYS="${OPSYS}"
+
+# These values are substituted into netbsd-rc-script.sh.
+FILES_SUBST+= INTERPRETER_SUPPORT="${INTERPRETER_SUPPORT}"
+FILES_SUBST+= OPSYS="${OPSYS}"
post-extract:
@# correct bad SA permissions
@@ -94,73 +96,69 @@ post-extract:
post-patch:
.for f in INSTALL README USAGE lib/Mail/SpamAssassin/Conf.pm \
spamd/README.spamd spamd/README.spamd-vpopmail sql/README
- @${SED} -e "s,/usr/share,${PREFIX}/share,g" \
+ @${SED} -e "s,/usr/share,${PREFIX}/share,g" \
-e "s,/usr/bin,${PREFIX}/bin,g" \
-e "s,/usr/lib,${PREFIX}/lib,g" \
-e "s,/etc/mail/spamassassin,${PKG_SYSCONFDIR},g" \
- ${WRKSRC}/${f} > ${WRKSRC}/${f}.fixed && \
- ${MV} ${WRKSRC}/${f}.fixed ${WRKSRC}/${f}
+ ${WRKSRC}/${f} > ${WRKSRC}/${f}.fixed; \
+ ${MV} ${WRKSRC}/${f}.fixed ${WRKSRC}/${f}
.endfor
pre-configure: perl5-configure
-.if defined(SPAMASSASSIN_USE_SSL) && ${SPAMASSASSIN_USE_SSL} == "YES"
-post-build:
- @(cd ${WRKSRC}; \
- ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} spamd/sslspamc )
-.endif
-
pre-install:
@-${TEST} -r ${PLIST_ADD} && ${RM} ${PLIST_ADD} ; :
@${INSTALL_DATA_DIR} ${EGDIR}
@${INSTALL_DATA_DIR} ${DOCDIR}/spamd
- @${INSTALL_DATA_DIR} ${PREFIX}/share/doc/html/spamassassin
- @ # ninja image is in the static PLIST
- @${INSTALL_DATA} ${WRKSRC}/ninjabutton.png \
- ${PREFIX}/share/doc/html/spamassassin/
+ @${INSTALL_DATA_DIR} ${HTMLDIR}
+ @# ninja image is in the static PLIST
+ @${INSTALL_DATA} ${WRKSRC}/ninjabutton.png ${HTMLDIR}/
.for f in CONTRIB_CERT COPYRIGHT INSTALL License README TRADEMARK USAGE \
- sample-nonspam.txt sample-spam.txt spamd/README.spamd \
- spamd/README.spamd-vpopmail
+ sample-nonspam.txt sample-spam.txt spamd/README.spamd \
+ spamd/README.spamd-vpopmail
@${INSTALL_DATA} ${WRKSRC}/$f ${DOCDIR}/$f
- @${ECHO} "${DOCDIRNOPREFIX}/$f" >> ${PLIST_ADD}
+ @${ECHO} "${DOC_SUBDIR}/$f" >> ${PLIST_ADD}
.endfor
- @${ECHO} "@dirrm ${DOCDIRNOPREFIX}/spamd" >> ${PLIST_ADD}
+ @${ECHO} "@dirrm ${DOC_SUBDIR}/spamd" >> ${PLIST_ADD}
.for f in STATISTICS.txt STATISTICS-set1.txt STATISTICS-set2.txt \
- STATISTICS-set3.txt
+ STATISTICS-set3.txt
@${INSTALL_DATA} ${WRKSRC}/rules/$f ${DOCDIR}/
- @${ECHO} "${DOCDIRNOPREFIX}/$f" >> ${PLIST_ADD}
+ @${ECHO} "${DOC_SUBDIR}/$f" >> ${PLIST_ADD}
.endfor
.for DIR in masses qmail sql tools
- @(cd ${WRKSRC} && \
- for d in `${FIND} ${DIR} -type d -print`; do \
- ${INSTALL_DATA_DIR} ${DOCDIR}/$$d; \
- done && \
- for f in `${FIND} ${DIR} -type f -print`; do \
- if ${TEST} -f $$f; then \
- if ${TEST} -x $$f ; then \
- ${SED} -e "1s,/usr/bin/perl,${PERL5}," \
- -e "1s,/usr/local/bin/perl,${PERL5}," < $$f \
- > $${f}.fixed && ${MV} $${f}.fixed $$f && \
- ${CHMOD} +x $$f && \
- ${INSTALL_SCRIPT} $$f ${DOCDIR}/$$f; \
- else \
- ${INSTALL_DATA} $$f ${DOCDIR}/$$f; \
- fi && \
- ${ECHO} "${DOCDIRNOPREFIX}/$$f" >> ${PLIST_ADD}; \
- fi; \
- done && \
- for d in `${FIND} ${DEPTHFIRST1} ${DIR} ${DEPTHFIRST2} -type d\
- -print`; do \
- ${ECHO} "@dirrm ${DOCDIRNOPREFIX}/$$d" >> ${PLIST_ADD}; \
- done)
+ @cd ${WRKSRC}; \
+ for d in `${FIND} ${DIR} -type d -print`; do \
+ ${INSTALL_DATA_DIR} ${DOCDIR}/$$d; \
+ done; \
+ for f in `${FIND} ${DIR} -type f -print`; do \
+ if ${TEST} -f $$f; then \
+ : ; \
+ else \
+ continue; \
+ fi; \
+ if ${TEST} -x $$f ; then \
+ ${SED} -e "1s,/usr/bin/perl,${PERL5}," \
+ -e "1s,/usr/local/bin/perl,${PERL5}," \
+ $$f > $${f}.fixed; \
+ ${MV} $${f}.fixed $$f; \
+ ${CHMOD} +x $$f; \
+ ${INSTALL_SCRIPT} $$f ${DOCDIR}/$$f; \
+ else \
+ ${INSTALL_DATA} $$f ${DOCDIR}/$$f; \
+ fi; \
+ ${ECHO} "${DOC_SUBDIR}/$$f" >> ${PLIST_ADD}; \
+ done; \
+ (for d in `${FIND} ${DIR} -type d -print`; do \
+ ${ECHO} "@dirrm ${DOC_SUBDIR}/$$d"; \
+ done) | ${SORT} -r >> ${PLIST_ADD}
.endfor
- @${ECHO} "@dirrm ${DOCDIRNOPREFIX}" >> ${PLIST_ADD}
- @(cd ${WRKSRC}/rules && \
- for f in [0-9]*.cf; do \
- ${ECHO} "share/spamassassin/$$f" >> ${PLIST_ADD}; \
- done)
+ @${ECHO} "@dirrm ${DOC_SUBDIR}" >> ${PLIST_ADD}
+ @cd ${WRKSRC}/rules; \
+ for f in [0-9]*.cf; do \
+ ${ECHO} "share/spamassassin/$$f" >> ${PLIST_ADD}; \
+ done
@${ECHO} "@dirrm share/spamassassin" >> ${PLIST_ADD}
- @ # examples are in the static PLIST
+ @# examples are in the static PLIST
@${INSTALL_DATA} ${WRKSRC}/procmailrc.example ${EGDIR}/
@${INSTALL_DATA} ${WRKSRC}/rules/local.cf ${EGDIR}/
@${INSTALL_DATA} ${FILESDIR}/netbsd_lists.cf ${EGDIR}/
@@ -169,7 +167,7 @@ post-install:
@${CHOWN} ${SHAREOWN} ${RULESDIR}/*
@${CHGRP} ${SHAREGRP} ${RULESDIR}/*
@${CHMOD} a=r ${RULESDIR}/*
-.if defined(SPAMASSASSIN_USE_SSL) && ${SPAMASSASSIN_USE_SSL} == "YES"
+.if !empty(SPAMASSASSIN_USE_SSL:M[yY][eE][sS])
@${INSTALL_PROGRAM} ${WRKSRC}/spamd/sslspamc ${PREFIX}/bin/
@${ECHO} "bin/sslspamc" >> ${PLIST_ADD}
.endif