source: trunk/dports/mail/assp/Portfile @ 21488

Last change on this file since 21488 was 20414, checked in by jberry@…, 13 years ago

Convert all darwinports@… addresses
to nomaintainer@… or openmaintainer@….

See http://trac.macports.org/projects/macports/wiki/SpecialMaintainerAddresses
for more information.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.2 KB
Line 
1# $Id: Portfile 20414 2006-11-03 02:15:12Z jberry@macports.org $
2PortSystem              1.0
3
4name                    assp
5version                 1.1.0
6categories              mail
7maintainers             nomaintainer@macports.org
8description             Anti-Spam SMTP Proxy (ASSP) Server
9long_description        The Anti-Spam SMTP Proxy (ASSP) Server is an open \
10                                        source, platform-independent SMTP Proxy server which \
11                                        implements whitelists and Bayesian filtering to rid \
12                                        the planet of the blight of unsolicited email (UCE). \
13                                        UCE must be stopped at the SMTP server.  Anti-spam \
14                                        tools must be adaptive to new spam and customized \
15                                        for each site?s mail patterns. This free, \
16                                        easy-to-use tool works with any mail transport and \
17                                        achieves these goals requiring no operator \
18                                        intervention after the initial setup phase.
19homepage                http://assp.sourceforge.net/
20master_sites    sourceforge
21use_zip                 yes
22checksums               md5 55be31bab3efacc6bd964adf8cd25c83
23platforms               darwin
24
25depends_run             bin:perl:perl5.8
26
27pre-extract             { file mkdir ${worksrcpath} }
28extract.dir             ${worksrcpath}
29
30set assp_base   ${prefix}/var/assp
31
32pre-patch {
33        cd ${worksrcpath}
34        file rename "ASSP Documentation.htm" "ASSPDocumentation.htm"
35        file rename "Regular Expression Tutorial.htm" RegularExpressionTutorial.htm
36        foreach file [glob *.pl *.sh *.htm *.txt rc/*.dat] {
37                reinplace "s%\r%%" $file
38        }
39}
40patchfiles              patch-assp.pl
41
42configure {
43        cd ${worksrcpath}
44        reinplace "s%^#!.*perl%#![binaryInPath perl]%" \
45                assp.pl move2num.pl rebuildspamdb.pl repair.pl stat.pl
46        reinplace "s%/usr/local/assp%${assp_base}%" \
47                ASSPDocumentation.htm \
48                stats.sh \
49                assp.pl \
50                rc/assp.dat rc/start.dat rc/stop.dat
51        reinplace "s%/usr/local%${prefix}%" \
52                ASSPDocumentation.htm
53}
54
55build {}
56
57pre-destroot {
58        addgroup assp
59        set gid [existsgroup assp]
60        adduser assp gid=${gid} realname=ASSP\ Proxy home=${prefix}/var/assp
61}
62destroot {
63        cd ${worksrcpath}
64
65        xinstall -d -m 0755 ${destroot}${prefix}/etc/rc.d
66        xinstall -m 0755 rc/assp.dat ${destroot}${prefix}/etc/rc.d/assp.sh
67
68        xinstall -o assp -g assp -d -m 0755 ${destroot}${assp_base}
69        xinstall -o assp -g assp -m 0640 ${filespath}/assp.cfg.in \
70                ${destroot}${assp_base}/assp.cfg-dist
71        reinplace "s%__BASE%${assp_base}%" ${destroot}${assp_base}/assp.cfg-dist
72        xinstall -o assp -g assp -m 0755 rc/start.dat ${destroot}${assp_base}/start
73        xinstall -o assp -g assp -m 0755 rc/stop.dat ${destroot}${assp_base}/stop
74        foreach file {freshclam.sh stats.sh} {
75                xinstall -o assp -g assp -m 0755 $file ${destroot}${assp_base}
76        }
77        foreach file {assp.pl move2num.pl rebuildspamdb.pl repair.pl stat.pl} {
78                xinstall -o assp -g assp -m 0755 $file ${destroot}${assp_base}
79        }
80        foreach file {notspamreport.txt spamreport.txt whitereport.txt} {
81                xinstall -o assp -g assp -m 0644 $file ${destroot}${assp_base}
82        }
83
84        xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}
85        xinstall -m 0644 changelog.txt ${destroot}${prefix}/share/doc/${name}
86        foreach file [glob *.htm] {
87                xinstall -m 0644 $file ${destroot}${prefix}/share/doc/${name}
88        }
89}
90
91pre-install {
92        addgroup assp
93        set gid [existsgroup assp]
94        adduser assp gid=${gid} realname=ASSP\ Proxy home=${prefix}/var/assp
95}
96
97post-activate {
98        if {![file exists ${assp_base}/assp.cfg]} {
99                xinstall -o assp -g assp -m 0640 ${assp_base}/assp.cfg-dist \
100                        ${assp_base}/assp.cfg
101                ui_msg "
102========================================================================
103After restarting your computer or manually starting ASSP:
104
105  sudo ${prefix}/etc/rc.d/assp.sh start
106
107Point your browser to http://127.0.0.1:55555/ -- put anything you like
108in the username and use the password nospam4me to connect. If everything
109is working correctly you will see a beautifully formatted configuration
110screen with all of ASSP's fabulous features spelled out for you in
111painful detail. Simply click the options you want, type a few
112customizations if you like and you're on your way.
113
114At a minimum you'll want to change values for 'Web Admin Password,'
115'Accept All Mail,' 'Local Domains,' 'Spam Error,' and 'Spam Addresses.'
116The password for your server is posted in bold on the internet for
117EVERYONE to see, so if you don't change it, you deserve what you get.
118Also remember to press Enter or click the button at the bottom to
119register your changes - simply clearing a checkbox doesn't send the
120change to ASSP.
121
122See ${homepage} for more information.
123========================================================================
124"
125        }
126}
127
Note: See TracBrowser for help on using the repository browser.