Ticket #18021: Portfile

File Portfile, 2.1 KB (added by lassi.tuura@…, 16 years ago)
Line 
1# $Id$
2
3PortSystem        1.0
4
5name              logwatch
6version           7.3.6
7distname          logwatch-${version}
8categories        security
9maintainers       nomaintainer
10description       system log analyzer and reporter
11long_description  Logwatch is a customizable log analysis system. Logwatch parses through \
12                  your system's logs for a given period of time and creates a report \
13                  analyzing areas that you specify, in as much detail as you require. \
14                  Logwatch is easy to use and will work right out of the package on \
15                  most systems.
16homepage          http://www.logwatch.org
17master_sites      ftp://ftp.kaybee.org/pub/linux
18platforms         darwin
19checksums         md5 937d982006b2a76a83edfcfd2e5a9d7d
20
21configure { }
22build { }
23destroot {
24  reinplace "s|/usr/share/${name}|${prefix}/share/${name}|g" ${worksrcpath}/scripts/logwatch.pl
25  reinplace "s|/var/cache/${name}|${prefix}/var/cache/${name}|g" ${worksrcpath}/scripts/logwatch.pl
26  reinplace "s|/var/cache/${name}|${prefix}/var/cache/${name}|g" ${worksrcpath}/conf/logwatch.conf
27  reinplace "s|messages|system|g" ${worksrcpath}/conf/logfiles/messages.conf
28
29  file mkdir ${destroot}${prefix}/etc/LaunchDaemons/${name}
30  file mkdir ${destroot}${prefix}/etc/${name}/scripts
31  file mkdir ${destroot}${prefix}/etc/${name}/conf/logfiles
32  file mkdir ${destroot}${prefix}/etc/${name}/conf/services
33  file mkdir ${destroot}${prefix}/share/${name}/dist.conf/logfiles
34  file mkdir ${destroot}${prefix}/var/cache/${name}
35  touch ${destroot}${prefix}/var/cache/.turd
36
37  file copy ${worksrcpath}/conf    ${destroot}${prefix}/share/${name}/default.conf
38  file copy ${worksrcpath}/scripts ${destroot}${prefix}/share/${name}/scripts
39  file copy ${worksrcpath}/lib     ${destroot}${prefix}/share/${name}/lib
40
41  file copy ${filespath}/launchd.plist ${destroot}${prefix}/etc/LaunchDaemons/${name}/org.macports.${name}.plist
42
43  system "ln -s ../share/${name}/scripts/logwatch.pl ${destroot}${prefix}/bin/logwatch"
44  system "rm -f /Library/LaunchDaemons/org.macports.${name}.plist"
45  system "ln -s ${prefix}/etc/LaunchDaemons/${name}/org.macports.${name}.plist /Library/LaunchDaemons"
46}
47
48post-destroot {
49}