Lines 19-25
Link Here
|
19 |
MAINTAINER= itetcu@people.tecnik93.com |
19 |
MAINTAINER= itetcu@people.tecnik93.com |
20 |
COMMENT= Bayesian spam filter - development version |
20 |
COMMENT= Bayesian spam filter - development version |
21 |
|
21 |
|
22 |
PORTVER_MAJ= 3.6.0 |
22 |
PORTVER_MAJ= 3.6.1 |
23 |
#SNAP_DATE= .20051016.2141 |
23 |
#SNAP_DATE= .20051016.2141 |
24 |
|
24 |
|
25 |
.ifdef(SNAP_DATE) |
25 |
.ifdef(SNAP_DATE) |
Lines 87-92
Link Here
|
87 |
OPTIONS+= QMAIL "Play nice with Qmail mail server" off |
87 |
OPTIONS+= QMAIL "Play nice with Qmail mail server" off |
88 |
|
88 |
|
89 |
OPTIONS+= CGI "Install CGI (pulls in apache)" off |
89 |
OPTIONS+= CGI "Install CGI (pulls in apache)" off |
|
|
90 |
OPTIONS+= TRAIN_SCRIPT "Install trainning script (needs perl)" off |
90 |
|
91 |
|
91 |
USE_LIBTOOL_VER=15 |
92 |
USE_LIBTOOL_VER=15 |
92 |
USE_REINPLACE= yes |
93 |
USE_REINPLACE= yes |
Lines 106-112
Link Here
|
106 |
|
107 |
|
107 |
PKGMESSAGE= ${WRKSRC}/src/README.FreeBSD |
108 |
PKGMESSAGE= ${WRKSRC}/src/README.FreeBSD |
108 |
|
109 |
|
109 |
_UPD_LINE_NO= 16 |
110 |
_UPD_LINE_NO= 23 |
110 |
|
111 |
|
111 |
CONFLICTS= dspam-[0-9]* |
112 |
CONFLICTS= dspam-[0-9]* |
112 |
|
113 |
|
Lines 227-233
Link Here
|
227 |
.endif |
228 |
.endif |
228 |
|
229 |
|
229 |
.if defined(WITH_BDB4) |
230 |
.if defined(WITH_BDB4) |
230 |
LIB_DEPENDS+= db41.1:${PORTSDIR}/databases/db41 |
231 |
# change me when we have BDB_VERSOIN in bsd.databases.mk |
|
|
232 |
USE_BDB= 41 |
231 |
CONFIGURE_ARGS+= --with-db4-includes=${LOCALBASE}/include/db41 |
233 |
CONFIGURE_ARGS+= --with-db4-includes=${LOCALBASE}/include/db41 |
232 |
PLIST_SUB+= DB4="" |
234 |
PLIST_SUB+= DB4="" |
233 |
#PKGNAMESUFFIX= -bdb41 |
235 |
#PKGNAMESUFFIX= -bdb41 |
Lines 238-259
Link Here
|
238 |
.endif |
240 |
.endif |
239 |
|
241 |
|
240 |
.if defined(WITH_SQLITE3) |
242 |
.if defined(WITH_SQLITE3) |
241 |
HAVE_SQLITE= yes |
243 |
USE_SQLITE= 3 |
242 |
LIB_DEPENDS+= sqlite3.8:${PORTSDIR}/databases/sqlite3 |
|
|
243 |
_DBDRV_COUNT:= ${_DBDRV_COUNT}o |
244 |
_DBDRV_COUNT:= ${_DBDRV_COUNT}o |
244 |
.else |
245 |
.else |
245 |
_DBDRV:= ${_DBDRV:S/sqlite3_drv,//} |
246 |
_DBDRV:= ${_DBDRV:S/sqlite3_drv,//} |
246 |
.endif |
247 |
.endif |
247 |
|
248 |
|
248 |
.if defined(WITH_SQLITE2) |
249 |
.if defined(WITH_SQLITE2) |
249 |
HAVE_SQLITE= yes |
250 |
USE_SQLITE= 2 |
250 |
LIB_DEPENDS+= sqlite.2:${PORTSDIR}/databases/sqlite2 |
|
|
251 |
_DBDRV_COUNT:= ${_DBDRV_COUNT}o |
251 |
_DBDRV_COUNT:= ${_DBDRV_COUNT}o |
252 |
.else |
252 |
.else |
253 |
_DBDRV:= ${_DBDRV:S/sqlite_drv,//} |
253 |
_DBDRV:= ${_DBDRV:S/sqlite_drv,//} |
254 |
.endif |
254 |
.endif |
255 |
|
255 |
|
256 |
.if defined(HAVE_SQLITE) |
256 |
.if defined(USE_SQLITE) |
257 |
CONFIGURE_ARGS+= --with-sqlite-includes=${LOCALBASE}/include \ |
257 |
CONFIGURE_ARGS+= --with-sqlite-includes=${LOCALBASE}/include \ |
258 |
--with-sqlite-libraries=${LOCALBASE}/lib |
258 |
--with-sqlite-libraries=${LOCALBASE}/lib |
259 |
PLIST_SUB+= SQLITE="" |
259 |
PLIST_SUB+= SQLITE="" |
Lines 402-408
Link Here
|
402 |
RUN_DEPENDS+= ${SITE_PERL}/GD/Text.pm:${PORTSDIR}/graphics/p5-GD-TextUtil |
402 |
RUN_DEPENDS+= ${SITE_PERL}/GD/Text.pm:${PORTSDIR}/graphics/p5-GD-TextUtil |
403 |
CONFIGURE_ARGS+=--enable-logging |
403 |
CONFIGURE_ARGS+=--enable-logging |
404 |
CONFIGURE_ARGS+=--enable-user-logging |
404 |
CONFIGURE_ARGS+=--enable-user-logging |
405 |
USE_PERL5_RUN= yes |
405 |
USE_PERL5= yes |
406 |
PLIST_SUB+= CGI="" |
406 |
PLIST_SUB+= CGI="" |
407 |
CGI_PATH?= ${PREFIX}/www/vhosts/dspam |
407 |
CGI_PATH?= ${PREFIX}/www/vhosts/dspam |
408 |
_SED_SCRIPT+= -e 's/%%CGI%%//g' |
408 |
_SED_SCRIPT+= -e 's/%%CGI%%//g' |
Lines 414-419
Link Here
|
414 |
_SED_SCRIPT+= -e '/%%CGI%%/D' |
414 |
_SED_SCRIPT+= -e '/%%CGI%%/D' |
415 |
.endif |
415 |
.endif |
416 |
|
416 |
|
|
|
417 |
.ifdef(WITH_TRAIN_SCRIPT) |
418 |
USE_PERL5= yes |
419 |
PLIST_SUB+= TRAIN_SCRIPT="" |
420 |
.else |
421 |
PLIST_SUB+= TRAIN_SCRIPT="@comment " |
422 |
.endif |
423 |
|
417 |
MAN1= dspam.1 dspam_clean.1 dspam_corpus.1 dspam_dump.1 dspam_merge.1 \ |
424 |
MAN1= dspam.1 dspam_clean.1 dspam_corpus.1 dspam_dump.1 dspam_merge.1 \ |
418 |
dspam_stats.1 |
425 |
dspam_stats.1 |
419 |
MAN3= libdspam.3 |
426 |
MAN3= libdspam.3 |
Lines 463-469
Link Here
|
463 |
@${ECHO_CMD} "installed in other place that this installation's default" |
470 |
@${ECHO_CMD} "installed in other place that this installation's default" |
464 |
@${ECHO_CMD} "${PREFIX}/www/vhosts/dspam" |
471 |
@${ECHO_CMD} "${PREFIX}/www/vhosts/dspam" |
465 |
. endif |
472 |
. endif |
466 |
@${ECHO_CMD} "Define WITHOUT_DAEMON if not using OPTIONS and do not want daemon." |
|
|
467 |
@${ECHO_CMD} "" |
473 |
@${ECHO_CMD} "" |
468 |
@sleep 5 |
474 |
@sleep 5 |
469 |
|
475 |
|
Lines 501-511
Link Here
|
501 |
@${REINPLACE_CMD} -e 's|(libdir)/pkgconfig|(prefix)/libdata/pkgconfig|' \ |
507 |
@${REINPLACE_CMD} -e 's|(libdir)/pkgconfig|(prefix)/libdata/pkgconfig|' \ |
502 |
${WRKSRC}/Makefile.in |
508 |
${WRKSRC}/Makefile.in |
503 |
|
509 |
|
504 |
@${REINPLACE_CMD} -e 's|where @a-14 > to_days(created_on);|where @a-${SIGNATURE_LIFE} > to_days(created_on);|' ${WRKSRC}/src/tools.mysql_drv/purge.sql |
510 |
@${REINPLACE_CMD} -e 's|where @a-14 > to_days(created_on);|where @a-${SIGNATURE_LIFE} > to_days(created_on);|' \ |
505 |
@${REINPLACE_CMD} -e 's|WHERE CURRENT_DATE - created_on > 14;|WHERE CURRENT_DATE - created_on > ${SIGNATURE_LIFE};|' ${WRKSRC}/src/tools.pgsql_drv/purge.sql |
511 |
${WRKSRC}/src/tools.mysql_drv/purge.sql |
506 |
@${REINPLACE_CMD} -e 's|where SYSDATE-created_on > 14|where SYSDATE-created_on > ${SIGNATURE_LIFE};|' ${WRKSRC}/src/tools.ora_drv/purge.sql |
512 |
@${REINPLACE_CMD} -e 's|where @a-14 > to_days(created_on);|where @a-${SIGNATURE_LIFE} > to_days(created_on);|' \ |
507 |
@${REINPLACE_CMD} -e "s|where date('now')-date(created_on) > 14;|where date('now')-date(created_on) > ${SIGNATURE_LIFE};|" ${WRKSRC}/src/tools.sqlite_drv/purge-2.sql |
513 |
${WRKSRC}/src/tools.mysql_drv/purge-4.1.sql |
508 |
@${REINPLACE_CMD} -e "s|where julianday('now')-julianday(created_on) > 14;|where julianday('now')-julianday(created_on) > ${SIGNATURE_LIFE};|" ${WRKSRC}/src/tools.sqlite_drv/purge-3.sql |
514 |
@${REINPLACE_CMD} -e 's|WHERE CURRENT_DATE - created_on > 14;|WHERE CURRENT_DATE - created_on > ${SIGNATURE_LIFE};|' \ |
|
|
515 |
${WRKSRC}/src/tools.pgsql_drv/purge.sql |
516 |
@${REINPLACE_CMD} -e 's|where SYSDATE-created_on > 14|where SYSDATE-created_on > ${SIGNATURE_LIFE};|' \ |
517 |
${WRKSRC}/src/tools.ora_drv/purge.sql |
518 |
@${REINPLACE_CMD} -e "s|where date('now')-date(created_on) > 14;|where date('now')-date(created_on) > ${SIGNATURE_LIFE};|" \ |
519 |
${WRKSRC}/src/tools.sqlite_drv/purge-2.sql |
520 |
@${REINPLACE_CMD} -e "s|where julianday('now')-julianday(created_on) > 14;|where julianday('now')-julianday(created_on) > ${SIGNATURE_LIFE};|" \ |
521 |
${WRKSRC}/src/tools.sqlite_drv/purge-3.sql |
522 |
|
523 |
.ifdef(WITH_TRAIN_SCRIPT) |
524 |
@${REINPLACE_CMD} -e "s^%%PERL%%^${PERL}^; s^%%DSPAM_PATH%%^${PREFIX}/bin^" ${WRKSRC}/scripts/train.pl |
525 |
.endif |
509 |
|
526 |
|
510 |
pre-configure: |
527 |
pre-configure: |
511 |
@${ECHO_CMD} |
528 |
@${ECHO_CMD} |
Lines 544-550
Link Here
|
544 |
@${FALSE} |
561 |
@${FALSE} |
545 |
.endif |
562 |
.endif |
546 |
.if defined(WITH_LDAP) && !( defined(USE_MYSQL) || \ |
563 |
.if defined(WITH_LDAP) && !( defined(USE_MYSQL) || \ |
547 |
defined(WITH_POSTGRESQL) || defined(HAVE_SQLITE) ) |
564 |
defined(WITH_POSTGRESQL) || defined(USE_SQLITE) ) |
548 |
@${ECHO_CMD} "You need MySQL, Postgres or SQLITE for LDAP." |
565 |
@${ECHO_CMD} "You need MySQL, Postgres or SQLITE for LDAP." |
549 |
@${FALSE} |
566 |
@${FALSE} |
550 |
.endif |
567 |
.endif |
Lines 588-594
Link Here
|
588 |
@cd ${WRKSRC}/src/tools.pgsql_drv && \ |
605 |
@cd ${WRKSRC}/src/tools.pgsql_drv && \ |
589 |
${INSTALL_DATA} *.sql ${EXAMPLESDIR}/pgsql |
606 |
${INSTALL_DATA} *.sql ${EXAMPLESDIR}/pgsql |
590 |
.endif |
607 |
.endif |
591 |
.ifdef(HAVE_SQLITE) |
608 |
.ifdef(USE_SQLITE) |
592 |
@${MKDIR} ${EXAMPLESDIR}/sqlite |
609 |
@${MKDIR} ${EXAMPLESDIR}/sqlite |
593 |
cd ${WRKSRC}/src/tools.sqlite_drv && \ |
610 |
cd ${WRKSRC}/src/tools.sqlite_drv && \ |
594 |
${INSTALL_DATA} *.sql ${EXAMPLESDIR}/sqlite |
611 |
${INSTALL_DATA} *.sql ${EXAMPLESDIR}/sqlite |
Lines 601-607
Link Here
|
601 |
|
618 |
|
602 |
.ifdef(WITH_CGI) |
619 |
.ifdef(WITH_CGI) |
603 |
. for I in admin.cgi admingraph.cgi configure.pl dspam.cgi graph.cgi |
620 |
. for I in admin.cgi admingraph.cgi configure.pl dspam.cgi graph.cgi |
604 |
@${SED} -i '' -e "s,/usr/bin/perl,${PERL},g" ${WRKSRC}/webui/cgi-bin/${I} |
621 |
@${REINPLACE_CMD} -e "s,/usr/bin/perl,${PERL},g" ${WRKSRC}/webui/cgi-bin/${I} |
605 |
. endfor |
622 |
. endfor |
606 |
cd ${WRKSRC}/webui/cgi-bin && ${MV} configure.pl configure.pl.sample |
623 |
cd ${WRKSRC}/webui/cgi-bin && ${MV} configure.pl configure.pl.sample |
607 |
cd ${WRKSRC}/webui/cgi-bin && ${MKDIR} ${CGI_PATH} && \ |
624 |
cd ${WRKSRC}/webui/cgi-bin && ${MKDIR} ${CGI_PATH} && \ |
Lines 616-621
Link Here
|
616 |
${INSTALL_DATA} admins ${CGI_PATH}/admins.sample |
633 |
${INSTALL_DATA} admins ${CGI_PATH}/admins.sample |
617 |
@${MKDIR} ${CGI_PATH}/templates && cd ${WRKSRC}/webui/cgi-bin/templates && \ |
634 |
@${MKDIR} ${CGI_PATH}/templates && cd ${WRKSRC}/webui/cgi-bin/templates && \ |
618 |
${INSTALL_DATA} *.html ${CGI_PATH}/templates/ |
635 |
${INSTALL_DATA} *.html ${CGI_PATH}/templates/ |
|
|
636 |
.endif |
637 |
|
638 |
.ifdef(WITH_TRAIN_SCRIPT) |
639 |
cd ${WRKSRC}/scripts && \ |
640 |
${INSTALL_SCRIPT} train.pl ${PREFIX}/bin/dspam_train |
619 |
.endif |
641 |
.endif |
620 |
|
642 |
|
621 |
@${SED} ${_SED_SCRIPT} ${.CURDIR}/pkg-message > ${WRKSRC}/README.FreeBSD |
643 |
@${SED} ${_SED_SCRIPT} ${.CURDIR}/pkg-message > ${WRKSRC}/README.FreeBSD |