- adoption of optionsNG
Approved by: portmgr (bapt)
This commit is contained in:
parent
943f06893d
commit
8ab39ce33f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=320011
1 changed files with 110 additions and 141 deletions
|
@ -23,55 +23,58 @@ COMMENT= Bayesian spam filter - stable maintenance version
|
|||
|
||||
MIN_OPTIONS_VER= ${PORTNAME}-3.9.0
|
||||
|
||||
## debug / log / admin options
|
||||
OPTIONS= SYSLOG "Logs via syslog" on
|
||||
OPTIONS+= DEBUG "Enable debugging logging" on
|
||||
OPTIONS+= VERBOSE_DEBUG "Enable debug in LOGDIR/dspam.debug" off
|
||||
OPTIONS+= BNR_DEBUG "Enable debug for BNR" off
|
||||
OPTIONS+= PREF_EXT "Preferences in database not in files" off
|
||||
OPTIONS+= DAEMON "Daemonize dspam; speaks LMTP or DLMTP" on
|
||||
OPTIONS_DEFINE= SYSLOG DEBUG VERBOSE_DEBUG BNR_DEBUG PREF_EXT DAEMON \
|
||||
CLAMAV CLAMAV_DEVEL CLAMAV_LOCAL MYSQL_COMPRESS \
|
||||
MYSQL_LOCAL PGSQL_LOCAL HASH EXTERNAL_LOOKUP \
|
||||
USER_HOMEDIR TRUSTED_USERS VIRT_USERS LONG_USERNAMES \
|
||||
LARGE_SCALE DOMAIN_SCALE NICESENDMAIL POSTFIX_MBC \
|
||||
QMAIL WEBUI LIGHTTPD
|
||||
|
||||
#
|
||||
OPTIONS+= CLAMAV "Enable clamav support" on
|
||||
OPTIONS+= CLAMAV_DEVEL "Enable clamav support" off
|
||||
OPTIONS+= CLAMAV_LOCAL "RUN_DEPEND on selected clamav" on
|
||||
#
|
||||
OPTIONS+= MYSQL51 "Use MySQL 5.1.x as back-end" off
|
||||
OPTIONS+= MYSQL55 "Use MySQL 5.5.x as back-end" off
|
||||
OPTIONS+= MYSQL_COMPRESS "Compress dspam <--> MySQL" off
|
||||
OPTIONS+= MYSQL_LOCAL "RUN_DEPEND on selected MySQL server ver." off
|
||||
OPTIONS+= POSTGRESQL "Use PostgreSQL as back-end" on
|
||||
OPTIONS+= POSTGRESQL_LOCAL "RUN_DEPEND on PostgreSQL server" off
|
||||
OPTIONS+= SQLITE2 "Use SQLite v2.x as back-end" off
|
||||
OPTIONS+= SQLITE3 "Use SQLite v3.x as back-end" on
|
||||
OPTIONS+= HASH "Use hash driver" on
|
||||
#
|
||||
OPTIONS+= EXTERNAL_LOOKUP "Enable rcpt verification via extlookup" off
|
||||
OPTIONS_MULTI= DB
|
||||
OPTIONS_MULTI_DB= MYSQL51 MYSQL55 PGSQL SQLITE2 SQLITE3
|
||||
|
||||
# layout
|
||||
OPTIONS+= USER_HOMEDIR "Store user data in ~/.dspam" off
|
||||
OPTIONS+= TRUSTED_USERS "Disable trusted user security" off
|
||||
OPTIONS+= VIRT_USERS "Enable virtual users (needs SQL back-end)" off
|
||||
OPTIONS+= LONG_USERNAMES "Usernames longer that OS supports" off
|
||||
OPTIONS+= LARGE_SCALE "File structure for large scale" off
|
||||
OPTIONS+= DOMAIN_SCALE "File structure for multiple domains" off
|
||||
OPTIONS_RADIO= LDA
|
||||
OPTIONS_RADIO_LDA= CYRUS21 CYRUS22 CYRUS23 EXIM \
|
||||
MAILDROP PROCMAIL SAFECAT SENDMAIL
|
||||
|
||||
## MTA and LDA
|
||||
OPTIONS+= CYRUS21_LDA "Use Cyrus's 2.1 deliver as LDA" off
|
||||
OPTIONS+= CYRUS22_LDA "Use Cyrus's 2.2 deliver as LDA" off
|
||||
OPTIONS+= CYRUS23_LDA "Use Cyrus's 2.3 deliver as LDA" off
|
||||
OPTIONS+= EXIM_LDA "Use Exim as local delivery agent" off
|
||||
OPTIONS+= MAILDROP_LDA "Use Maildrop as local delivery agent" off
|
||||
OPTIONS+= PROCMAIL_LDA "Use Procmail as local delivery agent" off
|
||||
OPTIONS+= SAFECAT_LDA "Use Safecat as local delivery agent" off
|
||||
OPTIONS+= SENDMAIL_LDA "Use Sendmail as local delivery agent" off
|
||||
VERBOSE_DEBUG_DESC= Debug in LOGDIR/dspam.debug
|
||||
BNR_DEBUG_DESC= Debug for BNR
|
||||
PREF_EXT_DESC= Preferences in database not in files
|
||||
DAEMON_DESC= Daemonize dspam; speaks LMTP or DLMTP
|
||||
CLAMAV_DESC= ClamAV support
|
||||
CLAMAV_DEVEL_DESC= ClamAV support
|
||||
CLAMAV_LOCAL_DESC= RUN_DEPEND on selected ClamAV
|
||||
MYSQL51_DESC= MySQL 5.1.x as back-end
|
||||
MYSQL55_DESC= MySQL 5.5.x as back-end
|
||||
MYSQL_COMPRESS_DESC= Compress dspam <--> MySQL
|
||||
MYSQL_LOCAL_DESC= RUN_DEPEND on selected MySQL server ver.
|
||||
PGSQL_DESC= PostgreSQL as back-end
|
||||
PGSQL_LOCAL_DESC= RUN_DEPEND on PostgreSQL server
|
||||
SQLITE2_DESC= SQLite v2.x as back-end
|
||||
SQLITE3_DESC= SQLite v3.x as back-end
|
||||
HASH_DESC= Hash driver
|
||||
EXTERNAL_LOOKUP_DESC= RCPT verification via extlookup
|
||||
USER_HOMEDIR_DESC= Store user data in ~/.dspam
|
||||
TRUSTED_USERS_DESC= Disable trusted user security
|
||||
VIRT_USERS_DESC= Virtual users (needs SQL back-end)
|
||||
LONG_USERNAMES_DESC= Usernames longer that OS supports
|
||||
LARGE_SCALE_DESC= File structure for large scale
|
||||
DOMAIN_SCALE_DESC= File structure for multiple domains
|
||||
CYRUS21_DESC= Cyrus's 2.1 deliver as LDA
|
||||
CYRUS22_DESC= Cyrus's 2.2 deliver as LDA
|
||||
CYRUS23_DESC= Cyrus's 2.3 deliver as LDA
|
||||
EXIM_DESC= Exim as local delivery agent
|
||||
MAILDROP_DESC= Maildrop as local delivery agent
|
||||
PROCMAIL_DESC= Procmail as local delivery agent
|
||||
SAFECAT_DESC= Safecat as local delivery agent
|
||||
SENDMAIL_DESC= Sendmail as local delivery agent
|
||||
NICESENDMAIL_DESC= Play nice with sendmail server
|
||||
POSTFIX_MBC_DESC= Dspam as mailbox_command in Postfix
|
||||
QMAIL_DESC= Play nice with Qmail mail server
|
||||
WEBUI_DESC= Install WebUI, pulls in Apache or see below
|
||||
|
||||
OPTIONS+= SENDMAIL "Play nice with sendmail server" off
|
||||
OPTIONS+= POSTFIX_MBC "Dspam as mailbox_command in Postfix" off
|
||||
OPTIONS+= QMAIL "Play nice with Qmail mail server" off
|
||||
|
||||
OPTIONS+= WebUI "Install WebUI, pulls in Apache or see below" off
|
||||
OPTIONS+= LIGHTTPD "RUN_DEPEND on LightHTTPD, not Apache" off
|
||||
OPTIONS_DEFAULT= SYSLOG DEBUG DAEMON CLAMAV CLAMAV_LOCAL \
|
||||
PGSQL SQLITE3 HASH
|
||||
|
||||
USE_PERL5= yes
|
||||
USE_AUTOTOOLS= libtool
|
||||
|
@ -132,30 +135,30 @@ _SED_SCRIPT= -e 's,%%DOCSDIR%%,${DOCSDIR},g' \
|
|||
-e '/^%%FreeBSD/D' \
|
||||
-e '/^%%Tecnik%%/D'
|
||||
|
||||
.ifndef(WITHOUT_SYSLOG)
|
||||
.if ${PORT_OPTIONS:MSYSLOG}
|
||||
CONFIGURE_ARGS+= --enable-syslog
|
||||
.else
|
||||
CONFIGURE_ARGS+= --disable-syslog
|
||||
CONFIGURE_ARGS+= --with-logfile=${LOGFILE}
|
||||
.endif
|
||||
|
||||
.ifndef(WITHOUT_DEBUG)
|
||||
.if ${PORT_OPTIONS:MDEBUG}
|
||||
CONFIGURE_ARGS+= --enable-debug
|
||||
.endif
|
||||
|
||||
.ifdef(WITH_VERBOSE_DEBUG)
|
||||
.if ${PORT_OPTIONS:MVERBOSE_DEBUG}
|
||||
CONFIGURE_ARGS+= --enable-verbose-debug
|
||||
.endif
|
||||
|
||||
.ifdef(WITH_BNR_DEBUG)
|
||||
.if ${PORT_OPTIONS:MBNR_DEBUG}
|
||||
CONFIGURE_ARGS+= --enable-bnr-debug
|
||||
.endif
|
||||
|
||||
.ifdef(WITH_PREF_EXT)
|
||||
.if ${PORT_OPTIONS:MPREF_EXT}
|
||||
CONFIGURE_ARGS+= --enable-preferences-extension
|
||||
.endif
|
||||
|
||||
.ifndef(WITHOUT_DAEMON)
|
||||
.if ${PORT_OPTIONS:MDAEMON}
|
||||
CONFIGURE_ARGS+= --enable-daemon
|
||||
USE_RC_SUBR= ${PORTNAME}
|
||||
_SED_SCRIPT+= -e 's,%%DAEMON%%,,g'
|
||||
|
@ -164,18 +167,18 @@ SUB_LIST+= DSPAM_HOME=${DSPAM_HOME}
|
|||
_SED_SCRIPT+= -e '/%%DAEMON%%/D'
|
||||
.endif
|
||||
|
||||
.ifndef(WITHOUT_CLAMAV)
|
||||
.if ${PORT_OPTIONS:MCLAMAV}
|
||||
CONFIGURE_ARGS+= --enable-clamav
|
||||
. ifndef(WITHOUT_CLAMAV_LOCAL)
|
||||
. if ${PORT_OPTIONS:MCLAMAV_LOCAL}
|
||||
RUN_DEPENDS+= clamav>=0:${PORTSDIR}/security/clamav
|
||||
SUB_LIST+= CLAMD=clamd
|
||||
. else
|
||||
SUB_LIST+= CLAMD=
|
||||
. endif
|
||||
.endif
|
||||
.ifdef(WITH_CLAMAV_DEVEL)
|
||||
.if ${PORT_OPTIONS:MCLAMAV_DEVEL}
|
||||
CONFIGURE_ARGS+= --enable-clamav
|
||||
. ifndef(WITHOUT_CLAMAV_LOCAL)
|
||||
. if ${PORT_OPTIONS:MCLAMAV_LOCAL}
|
||||
RUN_DEPENDS+= clamav-devel>=0:${PORTSDIR}/security/clamav-devel
|
||||
SUB_LIST+= CLAMD=clamd
|
||||
. else
|
||||
|
@ -188,14 +191,14 @@ _DBDRV_COUNT= # blank, but defined so we can check against it
|
|||
#_DBDRV_ALL= pgsql_drv,sqlite3_drv,sqlite_drv,hash_drv,mysql_drv
|
||||
_DBDRV= pgsql_drv,sqlite3_drv,sqlite_drv,hash_drv,mysql_drv,
|
||||
|
||||
.ifndef(WITHOUT_POSTGRESQL)
|
||||
.if ${PORT_OPTIONS:MPGSQL}
|
||||
USE_PGSQL= yes
|
||||
CONFIGURE_ARGS+= --with-pgsql-includes=${LOCALBASE}/include \
|
||||
--with-pgsql-libraries=${LOCALBASE}/lib
|
||||
PLIST_SUB+= PGSQL=""
|
||||
#PKGNAMESUFFIX= -pgsql
|
||||
_DBDRV_COUNT:= ${_DBDRV_COUNT}o
|
||||
. if defined(WITH_POSTGRESQL_LOCAL)
|
||||
_DBDRV_COUNT:= ${_DBDRV_COUNT}o
|
||||
. if ${PORT_OPTIONS:MPGSQL_LOCAL}
|
||||
RUN_DEPENDS+= postgresql-server>=0:${PORTSDIR}/databases/postgresql${PGSQL_VER}-server
|
||||
SUB_LIST+= PGSQL=postgresql
|
||||
. else
|
||||
|
@ -206,14 +209,14 @@ PLIST_SUB+= PGSQL="@comment "
|
|||
_DBDRV:= ${_DBDRV:S/pgsql_drv,//}
|
||||
.endif
|
||||
|
||||
.ifndef(WITHOUT_SQLITE3)
|
||||
.if ${PORT_OPTIONS:MSQLITE3}
|
||||
USE_SQLITE= 3
|
||||
_DBDRV_COUNT:= ${_DBDRV_COUNT}o
|
||||
.else
|
||||
_DBDRV:= ${_DBDRV:S/sqlite3_drv,//}
|
||||
.endif
|
||||
|
||||
.if defined(WITH_SQLITE2)
|
||||
.if ${PORT_OPTIONS:MSQLITE2}
|
||||
USE_SQLITE= 2
|
||||
_DBDRV_COUNT:= ${_DBDRV_COUNT}o
|
||||
.else
|
||||
|
@ -228,7 +231,7 @@ PLIST_SUB+= SQLITE=""
|
|||
PLIST_SUB+= SQLITE="@comment "
|
||||
.endif
|
||||
|
||||
.ifndef(WITHOUT_HASH)
|
||||
.if ${PORT_OPTIONS:MHASH}
|
||||
PLIST_SUB+= HASH=""
|
||||
#PKGNAMESUFFIX= -css
|
||||
_DBDRV_COUNT:= ${_DBDRV_COUNT}o
|
||||
|
@ -237,24 +240,24 @@ _DBDRV:= ${_DBDRV:S/hash_drv,//}
|
|||
PLIST_SUB+= HASH="@comment "
|
||||
.endif
|
||||
|
||||
.ifdef(WITH_MYSQL51)
|
||||
.if ${PORT_OPTIONS:MMYSQL51}
|
||||
WANT_MYSQL_VER= 51
|
||||
#PKGNAMESUFFIX= -mysql51
|
||||
.elifdef(WITH_MYSQL55)
|
||||
.elif ${PORT_OPTIONS:MMYSQL55}
|
||||
WANT_MYSQL_VER= 55
|
||||
#PKGNAMESUFFIX= -mysql55
|
||||
.endif
|
||||
|
||||
.if defined(WITH_MYSQL51) || defined(WITH_MYSQL55)
|
||||
.if ${PORT_OPTIONS:MMYSQL51) || ${PORT_OPTIONS:MMYSQL55}
|
||||
USE_MYSQL= yes
|
||||
CONFIGURE_ARGS+= --with-mysql-includes=${LOCALBASE}/include/mysql \
|
||||
--with-mysql-libraries=${LOCALBASE}/lib/mysql
|
||||
PLIST_SUB+= MYSQL=""
|
||||
_DBDRV_COUNT:= ${_DBDRV_COUNT}o
|
||||
. if defined(WITH_MYSQL_COMPRESS)
|
||||
. if ${PORT_OPTIONS:MMYSQL_COMPRESS}
|
||||
CONFIGURE_ARGS+= --enable-client-compression
|
||||
. endif
|
||||
. if defined(WITH_MYSQL_LOCAL)
|
||||
. if ${PORT_OPTIONS:MMYSQL_LOCAL}
|
||||
RUN_DEPENDS+= mysql-server>=0:${PORTSDIR}/databases/mysql${WANT_MYSQL_VER}-server
|
||||
SUB_LIST+= MYSQL=mysql
|
||||
. else
|
||||
|
@ -274,7 +277,7 @@ PLIST_SUB+= DYNAMIC=""
|
|||
PLIST_SUB+= DYNAMIC="@comment "
|
||||
.endif
|
||||
|
||||
.ifdef(WITH_EXTERNAL_LOOKUP)
|
||||
.if ${PORT_OPTIONS:MEXTERNAL_LOOKUP}
|
||||
CONFIGURE_ARGS+= --enable-external-lookup
|
||||
USE_OPENLDAP= YES
|
||||
#CPPFLAGS+= -I${LOCALBASE}/include
|
||||
|
@ -282,98 +285,85 @@ USE_OPENLDAP= YES
|
|||
#CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
|
||||
.endif
|
||||
|
||||
.ifdef(WITH_USER_HOMEDIR)
|
||||
.if ${PORT_OPTIONS:MUSER_HOMEDIR}
|
||||
CONFIGURE_ARGS+= --enable-homedir
|
||||
.endif
|
||||
|
||||
.ifdef(WITH_TRUSTED_USERS)
|
||||
.if ${PORT_OPTIONS:MTRUSTED_USERS}
|
||||
CONFIGURE_ARGS+= --disable-trusted-user-security
|
||||
.endif
|
||||
|
||||
.ifdef(WITH_VIRT_USERS)
|
||||
.if ${PORT_OPTIONS:MVIRT_USERS}
|
||||
CONFIGURE_ARGS+= --enable-virtual-users
|
||||
.endif
|
||||
|
||||
.ifdef(WITH_LONG_USERNAMES)
|
||||
.if ${PORT_OPTIONS:MLONG_USERNAMES}
|
||||
CONFIGURE_ARGS+= --enable-long-usernames
|
||||
.endif
|
||||
.ifdef(WITH_LARGE_SCALE)
|
||||
.if ${PORT_OPTIONS:MLARGE_SCALE}
|
||||
CONFIGURE_ARGS+= --enable-large-scale
|
||||
.endif
|
||||
.ifdef(WITH_DOMAIN_SCALE)
|
||||
.if ${PORT_OPTIONS:MDOMAIN_SCALE}
|
||||
CONFIGURE_ARGS+= --enable-domain-scale
|
||||
.endif
|
||||
|
||||
# add one 'o' here for each new LDA
|
||||
LDA_TOTAL_COUNT= ooooooooo # 9
|
||||
LDA_COUNT= ${LDA_TOTAL_COUNT}
|
||||
|
||||
.if defined(WITH_CYRUS21_LDA)
|
||||
.if ${PORT_OPTIONS:MCYRUS21}
|
||||
RUN_DEPENDS+= ${LOCALBASE}/cyrus/bin/deliver:${PORTSDIR}/mail/cyrus-imapd2
|
||||
CONFIGURE_ARGS+= --with-delivery-agent='${LOCALBASE}/cyrus/bin/deliver'
|
||||
LDA_COUNT:= ${LDA_COUNT:S/o//}
|
||||
.endif
|
||||
|
||||
.if defined(WITH_CYRUS22_LDA)
|
||||
.if ${PORT_OPTIONS:MCYRUS22}
|
||||
RUN_DEPENDS+= ${LOCALBASE}/cyrus/bin/deliver:${PORTSDIR}/mail/cyrus-imapd22
|
||||
CONFIGURE_ARGS+= --with-delivery-agent='${LOCALBASE}/cyrus/bin/deliver'
|
||||
LDA_COUNT:= ${LDA_COUNT:S/o//}
|
||||
.endif
|
||||
|
||||
.if defined(WITH_CYRUS23_LDA)
|
||||
.if ${PORT_OPTIONS:MCYRUS23}
|
||||
RUN_DEPENDS+= ${LOCALBASE}/cyrus/bin/deliver:${PORTSDIR}/mail/cyrus-imapd23
|
||||
CONFIGURE_ARGS+= --with-delivery-agent='${LOCALBASE}/cyrus/bin/deliver'
|
||||
LDA_COUNT:= ${LDA_COUNT:S/o//}
|
||||
.endif
|
||||
|
||||
.ifdef(WITH_EXIM_LDA)
|
||||
. ifdef(WITH_MYSQL51) || (WITH_MYSQL55)
|
||||
.if ${PORT_OPTIONS:MEXIM}
|
||||
. if ${PORT_OPTIONS:MMYSQL51} || ${PORT_OPTIONS:MMYSQL55}
|
||||
_EXIM_EXT= -mysql
|
||||
. elifdef(WITH_POSTGRESQL)
|
||||
. elif ${PORT_OPTIONS:MPGSQL}
|
||||
_EXIM_EXT= -postgresql
|
||||
. endif
|
||||
RUN_DEPENDS+= exim:${PORTSDIR}/mail/exim${_EXIM_EXT}
|
||||
CONFIGURE_ARGS+= --with-delivery-agent='${LOCALBASE}/sbin/exim'
|
||||
LDA_COUNT:= ${LDA_COUNT:S/o//}
|
||||
.endif
|
||||
|
||||
.ifdef(WITH_MAILDROP_LDA)
|
||||
.if ${PORT_OPTIONS:MMAILDROP}
|
||||
RUN_DEPENDS+= maildrop:${PORTSDIR}/mail/maildrop
|
||||
CONFIGURE_ARGS+= --with-delivery-agent='${LOCALBASE}/bin/maildrop'
|
||||
LDA_COUNT:= ${LDA_COUNT:S/o//}
|
||||
.endif
|
||||
|
||||
.ifdef(WITH_PROCMAIL_LDA)
|
||||
.if ${PORT_OPTIONS:MPROCMAIL}
|
||||
RUN_DEPENDS+= procmail:${PORTSDIR}/mail/procmail
|
||||
CONFIGURE_ARGS+= --with-delivery-agent='${LOCALBASE}/bin/procmail'
|
||||
LDA_COUNT:= ${LDA_COUNT:S/o//}
|
||||
.endif
|
||||
|
||||
.ifdef(WITH_SAFECAT_LDA)
|
||||
.if ${PORT_OPTIONS:MSAFECAT}
|
||||
RUN_DEPENDS+= safecat:${PORTSDIR}/sysutils/safecat
|
||||
CONFIGURE_ARGS+= --with-delivery-agent='${LOCALBASE}/safecat tmp new'
|
||||
LDA_COUNT:= ${LDA_COUNT:S/o//}
|
||||
.endif
|
||||
|
||||
.ifdef(WITH_SENDMAIL_LDA) && exists(/usr/sbin/sendmail)
|
||||
.if ${PORT_OPTIONS:MSENDMAIL} && exists(/usr/sbin/sendmail)
|
||||
CONFIGURE_ARGS+= --with-delivery-agent=/usr/sbin/sendmail
|
||||
LDA_COUNT:= ${LDA_COUNT:S/o//}
|
||||
.else
|
||||
. ifdef(WITH_SENDMAIL_LDA) && exists(${LOCALBASE}/sbin/sendmail)
|
||||
.if ${PORT_OPTIONS:MSENDMAIL} && exists(${LOCALBASE}/sbin/sendmail)
|
||||
CONFIGURE_ARGS+= --with-delivery-agent='${LOCALBASE}/sbin/sendmail'
|
||||
LDA_COUNT:= ${LDA_COUNT:S/o//}
|
||||
. endif
|
||||
.endif
|
||||
|
||||
.ifdef(WITH_SENDMAIL)
|
||||
.if ${PORT_OPTIONS:MNICESENDMAIL}
|
||||
DSPAM_MODE= 4511
|
||||
.endif
|
||||
|
||||
.ifdef(WITH_POSTFIX_MBC)
|
||||
.if ${PORT_OPTIONS:MPOSTFIX_MBC}
|
||||
DSPAM_MODE= 4511
|
||||
.endif
|
||||
|
||||
.ifdef(WITH_QMAIL)
|
||||
.if ${PORT_OPTIONS:MQMAIL}
|
||||
DSPAM_MODE= 4511
|
||||
.endif
|
||||
|
||||
|
@ -381,8 +371,8 @@ DSPAM_MODE= 4511
|
|||
CONFIGURE_ARGS+= --with-dspam-mode=${DSPAM_MODE}
|
||||
.endif
|
||||
|
||||
.ifdef(WITH_WebUI)
|
||||
. if defined(WITH_LIGHTTPD)
|
||||
.if ${PORT_OPTIONS:MWEBUI}
|
||||
. if ${PORT_OPTIONS:MLIGHTTPD}
|
||||
RUN_DEPENDS+= ${LOCALBASE}/sbin/lighttpd:${PORTSDIR}/www/lighttpd
|
||||
. else
|
||||
USE_APACHE_RUN= 22+
|
||||
|
@ -431,7 +421,7 @@ pre-everything::
|
|||
@sleep 5
|
||||
.endif
|
||||
|
||||
pre-extract: check-options-version
|
||||
pre-extract:
|
||||
.ifndef(MAINT)
|
||||
@${ECHO_CMD} ""
|
||||
@${ECHO_CMD} "Define vars below before make-ing if you need:"
|
||||
|
@ -449,7 +439,7 @@ pre-extract: check-options-version
|
|||
. ifdef(WITHOUT_SYSLOG)
|
||||
@${ECHO_CMD} "LOGFILE=${LOGFILE} (default: ${_VAR_DIR}/log/dspam/dspam.log)"
|
||||
. endif
|
||||
. ifdef(WITH_WebUI)
|
||||
.if ${PORT_OPTIONS:MWEBUI}
|
||||
@${ECHO_CMD} "Define WWWDIR before making if you need the WebUI files"
|
||||
@${ECHO_CMD} "installed in other place that this installation's default"
|
||||
@${ECHO_CMD} "${WWWDIR}"
|
||||
|
@ -472,50 +462,39 @@ post-patch:
|
|||
@${REINPLACE_CMD} -e "s^%%PERL%%^${PERL}^; s^%%DSPAM_PATH%%^${PREFIX}/bin^" ${WRKSRC}/scripts/train.pl
|
||||
|
||||
pre-configure:
|
||||
@${ECHO_CMD}
|
||||
.if !( ${LDA_TOTAL_COUNT:S/o//}==${LDA_COUNT} || ${LDA_TOTAL_COUNT}==${LDA_COUNT} )
|
||||
@${ECHO_CMD} "You can only use one local delivery agent at once."
|
||||
@${ECHO_CMD} "See ${DSPAM_ETC}/dspam.conf for how to change it at run time."
|
||||
@${FALSE}
|
||||
.endif
|
||||
.if ${_DBDRV}==""
|
||||
@${ECHO_CMD}
|
||||
@${ECHO_CMD} "You need to enable at least one database back-end."
|
||||
@${FALSE}
|
||||
.endif
|
||||
.if defined(WITH_VIRT_USERS) && !(defined(USE_MYSQL) || \
|
||||
!defined(WITHOUT_POSTGRESQL) || !defined(WITHOUT_HASH) )
|
||||
.if ${PORT_OPTIONS:MVIRT_USERS} && !(defined(USE_MYSQL) || \
|
||||
${PORT_OPTIONS:MPGSQL} || ${PORT_OPTIONS:MHASH} )
|
||||
@${ECHO_CMD} "You need MySQL, POSTGRESQL or HASH for virtual users."
|
||||
@${FALSE}
|
||||
.endif
|
||||
.if defined(WITH_PREF_EXT) && !( defined(USE_MYSQL) || \
|
||||
!defined(WITHOUT_POSTGRESQL) )
|
||||
.if ${PORT_OPTIONS:MPREF_EXT} && !( defined(USE_MYSQL) || \
|
||||
${PORT_OPTIONS:MPGSQL} )
|
||||
@${ECHO_CMD} "You need MySQL or Postgres for preferences extension"
|
||||
@${FALSE}
|
||||
.endif
|
||||
.ifndef(WITHOUT_DAEMON) && !( defined(USE_MYSQL) || \
|
||||
!defined(WITHOUT_POSTGRESQL) || !defined(WITHOUT_HASH) )
|
||||
.if ${PORT_OPTIONS:MDAEMON} && !( defined(USE_MYSQL) || \
|
||||
${PORT_OPTIONS:MPGSQL} || ${PORT_OPTIONS:MHASH} )
|
||||
@${ECHO_CMD} "You need MySQL, PostgreSQL or Hash for Daemon mode, because multithreading support is needed"
|
||||
@${FALSE}
|
||||
.endif
|
||||
.if (defined(WITH_MYSQL51) && defined(WITH_MYSQL55))
|
||||
.if ${PORT_OPTIONS:MMYSQL51} && ${PORT_OPTIONS:MMYSQL55}
|
||||
@${ECHO_CMD} "You can compile with only one MySQL version driver."
|
||||
@${FALSE}
|
||||
.endif
|
||||
.if defined(WITH_EXTERNAL_LOOKUP) && !( defined(USE_MYSQL) || \
|
||||
!defined(WITHOUT_POSTGRESQL) || defined(USE_SQLITE) )
|
||||
.if ${PORT_OPTIONS:MEXTERNAL_LOOKUP} && !( defined(USE_MYSQL) || \
|
||||
${PORT_OPTIONS:MPGSQL} || defined(USE_SQLITE) )
|
||||
@${ECHO_CMD} "You need MySQL, Postgres or SQLITE for EXTERNAL_LOOKUP."
|
||||
@${FALSE}
|
||||
.endif
|
||||
.if defined(WITH_USER_HOMEDIR) && defined(WITH_WebUI)
|
||||
.if ${PORT_OPTIONS:MUSER_HOMEDIR} && ${PORT_OPTIONS:MWEBUI}
|
||||
@${ECHO_CMD} "USER_HOMEDIR and WebUI are incopatible"
|
||||
@${FALSE}
|
||||
.endif
|
||||
.if defined(WITH_DOMAIN_SCALE) && defined(WITH_LARGE_SCALE)
|
||||
.if ${PORT_OPTIONS:MDOMAIN_SCALE} && ${PORT_OPTIONS:MLARGE_SCALE}
|
||||
@${ECHO_CMD} "DOMAIN_SCALE and LARGE_SCALE are incopatible"
|
||||
@${FALSE}
|
||||
.endif
|
||||
.if defined(WITH_LIGHTHTTPD) && !defined(WITH_WebUI)
|
||||
.if ${PORT_OPTIONS:MLIGHTHTTPD) && ! ${PORT_OPTIONS:MWEBUI}
|
||||
@${ECHO_CMD} "There's no reason to depend on LightHTTPD if you're not using WebUI"
|
||||
@${FALSE}
|
||||
.endif
|
||||
|
@ -533,7 +512,7 @@ post-install:
|
|||
${TEST} `ls -1 ${PREFIX}/lib/pkgconfig | wc -l` -eq 0 && \
|
||||
${RM} -R ${PREFIX}/lib/pkgconfig || true
|
||||
|
||||
.ifndef NOPORTEXAMPLES
|
||||
.if ${PORT_OPTIONS:MEXAMPLES}
|
||||
.ifdef(USE_MYSQL)
|
||||
@${MKDIR} ${EXAMPLESDIR}/mysql
|
||||
cd ${WRKSRC}/src/tools.mysql_drv && \
|
||||
|
@ -544,7 +523,7 @@ post-install:
|
|||
virtual_user_aliases.sql \
|
||||
virtual_users.sql ${EXAMPLESDIR}/mysql
|
||||
.endif
|
||||
.ifndef(WITHOUT_POSTGRESQL)
|
||||
.if ${PORT_OPTIONS:MPGSQL}
|
||||
@${MKDIR} ${EXAMPLESDIR}/pgsql
|
||||
@cd ${WRKSRC}/src/tools.pgsql_drv && \
|
||||
${INSTALL_DATA} *.sql ${EXAMPLESDIR}/pgsql
|
||||
|
@ -556,7 +535,7 @@ post-install:
|
|||
.endif
|
||||
.endif # NOPORTEXAMPLES
|
||||
|
||||
.ifdef(WITH_WebUI)
|
||||
.if ${PORT_OPTIONS:MWEBUI}
|
||||
. for I in admin.cgi admingraph.cgi configure.pl dspam.cgi graph.cgi templates/strings.pl
|
||||
${REINPLACE_CMD} -e "s,/usr/bin/perl,${PERL},g" ${WRKSRC}/webui/cgi-bin/${I}
|
||||
. endfor
|
||||
|
@ -587,7 +566,7 @@ post-install:
|
|||
|
||||
@${SED} ${_SED_SCRIPT} ${.CURDIR}/pkg-message > ${WRKSRC}/README.FreeBSD
|
||||
|
||||
.if !defined(NOPORTDOCS)
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
@cd ${WRKSRC} && ${INSTALL_DATA} ${_DOCS} ${DOCSDIR}
|
||||
@cd ${WRKSRC}/doc && ${INSTALL_DATA} ${_DOCSL} ${DOCSDIR}
|
||||
|
@ -613,14 +592,4 @@ post-install:
|
|||
@${ECHO_CMD} "message in ${DOCSDIR}/README.FreeBSD"
|
||||
@${ECHO_CMD}
|
||||
|
||||
check-options-version:
|
||||
.ifdef(_OPTIONS_READ)
|
||||
@(if ${PKG_VERSION} -t ${_OPTIONS_READ} ${MIN_OPTIONS_VER} | ${GREP} -q '<'; \
|
||||
then ${ECHO_CMD} ""; \
|
||||
${ECHO_CMD} "===> You have unsupported (old) OPTIONS, please do a 'make config; make'"; \
|
||||
${ECHO_CMD} ""; \
|
||||
exit 1; \
|
||||
fi)
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
|
Loading…
Reference in a new issue