Ticket #14029: Portfile

File Portfile, 3.7 KB (added by compconsultant@…, 17 years ago)
Line 
1# $Id: Portfile 30236 2007-10-22 23:15:10Z jmpp@macports.org $
2
3PortSystem 1.0
4name            dspam
5version         3.8.0
6categories      mail net
7maintainers     yahoo.com:compconsultant
8description     Scalable, opensource statistical anti-spam filter
9long_description Opensource anti-spam filter with multiple algorithms and \
10                 useful admin tools and cgi quaranteen interface.
11
12homepage        http://www.nuclearelephant.com/projects/dspam/index.shtml
13platforms       darwin freebsd
14master_sites    http://dspam.nuclearelephant.com/sources/
15
16distname        ${name}-${version}
17checksums       md5 056b8c8b3ad9415a52c01b22ff1e64cf \
18                sha1 d1de7ee2134522adaf52f49167accecf1589fa96 \
19                rmd160 e7831e2415e30e819dd9cbc0ba3f269e113e2fb9
20
21configure.args  --sysconfdir='${prefix}/etc' \
22                --mandir='${prefix}/share/man' \
23                --with-logdir=/opt/local/var/log/dspam \
24                --enable-daemon
25
26destroot.keepdirs       ${destroot}${prefix}/var/log/dspam
27
28variant vpopmail {
29                configure.args-append --with-dspam-home-owner=vpopmail \
30                                      --with-dspam-home-group=vchkpw \
31                                      --with-dspam-owner=vpopmail \
32                                      --with-dspam-group=vchkpw
33                depends_lib     port:vpopmail
34}
35
36variant mysql5 conflicts postgres sqlite {
37                depends_lib     port:mysql5
38                configure.args-append --with-storage-driver=mysql_drv \
39                                      --with-mysql-includes=${prefix}/include/mysql5/mysql \
40                                      --with-mysql-libraries=${prefix}/lib/mysql5/mysql \
41                                      --enable-preferences-extension \
42                                      --enable-virtual-users
43}
44
45variant sqlite conflicts postgres mysql5 {
46                depends_lib     port:sqlite3
47                configure.args-append --with-sqlite-libaries=${prefix}/lib
48}
49variant postgres conflicts sqlite mysql5 {
50                depends_lib     port:postgresql8
51                configure.args-append --with-storage-driver=pgsql_drv \
52                                      --with-pgsql-includes=${prefix}/include/pgsql8 \
53                                      --with-pgsql-libraries=${prefix}/lib/pgsql8
54}
55
56post-destroot {
57        file mkdir ${destroot}${prefix}/var/dspam/samples
58        file mkdir ${destroot}${prefix}/share/doc/dspam
59        file mkdir ${destroot}${prefix}/var/dspam/mysql
60        file mkdir ${destroot}${prefix}/var/dspam/pgsql
61        file mkdir ${destroot}${prefix}/var/dspam/sqlite
62        file mkdir ${destroot}${prefix}/var/dspam/webui
63        file mkdir ${destroot}${prefix}/var/dspam/webui/cgi-bin
64        file mkdir ${destroot}${prefix}/var/dspam/webui/htdocs
65        file copy ${worksrcpath}/README ${destroot}${prefix}/share/doc/dspam/
66        file copy ${worksrcpath}/UPGRADING ${destroot}${prefix}/share/doc/dspam/
67        system "cp -R ${worksrcpath}/webui/cgi-bin/* ${destroot}${prefix}/var/dspam/webui/cgi-bin/"
68        system "rm ${destroot}${prefix}/var/dspam/webui/cgi-bin/Make*"
69        system "cp -R ${worksrcpath}/webui/htdocs/* ${destroot}${prefix}/var/dspam/webui/htdocs/"
70        system "rm ${destroot}${prefix}/var/dspam/webui/htdocs/Make*"
71        file copy ${worksrcpath}/scripts/train.pl ${destroot}${prefix}/var/dspam/samples/
72        system "cp ${worksrcpath}/txt/*.txt ${destroot}${prefix}/var/dspam/samples/"
73        system "cp ${worksrcpath}/doc/*.txt ${destroot}${prefix}/share/doc/dspam/"
74        system "cp -R ${worksrcpath}/src/tools.mysql_drv/*sql ${destroot}${prefix}/var/dspam/mysql"
75        system "cp -R ${worksrcpath}/src/tools.pgsql_drv/*sql ${destroot}${prefix}/var/dspam/pgsql"
76        system "cp -R ${worksrcpath}/src/tools.sqlite_drv/*sql ${destroot}${prefix}/var/dspam/sqlite"
77        if {[variant_isset vpopmail]} {
78                system "chown -R vpopmail:vchkpw ${destroot}${prefix}/var/dspam"
79                system "chown -R vpopmail:vchkpw ${destroot}${prefix}/var/log/dspam"
80        }
81}
82
83platform darwin 8 {
84        configure.compiler      gcc-4.0
85}