Ticket #5212: Portfile.2

File Portfile.2, 3.0 KB (added by joe@…, 19 years ago)

awstats 6.4

Line 
1# $Id: Portfile,v 1.3 2005/02/28 22:26:40 rshaw Exp $
2PortSystem              1.0
3
4name                    awstats
5version                 6.4
6categories              www
7maintainers             joe@netmusician.org
8description             Free real-time logfile analyzer to get advanced web statistics
9long_description        AWStats is short for Advanced Web Statistics. It's a free tool that \
10                        generates advanced web (but also ftp or mail) server statistics, \
11                        graphically. \
12                        \
13                        This log analyzer works as a CGI or from command line and shows you \
14                        all possible information that your logs contain, in a few graphical \
15                        web pages. It uses a partial information file to be able to process \
16                        large log files, often and quickly. \
17                        \
18                        It can analyze log files from IIS (W3C log format), Apache log files \
19                        (NCSA combined/XLF/ELF log format or common/CLF log format), WebStar \
20                        and most of all web, proxy, WAP, and streaming servers (and FTP \
21                        servers or mail logs).
22
23homepage                http://www.awstats.org
24master_sites            sourceforge
25master_sites.mirror_subdir sourceforge/$name/
26distname                awstats-${version}
27extract.suffix          .tgz
28checksums               md5 056e6fb0c7351b17fe5bbbe0aa1297b1
29platforms               darwin freebsd
30
31depends_lib             port:perl5.8
32
33default_variants        +apache
34                       
35variant apache conflicts apache2 {
36        depends_lib-append      port:apache
37}
38
39variant apache2 conflicts apache {
40        depends_lib-append      port:apache2
41}
42
43use_configure   no
44configure       {}
45build           {}
46
47patch {
48    cd ${worksrcpath}
49    reinplace "s|/usr/local|${prefix}|g" \
50        tools/awstats_buildstaticpages.pl tools/awstats_updateall.pl \
51        tools/httpd_conf tools/webmin/awstats-1.5.wbm \
52        wwwroot/cgi-bin/awstats.model.conf wwwroot/cgi-bin/awstats.pl
53}
54
55set docpath ${destroot}${prefix}/www/awstats
56
57destroot {
58        xinstall -m 755 -d ${destroot}${prefix}/www/awstats \
59                           ${destroot}${prefix}/share/doc/awstats \
60                           ${destroot}${prefix}/etc/awstats
61        eval file copy [glob ${worksrcpath}/wwwroot/*] ${docpath}
62        eval file copy ${worksrcpath}/tools ${docpath}
63        eval file copy [glob ${worksrcpath}/docs/*] ${destroot}${prefix}/share/doc/awstats
64        xinstall -m 755 -W ${worksrcpath} wwwroot/cgi-bin/awstats.model.conf ${destroot}${prefix}/etc/awstats
65}
66
67post-install {
68        ui_msg "**********************************************************************"
69        ui_msg "Add the following to your Apache httpd.conf, save, and restart Apache:"
70        ui_msg ""
71        ui_msg "Alias /awstatsclasses \"/opt/local/www/awstats/classes/\""
72        ui_msg "Alias /awstatscss \"/opt/local/www/awstats/css/\""
73        ui_msg "Alias /awstatsicons \"/opt/local/www/awstats/icons/\""
74        ui_msg "ScriptAlias /awstats/ \"/opt/local/www/awstats/cgi-bin/\""
75        ui_msg ""
76        ui_msg "<Directory \"/opt/local/www/awstats/\">"
77        ui_msg "        Options None"
78        ui_msg "        AllowOverride None"
79        ui_msg "        Order allow,deny"
80        ui_msg "        Allow from all"
81        ui_msg "</Directory>"
82        ui_msg ""
83        ui_msg "Find your sample config file in /opt/local/etc/awstats, rename it to"
84        ui_msg "\"awstats.domain_name.conf\", and edit it to configure Awstats. You"
85        ui_msg "can then access Awstats by pointing your browser to:"
86        ui_msg ""
87        ui_msg "http://yourdomain/awstats/awstats.pl"
88}
89
90