Ticket #18021: Portfile.4

File Portfile.4, 3.0 KB (added by nerdling (Jeremy Lavergne), 15 years ago)

added ui_msg to inform user of launchd startup script

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