|
Lines 6-94
Link Here
|
| 6 |
# |
6 |
# |
| 7 |
|
7 |
|
| 8 |
PORTNAME= popfile |
8 |
PORTNAME= popfile |
| 9 |
PORTVERSION= 1.1.1 |
9 |
PORTVERSION= 1.1.3 |
| 10 |
#PORTREVISION= 0 |
|
|
| 11 |
CATEGORIES= mail |
10 |
CATEGORIES= mail |
| 12 |
MASTER_SITES= http://getpopfile.org/downloads/ |
11 |
MASTER_SITES= http://getpopfile.org/downloads/%SUBDIR%/ |
|
|
12 |
MASTER_SITE_SUBDIR= . archive |
| 13 |
DIST_SUBDIR= ${PORTNAME} |
13 |
DIST_SUBDIR= ${PORTNAME} |
| 14 |
|
14 |
|
| 15 |
MAINTAINER= ports@FreeBSD.org |
15 |
MAINTAINER= ports@FreeBSD.org |
| 16 |
COMMENT= Automatic mail classification tool, acts as a POP3 proxy |
16 |
COMMENT= Automatic mail classification tool, acts as a POP3 proxy |
| 17 |
|
17 |
|
|
|
18 |
LICENSE= GPLv2 |
| 19 |
|
| 18 |
RUN_DEPENDS= p5-DBD-SQLite>=0:${PORTSDIR}/databases/p5-DBD-SQLite \ |
20 |
RUN_DEPENDS= p5-DBD-SQLite>=0:${PORTSDIR}/databases/p5-DBD-SQLite \ |
|
|
21 |
p5-TimeDate>=0:${PORTSDIR}/devel/p5-TimeDate \ |
| 19 |
p5-HTML-Tagset>=0:${PORTSDIR}/www/p5-HTML-Tagset \ |
22 |
p5-HTML-Tagset>=0:${PORTSDIR}/www/p5-HTML-Tagset \ |
| 20 |
p5-HTML-Template>=0:${PORTSDIR}/www/p5-HTML-Template \ |
23 |
p5-HTML-Template>=0:${PORTSDIR}/www/p5-HTML-Template |
| 21 |
p5-TimeDate>=0:${PORTSDIR}/devel/p5-TimeDate |
24 |
|
|
|
25 |
OPTIONS_DEFINE= SSL XMLRPC UPGRADE_FROM_0_20 KAKASI MECABU |
| 26 |
SSL_DESC= \ |
| 27 |
Depend SSL libraries/modules to use SSL connection to the servers |
| 28 |
XMLRPC_DESC= \ |
| 29 |
Depend SOAP libraries to use POPFile as XMLRPC server |
| 30 |
UPGRADE_FROM_0_20_DESC= \ |
| 31 |
Depend BerkeleyDB libraries to upgrade old POPFile corpus |
| 32 |
KAKASI_DESC= \ |
| 33 |
Depend Kakasi library to handle Japanese text |
| 34 |
MECABU_DESC= \ |
| 35 |
Depend MeCab library to handle Japanese text |
| 22 |
|
36 |
|
| 23 |
NO_BUILD= yes |
|
|
| 24 |
NO_WRKSUBDIR= yes |
37 |
NO_WRKSUBDIR= yes |
| 25 |
PLIST_SUB+= PORTVERSION=${PORTVERSION} |
38 |
NO_BUILD= yes |
| 26 |
|
39 |
|
| 27 |
USE_ZIP= yes |
40 |
USE_ZIP= yes |
| 28 |
USE_PERL5_RUN= 5.8.0+ |
41 |
USE_PERL5_RUN= 5.8.0+ |
| 29 |
|
42 |
|
| 30 |
START_SCRIPTS_SUB= DATADIR=${DATADIR} |
43 |
PLIST_SUB= VERSION="${PORTVERSION}" |
| 31 |
|
44 |
|
| 32 |
.include <bsd.port.pre.mk> |
45 |
.include <bsd.port.pre.mk> |
| 33 |
|
46 |
|
| 34 |
.if defined(WITH_POPFILE_SSL) |
47 |
.if ${PORT_OPTIONS:MSSL} |
| 35 |
# POPFile works with IO::Socket::SSL version 1.07 (and not 0.97/0.99). |
48 |
# POPFile works with IO::Socket::SSL version 1.07 (and not 0.97/0.99). |
| 36 |
RUN_DEPENDS+= p5-IO-Socket-SSL>=1.07:${PORTSDIR}/security/p5-IO-Socket-SSL |
49 |
RUN_DEPENDS+= p5-IO-Socket-SSL>=1.07:${PORTSDIR}/security/p5-IO-Socket-SSL |
| 37 |
.endif |
50 |
.endif |
| 38 |
|
51 |
|
| 39 |
.if defined(WITH_POPFILE_XMLRPC) |
52 |
.if ${PORT_OPTIONS:MXMLRPC} |
| 40 |
RUN_DEPENDS+= p5-SOAP-Lite>=0:${PORTSDIR}/net/p5-SOAP-Lite |
53 |
RUN_DEPENDS+= p5-SOAP-Lite>=0:${PORTSDIR}/net/p5-SOAP-Lite |
| 41 |
.endif |
54 |
.endif |
| 42 |
|
55 |
|
| 43 |
.if defined(WITH_POPFILE_SOCKS) |
56 |
#.if ${PORT_OPTIONS:MSOCKS} |
| 44 |
# XXX: IO::Socket::Socks should be listed here but no ports yet. For those |
57 |
# XXX: IO::Socket::Socks should be listed here but no ports yet. For those |
| 45 |
# interested, check http://search.cpan.org/~reatmon/IO-Socket-Socks-0.1/. |
58 |
# interested, check http://search.cpan.org/~reatmon/IO-Socket-Socks-0.1/. |
| 46 |
.endif |
59 |
#.endif |
| 47 |
|
60 |
|
| 48 |
.if defined(WITH_POPFILE_UPGRADE_FROM_0_20) |
61 |
.if ${PORT_OPTIONS:MUPGRADE_FROM_0_20} |
| 49 |
RUN_DEPENDS+= p5-BerkeleyDB>=0:${PORTSDIR}/databases/p5-BerkeleyDB |
62 |
RUN_DEPENDS+= p5-BerkeleyDB>=0:${PORTSDIR}/databases/p5-BerkeleyDB |
| 50 |
.endif |
63 |
.endif |
| 51 |
|
64 |
|
| 52 |
.if defined(WITH_POPFILE_JAPANESE) |
65 |
.if ${PORT_OPTIONS:MKAKASI} |
| 53 |
# For backward compatibility; popfile 0.x supports Kakasi only. |
|
|
| 54 |
WITH_POPFILE_KAKASI=YES |
| 55 |
.endif |
| 56 |
.if defined(WITH_POPFILE_KAKASI) |
| 57 |
RUN_DEPENDS+= p5-Text-Kakasi>=0:${PORTSDIR}/japanese/p5-Text-Kakasi |
66 |
RUN_DEPENDS+= p5-Text-Kakasi>=0:${PORTSDIR}/japanese/p5-Text-Kakasi |
| 58 |
.endif |
67 |
.endif |
| 59 |
.if defined(WITH_POPFILE_MECAB) |
68 |
|
|
|
69 |
.if ${PORT_OPTIONS:MMECAB} |
| 60 |
RUN_DEPENDS+= p5-MeCab>=0:${PORTSDIR}/japanese/p5-MeCab |
70 |
RUN_DEPENDS+= p5-MeCab>=0:${PORTSDIR}/japanese/p5-MeCab |
| 61 |
.endif |
71 |
.endif |
| 62 |
|
72 |
|
| 63 |
pre-fetch: |
|
|
| 64 |
@${ECHO_CMD} "This port has some compile-time options:" |
| 65 |
@${ECHO_CMD} "" |
| 66 |
@${ECHO_CMD} " * make WITH_POPFILE_SSL=YES" |
| 67 |
@${ECHO_CMD} " Depend SSL libraries/modules to use SSL connection to the servers." |
| 68 |
@${ECHO_CMD} "" |
| 69 |
@${ECHO_CMD} " * make WITH_POPFILE_XMLRPC=YES" |
| 70 |
@${ECHO_CMD} " Depend SOAP libraries to use POPFile as XMLRPC server." |
| 71 |
@${ECHO_CMD} "" |
| 72 |
@${ECHO_CMD} " * make WITH_POPFILE_UPGRADE_FROM_0_20=YES" |
| 73 |
@${ECHO_CMD} " Depend BerkeleyDB libraries to upgrade old POPFile corpus." |
| 74 |
@${ECHO_CMD} " This option is required only for upgrading POPFile 0.20.1 or before." |
| 75 |
@${ECHO_CMD} "" |
| 76 |
@${ECHO_CMD} " * make WITH_POPFILE_KAKASI=YES" |
| 77 |
@${ECHO_CMD} " Depend Kakasi library to handle Japanese text." |
| 78 |
@${ECHO_CMD} " * make WITH_POPFILE_MECAB=YES" |
| 79 |
@${ECHO_CMD} " Depend MeCab library to handle Japanese text." |
| 80 |
|
| 81 |
post-patch: |
73 |
post-patch: |
| 82 |
${CHMOD} +x ${WRKSRC}/popfile.pl |
74 |
@${REINPLACE_CMD} -e \ |
| 83 |
${REINPLACE_CMD} -i '' -e "s,^#!/usr/bin/perl$$,#!${PERL}," ${WRKSRC}/popfile.pl |
75 |
's|^#!/usr/bin/perl$$|#!${PERL}|' ${WRKSRC}/popfile.pl |
| 84 |
${FIND} ${PATCH_WRKSRC} -name '*.orig' -delete |
76 |
@${SED} 's|%%DATADIR%%|${DATADIR}|' \ |
|
|
77 |
< ${FILESDIR}/popfile.sh > ${WRKDIR}/popfile.sh |
| 85 |
|
78 |
|
| 86 |
do-install: |
79 |
do-install: |
| 87 |
${MKDIR} ${DATADIR} |
|
|
| 88 |
${CP} -R ${WRKSRC}/* ${DATADIR} |
| 89 |
@${SED} ${START_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ |
| 90 |
${FILESDIR}/popfile.sh > ${WRKDIR}/popfile.sh |
| 91 |
${INSTALL_SCRIPT} ${WRKDIR}/popfile.sh ${PREFIX}/sbin |
80 |
${INSTALL_SCRIPT} ${WRKDIR}/popfile.sh ${PREFIX}/sbin |
| 92 |
${RM} ${WRKDIR}/popfile.sh |
81 |
@${MKDIR} ${DATADIR} |
|
|
82 |
(cd ${WRKSRC} && ${INSTALL_SCRIPT} *.pl ${DATADIR}) |
| 83 |
(cd ${WRKSRC} && ${INSTALL_DATA} \ |
| 84 |
stopwords *.change* *.gif *.ico *.pck *.png ${DATADIR}) |
| 85 |
.for i in Classifier POPFile Proxy Services UI languages skins |
| 86 |
@(cd ${WRKSRC} && ${COPYTREE_SHARE} ${i} ${DATADIR}) |
| 87 |
.endfor |
| 93 |
|
88 |
|
| 94 |
.include <bsd.port.post.mk> |
89 |
.include <bsd.port.post.mk> |