freebsd-ports/mail/simscan/Makefile

162 lines
4.7 KiB
Makefile
Raw Normal View History

# Created by: Anton Karpov <toxa@toxahost.ru>
# $FreeBSD$
PORTNAME= simscan
PORTVERSION= 1.4.0
2010-04-06 14:01:56 +02:00
PORTREVISION= 6
CATEGORIES= mail security
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
DISTNAME= ${PORTNAME}-${PORTVERSION:S/.r/rc/}
2009-08-17 11:22:11 +02:00
MAINTAINER= lippe@FreeBSD.org
COMMENT= Fast Content/Anti-virus Scanner for qmail Written in C
USES= qmail:build
GNU_CONFIGURE= yes
USERS= ${PORTNAME}
GROUPS= ${USERS}
- Fix 'all-depends-list' target in cases if dependencies list is very long and if some dependencies can't be added into the list. [1] - Fix FAM support. Make gamin the default FAM system. [2] - Introduce new 'quicksearch' target to show only port, path and info section of the matching ports. [3] - Introduce new category - rubygems. [4] - Fix stale dependencies while installing qmail slaveport and another port that depends on qmail. [5] - Add commentary for describes target in bsd.port.mk. [6] - Fix warning issued during make index on archs !368. [7] - Add USE_DOS2UNIX variable. If set to "YES", remove the ^M from all files under ${WRKSRC}. If set to a string, remove in all files under ${WRKSRC} with one of these names the ^Ms. [8] - Add new variables PERL_RUN_DEPENDS and PERL_BUILD_DEPENDS by checking the existance of the Perl modules with the "perl -e 'use module;'" command. [9] - Fix bsd.port.mk variable quoting issues. No quoting is necessary anymore either in the Makefile or on the command line. Affected variables include: BROKEN FORBIDDEN IGNORE MANUAL_PACKAGE_BUILD NO_CDROM NO_PACKAGE RESTRICTED [10] - Add NOFETCHFILES variable. If set, don't download these files from the ${MASTER_SITES} or ${MASTER_SITE_BACKUP} (but do from ${MASTER_SITE_OVERRIDE}). [11] - Improve 'search' target output. [12] - Add a new virtual category for Amateur Radio - hamradio. [13] - Cleanup some old/unused pathes in bsd.port.mk. [14] - Add @dirrmtry for plists which does the same as: "@unexec rmdir %D/foo 2>/dev/null || true" [15] - Remove virtual category - offix. [16] - Use portsnap instead of cvsup or cvs on "make update" in /usr/ports. [17] - Move location of bsd.autotools.mk within bsd.port.mk [18] - Add bsd.linux-rpm.mk, fix INSTALLS_SHLIB for Linux ports [19] - Use new USE_RC_SUBR format for FreeBSD version >= 700007 [20] - Replace the string "FreeBSD" by "The FreeBSD Project" in the security warning [21] - Add bsd.local.mk for local modification to ports framework. [22] - Replace rcNG spelling by rc.d [23] - Remove superfluous USE_REINPLACE. [24] Special thanks to: linimon for spending hours with all these patches clement for fixes kris for help with pointyhat PR: ports/86310 [1], ports/89498 [2], ports/83530 [3], ports/83789 [4], ports/84053 [5], ports/86281 [6], ports/87214 [7], ports/87234 [8], ports/87318 [9], ports/87396 [10], ports/87605 [11], ports/87840 [12], ports/88230 [13], ports/88493 [14], ports/88711 [15], ports/88751 [16], ports/89281 [17], ports/89999 [18], ports/90031 [19], ports/90150 [20], ports/90668 [21], ports/91433 [23], ports/88754 [24] Submitted by: mi [1], marcus [2], Lars Engels <lars.engels@0x20.net> [3], pav [4, 16, 20, 24], garga [5], cperciva [6], vd [7], edwin [8, 9, 11, 15, 21], fenner [10], Arseny Nasokin <tarc.po.cs.msu.su@tarc.po.cs.msu.su> [12], Carl Makin <carl@stagecraft.cx> [13], arved [14], NIIMI Satoshi <sa2c@sa2c.net> [17], thierry [18], jylefort [19], linimon [22], dougb [23]
2006-01-21 18:37:14 +01:00
WORKDIR?= ${QMAIL_PREFIX}/${PORTNAME}
QMAIL_QUEUE= ${QMAIL_PREFIX}/bin/qmail-queue
SUB_FILES= pkg-message \
pkg-install
SUB_LIST= QMAIL_PREFIX=${QMAIL_PREFIX} \
SIMSCAN_DIR=${PORTNAME}
PLIST_SUB= QMAIL_PREFIX=${QMAIL_PREFIX} \
SIMSCAN_DIR=${PORTNAME}
2013-06-04 17:47:06 +02:00
OPTIONS_DEFINE= CLAMAV RIPMIME SPAMD USER DOMAIN ATTACH DROPMSG PASSTHRU HEADERS DSPAM
OPTIONS_DEFAULT= CLAMAV RIPMIME
CLAMAV_DESC= Support for ClamAV Virus Scanning
RIPMIME_DESC= Ripmime Processing (if Clamav ScanMail disabled)
SPAMD_DESC= Support for SpamAssassin Spam Filtering
USER_DESC= Turn On Per User SpamAssassin (required SPAMD)
DOMAIN_DESC= Turn On Per Domain Based Checking
ATTACH_DESC= Turn On Attachment Scanning (required CLAMAV)
DROPMSG_DESC= Drop Message in Case of Virus Found
PASSTHRU_DESC= Pass Spam Thru, Do Not Reject (required SPAMD)
HEADERS_DESC= Add a Received Line With Versions of Scanners
DSPAM_DESC= Turn on DSPAM scanning
.include <bsd.port.pre.mk>
CONFIGURE_ARGS=--enable-clamavdb-path=/var/db/clamav \
- Fix 'all-depends-list' target in cases if dependencies list is very long and if some dependencies can't be added into the list. [1] - Fix FAM support. Make gamin the default FAM system. [2] - Introduce new 'quicksearch' target to show only port, path and info section of the matching ports. [3] - Introduce new category - rubygems. [4] - Fix stale dependencies while installing qmail slaveport and another port that depends on qmail. [5] - Add commentary for describes target in bsd.port.mk. [6] - Fix warning issued during make index on archs !368. [7] - Add USE_DOS2UNIX variable. If set to "YES", remove the ^M from all files under ${WRKSRC}. If set to a string, remove in all files under ${WRKSRC} with one of these names the ^Ms. [8] - Add new variables PERL_RUN_DEPENDS and PERL_BUILD_DEPENDS by checking the existance of the Perl modules with the "perl -e 'use module;'" command. [9] - Fix bsd.port.mk variable quoting issues. No quoting is necessary anymore either in the Makefile or on the command line. Affected variables include: BROKEN FORBIDDEN IGNORE MANUAL_PACKAGE_BUILD NO_CDROM NO_PACKAGE RESTRICTED [10] - Add NOFETCHFILES variable. If set, don't download these files from the ${MASTER_SITES} or ${MASTER_SITE_BACKUP} (but do from ${MASTER_SITE_OVERRIDE}). [11] - Improve 'search' target output. [12] - Add a new virtual category for Amateur Radio - hamradio. [13] - Cleanup some old/unused pathes in bsd.port.mk. [14] - Add @dirrmtry for plists which does the same as: "@unexec rmdir %D/foo 2>/dev/null || true" [15] - Remove virtual category - offix. [16] - Use portsnap instead of cvsup or cvs on "make update" in /usr/ports. [17] - Move location of bsd.autotools.mk within bsd.port.mk [18] - Add bsd.linux-rpm.mk, fix INSTALLS_SHLIB for Linux ports [19] - Use new USE_RC_SUBR format for FreeBSD version >= 700007 [20] - Replace the string "FreeBSD" by "The FreeBSD Project" in the security warning [21] - Add bsd.local.mk for local modification to ports framework. [22] - Replace rcNG spelling by rc.d [23] - Remove superfluous USE_REINPLACE. [24] Special thanks to: linimon for spending hours with all these patches clement for fixes kris for help with pointyhat PR: ports/86310 [1], ports/89498 [2], ports/83530 [3], ports/83789 [4], ports/84053 [5], ports/86281 [6], ports/87214 [7], ports/87234 [8], ports/87318 [9], ports/87396 [10], ports/87605 [11], ports/87840 [12], ports/88230 [13], ports/88493 [14], ports/88711 [15], ports/88751 [16], ports/89281 [17], ports/89999 [18], ports/90031 [19], ports/90150 [20], ports/90668 [21], ports/91433 [23], ports/88754 [24] Submitted by: mi [1], marcus [2], Lars Engels <lars.engels@0x20.net> [3], pav [4, 16, 20, 24], garga [5], cperciva [6], vd [7], edwin [8, 9, 11, 15, 21], fenner [10], Arseny Nasokin <tarc.po.cs.msu.su@tarc.po.cs.msu.su> [12], Carl Makin <carl@stagecraft.cx> [13], arved [14], NIIMI Satoshi <sa2c@sa2c.net> [17], thierry [18], jylefort [19], linimon [22], dougb [23]
2006-01-21 18:37:14 +01:00
--enable-qmaildir=${QMAIL_PREFIX} \
--enable-spamc-user=n \
--enable-workdir=${WORKDIR} \
--enable-user=nobody
2013-06-04 17:47:06 +02:00
.if ! ${PORT_OPTIONS:MCLAMAV}
CONFIGURE_ARGS+= --enable-clamav=n
.else
BUILD_DEPENDS+= clamdscan:${PORTSDIR}/security/clamav
.endif
2013-06-04 17:47:06 +02:00
.if ! ${PORT_OPTIONS:MRIPMIME}
CONFIGURE_ARGS+=--disable-ripmime
.else
BUILD_DEPENDS+= ripmime:${PORTSDIR}/mail/ripmime
.endif
2013-06-04 17:47:06 +02:00
.if ${PORT_OPTIONS:MSPAMD}
BUILD_DEPENDS+= spamassassin:${PORTSDIR}/mail/p5-Mail-SpamAssassin
CONFIGURE_ARGS+=--enable-spam=y
CONFIGURE_ARGS+=--enable-spamassassin-path=${LOCALBASE}/bin/spamassassin
.endif
2013-06-04 17:47:06 +02:00
.if ${PORT_OPTIONS:MUSER}
CONFIGURE_ARGS+=--enable-spamc-user=y
.endif
2013-06-04 17:47:06 +02:00
.if ${PORT_OPTIONS:MDOMAIN}
CONFIGURE_ARGS+=--enable-per-domain=y
.endif
2013-06-04 17:47:06 +02:00
.if ${PORT_OPTIONS:MATTACH}
CONFIGURE_ARGS+=--enable-attach=y
.endif
2013-06-04 17:47:06 +02:00
.if ${PORT_OPTIONS:MDROPMSG}
CONFIGURE_ARGS+=--enable-dropmsg=y
.endif
2013-06-04 17:47:06 +02:00
.if ${PORT_OPTIONS:MPASSTHRU}
CONFIGURE_ARGS+=--enable-spam-passthru=y
.endif
2013-06-04 17:47:06 +02:00
.if ${PORT_OPTIONS:MHEADERS}
CONFIGURE_ARGS+=--enable-received=y
CONFIGURE_ARGS+=--enable-sigtool-path=${LOCALBASE}/bin/sigtool
.endif
2013-06-04 17:47:06 +02:00
.if ${PORT_OPTIONS:MDSPAM}
CONFIGURE_ARGS+=--enable-dspam=y
BUILD_DEPENDS+= dspam:${PORTSDIR}/mail/dspam
.endif
.if defined(SPAM_HITS)
CONFIGURE_ARGS+=--enable-spam-hits=${SPAM_HITS}
.endif
.if defined(QUARANTINE_DIR)
CONFIGURE_ARGS+=--enable-quarantinedir=${QUARANTINE_DIR}
.endif
.if defined(SPAMC_ARGS)
CONFIGURE_ARGS+=--enable-spamc-args=${SPAMC_ARGS}
.endif
.if defined(QMAIL_QUEUE)
CONFIGURE_ARGS+=--enable-qmail-queue=${QMAIL_QUEUE}
.endif
PORTDOCS= AUTHORS ChangeLog README TODO
if ! ${TEST} -f ${QMAIL_QUEUE}; then \
${ECHO_MSG} "Unable to found qmail-queue binary trying '${QMAIL_QUEUE}'."; \
- Fix 'all-depends-list' target in cases if dependencies list is very long and if some dependencies can't be added into the list. [1] - Fix FAM support. Make gamin the default FAM system. [2] - Introduce new 'quicksearch' target to show only port, path and info section of the matching ports. [3] - Introduce new category - rubygems. [4] - Fix stale dependencies while installing qmail slaveport and another port that depends on qmail. [5] - Add commentary for describes target in bsd.port.mk. [6] - Fix warning issued during make index on archs !368. [7] - Add USE_DOS2UNIX variable. If set to "YES", remove the ^M from all files under ${WRKSRC}. If set to a string, remove in all files under ${WRKSRC} with one of these names the ^Ms. [8] - Add new variables PERL_RUN_DEPENDS and PERL_BUILD_DEPENDS by checking the existance of the Perl modules with the "perl -e 'use module;'" command. [9] - Fix bsd.port.mk variable quoting issues. No quoting is necessary anymore either in the Makefile or on the command line. Affected variables include: BROKEN FORBIDDEN IGNORE MANUAL_PACKAGE_BUILD NO_CDROM NO_PACKAGE RESTRICTED [10] - Add NOFETCHFILES variable. If set, don't download these files from the ${MASTER_SITES} or ${MASTER_SITE_BACKUP} (but do from ${MASTER_SITE_OVERRIDE}). [11] - Improve 'search' target output. [12] - Add a new virtual category for Amateur Radio - hamradio. [13] - Cleanup some old/unused pathes in bsd.port.mk. [14] - Add @dirrmtry for plists which does the same as: "@unexec rmdir %D/foo 2>/dev/null || true" [15] - Remove virtual category - offix. [16] - Use portsnap instead of cvsup or cvs on "make update" in /usr/ports. [17] - Move location of bsd.autotools.mk within bsd.port.mk [18] - Add bsd.linux-rpm.mk, fix INSTALLS_SHLIB for Linux ports [19] - Use new USE_RC_SUBR format for FreeBSD version >= 700007 [20] - Replace the string "FreeBSD" by "The FreeBSD Project" in the security warning [21] - Add bsd.local.mk for local modification to ports framework. [22] - Replace rcNG spelling by rc.d [23] - Remove superfluous USE_REINPLACE. [24] Special thanks to: linimon for spending hours with all these patches clement for fixes kris for help with pointyhat PR: ports/86310 [1], ports/89498 [2], ports/83530 [3], ports/83789 [4], ports/84053 [5], ports/86281 [6], ports/87214 [7], ports/87234 [8], ports/87318 [9], ports/87396 [10], ports/87605 [11], ports/87840 [12], ports/88230 [13], ports/88493 [14], ports/88711 [15], ports/88751 [16], ports/89281 [17], ports/89999 [18], ports/90031 [19], ports/90150 [20], ports/90668 [21], ports/91433 [23], ports/88754 [24] Submitted by: mi [1], marcus [2], Lars Engels <lars.engels@0x20.net> [3], pav [4, 16, 20, 24], garga [5], cperciva [6], vd [7], edwin [8, 9, 11, 15, 21], fenner [10], Arseny Nasokin <tarc.po.cs.msu.su@tarc.po.cs.msu.su> [12], Carl Makin <carl@stagecraft.cx> [13], arved [14], NIIMI Satoshi <sa2c@sa2c.net> [17], thierry [18], jylefort [19], linimon [22], dougb [23]
2006-01-21 18:37:14 +01:00
${ECHO_MSG} "Please set QMAIL_PREFIX to your qmail installation directory !"; \
exit 1; \
fi
post-patch:
@${REINPLACE_CMD} -E 's,($f/daily.cvd"),\1 || test -d "$$f/daily.inc",' \
${WRKSRC}/configure
pre-configure:
@${ECHO_MSG} ""
@${ECHO_MSG} "=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~="
@${ECHO_MSG} "You may also use the following build options:"
@${ECHO_MSG} ""
@${ECHO_MSG} "QMAIL_PREFIX Base qmail directory. Default is ${QMAIL_PREFIX}"
@${ECHO_MSG} "WORKDIR Directory to unpack emails. Default is ${QMAIL_PREFIX}/${PORTNAME}"
@${ECHO_MSG} "QMAIL_QUEUE Define full path and name of the qmail-queue program"
@${ECHO_MSG} " Incoming mail is passed to this program after being"
@${ECHO_MSG} " scanned by SimScan. Default is ${QMAIL_PREFIX}/bin/qmail-queue"
@${ECHO_MSG} "SPAMC_ARGS Define the arguments to pass to spamc."
@${ECHO_MSG} " Be sure to place quotes around the options you define"
@${ECHO_MSG} "SPAM_HITS Reject spam only above this hit level"
@${ECHO_MSG} " Default is 10.0. Useful without PASSTHRU option"
@${ECHO_MSG} "QUARANTINE_DIR Directory to keep spam and/or infected emails"
@${ECHO_MSG} " Default is disabled"
@${ECHO_MSG} "=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~="
@${ECHO_MSG} ""
pre-install:
@${REINPLACE_CMD} -e 's|nobody|simscan|g' ${WRKSRC}/Makefile
@${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
post-install:
@${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
2013-06-04 17:47:06 +02:00
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${DOCSDIR}
.for i in ${PORTDOCS}
@${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
.endfor
.endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>