1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name logwatch |
---|
7 | revision 1 |
---|
8 | version 7.3.6 |
---|
9 | distname logwatch-${version} |
---|
10 | categories security |
---|
11 | maintainers lassi.tuura@cern.ch |
---|
12 | description system log analyzer and reporter |
---|
13 | long_description \ |
---|
14 | Logwatch is a customizable log analysis system. Logwatch \ |
---|
15 | parses through your system's logs for a given period of \ |
---|
16 | time and creates a report analyzing areas that you \ |
---|
17 | specify, in as much detail as you require. Logwatch is \ |
---|
18 | easy to use and will work right out of the package on most \ |
---|
19 | systems. |
---|
20 | |
---|
21 | homepage http://www.logwatch.org |
---|
22 | master_sites ftp://ftp.kaybee.org/pub/linux |
---|
23 | platforms darwin |
---|
24 | checksums md5 937d982006b2a76a83edfcfd2e5a9d7d |
---|
25 | |
---|
26 | use_configure no |
---|
27 | build { |
---|
28 | reinplace s|/usr/share/${name}|${prefix}/share/${name}|g ${worksrcpath}/scripts/logwatch.pl |
---|
29 | reinplace s|/var/cache/${name}|${prefix}/var/cache/${name}|g ${worksrcpath}/scripts/logwatch.pl |
---|
30 | reinplace s|/var/cache/${name}|${prefix}/var/cache/${name}|g ${worksrcpath}/conf/logwatch.conf |
---|
31 | reinplace s|messages|system|g ${worksrcpath}/conf/logfiles/messages.conf |
---|
32 | } |
---|
33 | |
---|
34 | destroot.keepdirs ${destroot}${prefix}/var/cache/${name} |
---|
35 | destroot { |
---|
36 | file mkdir ${destroot}${prefix}/etc/${name}/scripts |
---|
37 | file mkdir ${destroot}${prefix}/etc/${name}/conf/logfiles |
---|
38 | file mkdir ${destroot}${prefix}/etc/${name}/conf/services |
---|
39 | file mkdir ${destroot}${prefix}/share/${name}/dist.conf/logfiles |
---|
40 | file mkdir ${destroot}${prefix}/var/cache/${name} |
---|
41 | |
---|
42 | file copy ${worksrcpath}/conf ${destroot}${prefix}/share/${name}/default.conf |
---|
43 | file copy ${worksrcpath}/scripts ${destroot}${prefix}/share/${name}/scripts |
---|
44 | file copy ${worksrcpath}/lib ${destroot}${prefix}/share/${name}/lib |
---|
45 | |
---|
46 | ln -s ../share/${name}/scripts/logwatch.pl ${destroot}${prefix}/bin/logwatch |
---|
47 | |
---|
48 | # startup item |
---|
49 | file mkdir ${destroot}${prefix}/etc/LaunchDaemons/${name} |
---|
50 | file copy files/org.macports.${name}.plist ${destroot}${prefix}/etc/LaunchDaemons/${name}/org.macports.${name}.plist |
---|
51 | reinplace s|@PREFIX@|${prefix}|g ${destroot}${prefix}/etc/LaunchDaemons/${name}/org.macports.${name}.plist |
---|
52 | } |
---|
53 | |
---|
54 | post-destroot { |
---|
55 | file delete /Library/LaunchDaemons/org.macports.${name}.plist |
---|
56 | ln -s ${prefix}/etc/LaunchDaemons/${name}/org.macports.${name}.plist /Library/LaunchDaemons |
---|
57 | ui_msg "###########################################################" |
---|
58 | ui_msg "# A startup item has been generated that will aid in" |
---|
59 | ui_msg "# starting logwatch with launchd. It is disabled" |
---|
60 | ui_msg "# by default. Execute the following command to start it," |
---|
61 | ui_msg "# and to cause it to launch at startup:" |
---|
62 | ui_msg "#" |
---|
63 | ui_msg "# sudo launchctl load -w /Library/LaunchDaemons/org.macports.logwatch.plist" |
---|
64 | ui_msg "###########################################################" |
---|
65 | } |
---|