Lines 6-22
Link Here
|
6 |
# Thanks. |
6 |
# Thanks. |
7 |
|
7 |
|
8 |
PORTNAME= dspam |
8 |
PORTNAME= dspam |
9 |
PORTVERSION= 3.9.0 |
9 |
PORTVERSION= 3.10.2 |
10 |
PORTREVISION= 8 |
10 |
PORTREVISION= 0 |
11 |
CATEGORIES= mail |
11 |
CATEGORIES= mail |
12 |
MASTER_SITES= SF \ |
12 |
MASTER_SITES= SF |
13 |
http://T32.TecNik93.com/FreeBSD/ports/${PORTNAME}/sources/ |
|
|
14 |
MASTER_SITE_SUBDIR=${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} |
13 |
MASTER_SITE_SUBDIR=${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} |
15 |
|
14 |
|
16 |
MAINTAINER= danny@dannywarren.com |
15 |
MAINTAINER= danny@dannywarren.com |
17 |
COMMENT= Bayesian spam filter |
16 |
COMMENT= Bayesian spam filter |
18 |
|
17 |
|
19 |
MIN_OPTIONS_VER= ${PORTNAME}-3.9.0 |
18 |
LICENSE= AGPLv3 |
|
|
19 |
|
20 |
OPTIONS_SUB= yes |
20 |
|
21 |
|
21 |
OPTIONS_DEFINE= SYSLOG DEBUG VERBOSE_DEBUG BNR_DEBUG PREF_EXT DAEMON \ |
22 |
OPTIONS_DEFINE= SYSLOG DEBUG VERBOSE_DEBUG BNR_DEBUG PREF_EXT DAEMON \ |
22 |
CLAMAV CLAMAV_LOCAL EXTERNAL_LOOKUP \ |
23 |
CLAMAV CLAMAV_LOCAL EXTERNAL_LOOKUP \ |
Lines 24-51
OPTIONS_DEFINE= SYSLOG DEBUG VERBOSE_DEBUG BNR_DEBUG PREF_EXT DAEMON \
Link Here
|
24 |
LARGE_SCALE DOMAIN_SCALE NICESENDMAIL POSTFIX_MBC \ |
25 |
LARGE_SCALE DOMAIN_SCALE NICESENDMAIL POSTFIX_MBC \ |
25 |
QMAIL WEBUI LIGHTTPD DOCS EXAMPLES |
26 |
QMAIL WEBUI LIGHTTPD DOCS EXAMPLES |
26 |
|
27 |
|
27 |
OPTIONS_MULTI= DB |
28 |
OPTIONS_MULTI= DB |
28 |
OPTIONS_MULTI_DB= HASH MYSQL MYSQL_COMPRESS MYSQL_LOCAL \ |
29 |
OPTIONS_MULTI_DB= HASH MYSQL MYSQL_COMPRESS MYSQL_LOCAL \ |
29 |
PGSQL PGSQL_LOCAL SQLITE2 SQLITE3 |
30 |
PGSQL PGSQL_LOCAL SQLITE2 SQLITE3 |
30 |
|
31 |
|
31 |
OPTIONS_RADIO= LDA |
32 |
OPTIONS_RADIO= LDA |
32 |
OPTIONS_RADIO_LDA= CYRUS23 CYRUS24 DOVECOT1 \ |
33 |
OPTIONS_RADIO_LDA= CYRUS23 CYRUS24 DOVECOT1 \ |
33 |
DOVECOT2 EXIM MAILDROP PROCMAIL SAFECAT SENDMAIL |
34 |
DOVECOT2 EXIM MAILDROP PROCMAIL SAFECAT SENDMAIL |
|
|
35 |
|
36 |
OPTIONS_DEFAULT= SYSLOG DEBUG DAEMON CLAMAV CLAMAV_LOCAL \ |
37 |
HASH MYSQL MYSQL_COMPRESS PGSQL SQLITE3 |
34 |
|
38 |
|
35 |
VERBOSE_DEBUG_DESC= Debug in LOGDIR/dspam.debug |
39 |
VERBOSE_DEBUG_DESC= Debug in LOGDIR/dspam.debug |
36 |
BNR_DEBUG_DESC= Debug for BNR |
40 |
BNR_DEBUG_DESC= Debug for Bayesian Noise Reduction |
37 |
PREF_EXT_DESC= Preferences in database not in files |
41 |
PREF_EXT_DESC= Preferences in database not in files |
38 |
DAEMON_DESC= Daemonize dspam; speaks LMTP or DLMTP |
42 |
DAEMON_DESC= Daemonize dspam; speaks LMTP or DLMTP |
39 |
CLAMAV_DESC= ClamAV support |
43 |
CLAMAV_DESC= ClamAV support |
40 |
CLAMAV_LOCAL_DESC= RUN_DEPEND on selected ClamAV |
44 |
CLAMAV_LOCAL_DESC= RUN_DEPEND on ClamAV |
41 |
MYSQL_DESC= MySQL 5.X.x as back-end |
45 |
MYSQL_DESC= MySQL 5.X.x as back-end |
42 |
MYSQL_COMPRESS_DESC= Compress dspam <--> MySQL |
46 |
MYSQL_COMPRESS_DESC= Compress dspam <--> MySQL |
43 |
MYSQL_LOCAL_DESC= RUN_DEPEND on MySQL server |
47 |
MYSQL_LOCAL_DESC= RUN_DEPEND on MySQL server |
44 |
PGSQL_DESC= PostgreSQL as back-end |
48 |
PGSQL_DESC= PostgreSQL as back-end |
45 |
PGSQL_LOCAL_DESC= RUN_DEPEND on PostgreSQL server |
49 |
PGSQL_LOCAL_DESC= RUN_DEPEND on PostgreSQL server |
46 |
SQLITE2_DESC= SQLite v2.x as back-end |
50 |
SQLITE2_DESC= SQLite v2.x as back-end |
47 |
SQLITE3_DESC= SQLite v3.x as back-end |
51 |
SQLITE3_DESC= SQLite v3.x as back-end |
48 |
HASH_DESC= Hash driver |
52 |
HASH_DESC= Hash driver |
49 |
EXTERNAL_LOOKUP_DESC= RCPT verification via extlookup |
53 |
EXTERNAL_LOOKUP_DESC= RCPT verification via extlookup |
50 |
USER_HOMEDIR_DESC= Store user data in ~/.dspam |
54 |
USER_HOMEDIR_DESC= Store user data in ~/.dspam |
51 |
TRUSTED_USERS_DESC= Disable trusted user security |
55 |
TRUSTED_USERS_DESC= Disable trusted user security |
Lines 53-74
VIRT_USERS_DESC= Virtual users (needs SQL back-end)
Link Here
|
53 |
LONG_USERNAMES_DESC= Usernames longer that OS supports |
57 |
LONG_USERNAMES_DESC= Usernames longer that OS supports |
54 |
LARGE_SCALE_DESC= File structure for large scale |
58 |
LARGE_SCALE_DESC= File structure for large scale |
55 |
DOMAIN_SCALE_DESC= File structure for multiple domains |
59 |
DOMAIN_SCALE_DESC= File structure for multiple domains |
56 |
CYRUS23_DESC= Cyrus's 2.3 deliver as LDA |
60 |
CYRUS23_DESC= Cyrus's 2.3 deliver as LDA |
57 |
CYRUS24_DESC= Cyrus's 2.4 deliver as LDA |
61 |
CYRUS24_DESC= Cyrus's 2.4 deliver as LDA |
58 |
DOVECOT1_DESC= Dovecot 1.2 deliver as LDA |
62 |
DOVECOT1_DESC= Dovecot 1.2 deliver as LDA |
59 |
DOVECOT2_DESC= Dovecot 2.2 dovecot-lda as LDA |
63 |
DOVECOT2_DESC= Dovecot 2.2 dovecot-lda as LDA |
60 |
EXIM_DESC= Exim as local delivery agent |
64 |
EXIM_DESC= Exim as local delivery agent |
61 |
MAILDROP_DESC= Maildrop as local delivery agent |
65 |
MAILDROP_DESC= Maildrop as local delivery agent |
62 |
PROCMAIL_DESC= Procmail as local delivery agent |
66 |
PROCMAIL_DESC= Procmail as local delivery agent |
63 |
SAFECAT_DESC= Safecat as local delivery agent |
67 |
SAFECAT_DESC= Safecat as local delivery agent |
64 |
SENDMAIL_DESC= Sendmail as local delivery agent |
68 |
SENDMAIL_DESC= Sendmail as local delivery agent |
65 |
NICESENDMAIL_DESC= Play nice with sendmail server |
69 |
NICESENDMAIL_DESC= Play nice with sendmail server |
66 |
POSTFIX_MBC_DESC= Dspam as mailbox_command in Postfix |
70 |
POSTFIX_MBC_DESC= Dspam as mailbox_command in Postfix |
67 |
QMAIL_DESC= Play nice with Qmail mail server |
71 |
QMAIL_DESC= Play nice with Qmail mail server |
68 |
WEBUI_DESC= Install WebUI, pulls in Apache or see below |
72 |
WEBUI_DESC= Install WebUI (RUN_DEPEND on Apache/Lighttpd) |
69 |
|
73 |
LIGHTTPD_DESC= RUN_DEPEND on Lighttpd instead of Apache |
70 |
OPTIONS_DEFAULT= SYSLOG DEBUG DAEMON CLAMAV CLAMAV_LOCAL \ |
|
|
71 |
HASH MYSQL MYSQL_COMPRESS PGSQL SQLITE3 |
72 |
|
74 |
|
73 |
MAKE_JOBS_UNSAFE= yes |
75 |
MAKE_JOBS_UNSAFE= yes |
74 |
USES= perl5 libtool shebangfix |
76 |
USES= perl5 libtool shebangfix |
Lines 78-91
CPPFLAGS+= -I${LOCALBASE}/include
Link Here
|
78 |
LDFLAGS+= -L${LOCALBASE}/lib |
80 |
LDFLAGS+= -L${LOCALBASE}/lib |
79 |
|
81 |
|
80 |
SHEBANG_FILES= src/tools/dspam_logrotate \ |
82 |
SHEBANG_FILES= src/tools/dspam_logrotate \ |
81 |
src/tools/dspam_notify.pl \ |
83 |
src/tools/dspam_notify.in \ |
82 |
src/tools/dspam_train.in \ |
84 |
src/tools/dspam_train.in \ |
83 |
webui/cgi-bin/templates/de/strings.pl \ |
85 |
webui/cgi-bin/templates/*/strings.pl \ |
84 |
webui/cgi-bin/templates/strings.pl \ |
86 |
webui/cgi-bin/templates/strings.pl \ |
85 |
webui/cgi-bin/templates/fr/strings.pl \ |
87 |
webui/cgi-bin/*.cgi \ |
86 |
webui/cgi-bin/templates/es-es/strings.pl \ |
88 |
webui/cgi-bin/*.pl |
87 |
webui/cgi-bin/templates/pt-br/strings.pl \ |
|
|
88 |
webui/cgi-bin/*.cgi |
89 |
|
89 |
|
90 |
.ifdef(GDBS) |
90 |
.ifdef(GDBS) |
91 |
CFLAGS+= -g -DDEBUG |
91 |
CFLAGS+= -g -DDEBUG |
Lines 112-122
DSPAM_HOME_OWNER?= ${DSPAM_OWNER}
Link Here
|
112 |
DSPAM_HOME_GROUP?= ${DSPAM_GROUP} |
112 |
DSPAM_HOME_GROUP?= ${DSPAM_GROUP} |
113 |
DSPAM_HOME_MODE?= 0770 |
113 |
DSPAM_HOME_MODE?= 0770 |
114 |
|
114 |
|
115 |
.for s in OWNER GROUP HOME_OWNER HOME_GROUP |
115 |
PLIST_SUB+= DSPAM_HOME=${DSPAM_HOME} \ |
116 |
PLIST_SUB+= DSPAM_$s=${DSPAM_$s} |
116 |
DSPAM_OWNER=${DSPAM_OWNER} \ |
117 |
.endfor |
117 |
DSPAM_GROUP=${DSPAM_GROUP} \ |
118 |
|
118 |
DSPAM_MODE=${DSPAM_MODE} \ |
119 |
.include <bsd.port.pre.mk> |
119 |
DSPAM_HOME_OWNER=${DSPAM_HOME_OWNER} \ |
|
|
120 |
DSPAM_HOME_GROUP=${DSPAM_HOME_GROUP} \ |
121 |
DSPAM_HOME_MODE=${DSPAM_HOME_MODE} |
120 |
|
122 |
|
121 |
CONFIGURE_ARGS+= --sysconfdir=${DSPAM_ETC} |
123 |
CONFIGURE_ARGS+= --sysconfdir=${DSPAM_ETC} |
122 |
CONFIGURE_ARGS+= --with-logdir=${LOG_DIR} |
124 |
CONFIGURE_ARGS+= --with-logdir=${LOG_DIR} |
Lines 126-144
CONFIGURE_ARGS+= --with-dspam-home=${DSPAM_HOME}
Link Here
|
126 |
CONFIGURE_ARGS+= --with-dspam-home-owner=${DSPAM_HOME_OWNER} |
128 |
CONFIGURE_ARGS+= --with-dspam-home-owner=${DSPAM_HOME_OWNER} |
127 |
CONFIGURE_ARGS+= --with-dspam-home-group=${DSPAM_HOME_GROUP} |
129 |
CONFIGURE_ARGS+= --with-dspam-home-group=${DSPAM_HOME_GROUP} |
128 |
CONFIGURE_ARGS+= --with-dspam-home-mode=${DSPAM_HOME_MODE} |
130 |
CONFIGURE_ARGS+= --with-dspam-home-mode=${DSPAM_HOME_MODE} |
129 |
PLIST_SUB+= DSPAM_HOME=${DSPAM_HOME} |
131 |
PLIST_SUB+= DSPAM_HOME=${DSPAM_HOME} \ |
|
|
132 |
DSPAM_HOME_OWNER=${DSPAM_HOME_OWNER} \ |
133 |
DSPAM_HOME_GROUP=${DSPAM_HOME_GROUP} \ |
134 |
DSPAM_HOME_MODE=${DSPAM_HOME_MODE} |
130 |
|
135 |
|
131 |
CONFIGURE_ARGS+= --with-dspam-owner=${DSPAM_OWNER} |
136 |
CONFIGURE_ARGS+= --with-dspam-owner=${DSPAM_OWNER} |
132 |
CONFIGURE_ARGS+= --with-dspam-group=${DSPAM_GROUP} |
137 |
CONFIGURE_ARGS+= --with-dspam-group=${DSPAM_GROUP} |
133 |
# we set DSPAM_MODE at the end as some LDAs want specific mode |
138 |
# we set DSPAM_MODE at the end as some LDAs want specific mode |
|
|
139 |
PLIST_SUB+= DSPAM_OWNER=${DSPAM_OWNER} \ |
140 |
DSPAM_GROUP=${DSPAM_GROUP} \ |
141 |
DSPAM_MODE=${DSPAM_MODE} |
134 |
|
142 |
|
135 |
_SED_SCRIPT= -e 's,%%DOCSDIR%%,${DOCSDIR},g' \ |
143 |
_SED_SCRIPT= -e 's,%%DOCSDIR%%,${DOCSDIR},g' \ |
136 |
-e 's,%%EXAMPLESDIR%%,${EXAMPLESDIR},g' \ |
144 |
-e 's,%%EXAMPLESDIR%%,${EXAMPLESDIR},g' \ |
137 |
-e 's,%%DSPAM_HOME%%,${DSPAM_HOME},g' \ |
145 |
-e 's,%%DSPAM_HOME%%,${DSPAM_HOME},g' \ |
138 |
-e 's,%%PORTNAME%%,${PORTNAME},g' \ |
146 |
-e 's,%%PORTNAME%%,${PORTNAME},g' \ |
139 |
-e 's,%%_VAR_DIR%%,${_VAR_DIR},g' \ |
147 |
-e 's,%%_VAR_DIR%%,${_VAR_DIR},g' \ |
140 |
-e '/^%%FreeBSD/D' \ |
148 |
-e '/^%%FreeBSD/D' |
141 |
-e '/^%%Tecnik%%/D' |
149 |
|
|
|
150 |
.include <bsd.port.options.mk> |
142 |
|
151 |
|
143 |
.if ${PORT_OPTIONS:MSYSLOG} |
152 |
.if ${PORT_OPTIONS:MSYSLOG} |
144 |
CONFIGURE_ARGS+= --enable-syslog |
153 |
CONFIGURE_ARGS+= --enable-syslog |
Lines 182-188
SUB_LIST+= CLAMD=
Link Here
|
182 |
. endif |
191 |
. endif |
183 |
.endif |
192 |
.endif |
184 |
|
193 |
|
185 |
# we need to know if we are building statically or dynamicaly for the plist |
194 |
# we need to know if we are building statically or dynamically for the plist |
186 |
_DBDRV_COUNT= # blank, but defined so we can check against it |
195 |
_DBDRV_COUNT= # blank, but defined so we can check against it |
187 |
_DBDRV= pgsql_drv,sqlite3_drv,sqlite_drv,hash_drv,mysql_drv, |
196 |
_DBDRV= pgsql_drv,sqlite3_drv,sqlite_drv,hash_drv,mysql_drv, |
188 |
|
197 |
|
Lines 267-275
PLIST_SUB+= DYNAMIC="@comment "
Link Here
|
267 |
.if ${PORT_OPTIONS:MEXTERNAL_LOOKUP} |
276 |
.if ${PORT_OPTIONS:MEXTERNAL_LOOKUP} |
268 |
CONFIGURE_ARGS+= --enable-external-lookup |
277 |
CONFIGURE_ARGS+= --enable-external-lookup |
269 |
USE_OPENLDAP= YES |
278 |
USE_OPENLDAP= YES |
270 |
#CPPFLAGS+= -I${LOCALBASE}/include |
|
|
271 |
#LDFLAGS+= -lldap -llber |
272 |
#CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" |
273 |
.endif |
279 |
.endif |
274 |
|
280 |
|
275 |
.if ${PORT_OPTIONS:MUSER_HOMEDIR} |
281 |
.if ${PORT_OPTIONS:MUSER_HOMEDIR} |
Lines 395-403
pre-everything::
Link Here
|
395 |
@${ECHO_CMD} "" |
401 |
@${ECHO_CMD} "" |
396 |
@${ECHO_CMD} "Last ${FILESDIR}/UPDATING entry:" |
402 |
@${ECHO_CMD} "Last ${FILESDIR}/UPDATING entry:" |
397 |
@${ECHO_CMD} "###########################################################################" |
403 |
@${ECHO_CMD} "###########################################################################" |
398 |
@${SED} -n < ${FILESDIR}/UPDATING "/^# ${PKGNAME}/,/^#####/p" |
404 |
@${SED} -n < ${FILESDIR}/UPDATING "/^# ${PORTNAME}-${PORTVERSION}/,/^#####/p" |
399 |
@${ECHO_CMD} "" |
405 |
@${ECHO_CMD} "" |
400 |
@sleep 5 |
|
|
401 |
.endif |
406 |
.endif |
402 |
|
407 |
|
403 |
pre-extract: |
408 |
pre-extract: |
Lines 424-430
pre-extract:
Link Here
|
424 |
@${ECHO_CMD} "${WWWDIR}" |
429 |
@${ECHO_CMD} "${WWWDIR}" |
425 |
. endif |
430 |
. endif |
426 |
@${ECHO_CMD} "" |
431 |
@${ECHO_CMD} "" |
427 |
@sleep 5 |
|
|
428 |
.endif |
432 |
.endif |
429 |
|
433 |
|
430 |
post-patch: |
434 |
post-patch: |
Lines 438-444
post-patch:
Link Here
|
438 |
${WRKSRC}/src/tools.sqlite_drv/purge-2.sql |
442 |
${WRKSRC}/src/tools.sqlite_drv/purge-2.sql |
439 |
@${REINPLACE_CMD} -e "s|where julianday('now')-julianday(created_on) > 14;|where julianday('now')-julianday(created_on) > ${SIGNATURE_LIFE};|" \ |
443 |
@${REINPLACE_CMD} -e "s|where julianday('now')-julianday(created_on) > 14;|where julianday('now')-julianday(created_on) > ${SIGNATURE_LIFE};|" \ |
440 |
${WRKSRC}/src/tools.sqlite_drv/purge-3.sql |
444 |
${WRKSRC}/src/tools.sqlite_drv/purge-3.sql |
441 |
@${REINPLACE_CMD} -e "s|%%PERL%%|${PERL}|; s|%%DSPAM_PATH%%|${PREFIX}/bin|" ${WRKSRC}/scripts/train.pl |
445 |
@${REINPLACE_CMD} -e "s^%%PERL%%^${PERL}^" \ |
|
|
446 |
${WRKSRC}/src/tools/dspam_train.in \ |
447 |
${WRKSRC}/src/tools/dspam_notify.in |
442 |
|
448 |
|
443 |
pre-configure: |
449 |
pre-configure: |
444 |
.if ${PORT_OPTIONS:MVIRT_USERS} && !( defined(USE_MYSQL) || \ |
450 |
.if ${PORT_OPTIONS:MVIRT_USERS} && !( defined(USE_MYSQL) || \ |
Lines 478-486
post-install:
Link Here
|
478 |
######## |
484 |
######## |
479 |
# stupid hack until I figure out where/how to patch |
485 |
# stupid hack until I figure out where/how to patch |
480 |
@${MKDIR} ${STAGEDIR}${PREFIX}/libdata/pkgconfig |
486 |
@${MKDIR} ${STAGEDIR}${PREFIX}/libdata/pkgconfig |
481 |
@${MV} ${STAGEDIR}${PREFIX}/lib/pkgconfig/dspam.pc \ |
487 |
${MV} ${STAGEDIR}${PREFIX}/lib/pkgconfig/dspam.pc ${STAGEDIR}${PREFIX}/libdata/pkgconfig/dspam.pc |
482 |
${STAGEDIR}${PREFIX}/libdata/pkgconfig/dspam.pc |
488 |
${TEST} `ls -1 ${STAGEDIR}${PREFIX}/lib/pkgconfig | wc -l` -eq 0 && \ |
483 |
${RM} -R ${STAGEDIR}${PREFIX}/lib/pkgconfig || true |
489 |
${RM} -R ${STAGEDIR}${PREFIX}/lib/pkgconfig || true |
484 |
|
490 |
|
485 |
.if ${PORT_OPTIONS:MEXAMPLES} |
491 |
.if ${PORT_OPTIONS:MEXAMPLES} |
486 |
.ifdef(USE_MYSQL) |
492 |
.ifdef(USE_MYSQL) |
Lines 540-546
post-install:
Link Here
|
540 |
@cd ${FILESDIR} && ${INSTALL_DATA} UPDATING ${STAGEDIR}${DOCSDIR}/UPDATING |
546 |
@cd ${FILESDIR} && ${INSTALL_DATA} UPDATING ${STAGEDIR}${DOCSDIR}/UPDATING |
541 |
.endif |
547 |
.endif |
542 |
|
548 |
|
543 |
@${MKDIR} -m ${DSPAM_HOME_MODE} ${STAGEDIR}${DSPAM_HOME} |
549 |
@${MKDIR} ${STAGEDIR}${DSPAM_HOME} |
544 |
.for _file in firstrun.txt firstspam.txt quarantinefull.txt |
550 |
.for _file in firstrun.txt firstspam.txt quarantinefull.txt |
545 |
@if ! ${TEST} -e ${WRKSRC}/txt/${_file}.sample;\ |
551 |
@if ! ${TEST} -e ${WRKSRC}/txt/${_file}.sample;\ |
546 |
then\ |
552 |
then\ |
Lines 553-556
post-install:
Link Here
|
553 |
|
559 |
|
554 |
@${MKDIR} -m ${DSPAM_HOME_MODE} ${STAGEDIR}${LOG_DIR} |
560 |
@${MKDIR} -m ${DSPAM_HOME_MODE} ${STAGEDIR}${LOG_DIR} |
555 |
|
561 |
|
556 |
.include <bsd.port.post.mk> |
562 |
@${CAT} ${WRKSRC}/README.FreeBSD |
|
|
563 |
|
564 |
.include <bsd.port.mk> |