source: trunk/dports/www/awstats/Portfile @ 87969

Last change on this file since 87969 was 47362, checked in by alakazam@…, 11 years ago

Followup on r47359 for #18662 : Replace all occurences of /usr/bin/.

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