source: trunk/dports/security/logwatch/Portfile @ 144298

Last change on this file since 144298 was 127817, checked in by khindenburg@…, 5 years ago

logwatch: port abandoned - take maintainership #45276

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.8 KB
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: Portfile 127817 2014-11-04 15:53:44Z khindenburg@macports.org $
3
4PortSystem          1.0
5
6name                logwatch
7version             7.4.1
8revision            2
9distname            logwatch-${version}
10categories          security
11license             MIT
12maintainers         khindenburg openmaintainer
13supported_archs     noarch
14
15description         system log analyzer and reporter
16long_description  \
17                    Logwatch is a customizable log analysis system. Logwatch \
18                    parses through your system's logs for a given period of \
19                    time and creates a report analyzing areas that you \
20                    specify, in as much detail as you require. Logwatch is \
21                    easy to use and will work right out of the package on most \
22                    systems.
23
24homepage            http://logwatch.sourceforge.net
25master_sites        sourceforge:project/logwatch/logwatch-${version}
26
27platforms           darwin
28depends_lib         path:bin/perl:perl5
29
30checksums           rmd160  dd9539b3880b3a9ce2d0772f09e52de238a89405 \
31                    sha256  35ec31f9fe981aaa727b144ab3ff2eb655997d8ccabaf66586458f5dfc3a56eb
32
33patchfiles          scripts_logwatch.pl.diff
34
35use_configure       no
36build {
37    reinplace s|#!/usr/bin/perl|#!${prefix}/bin/perl| ${worksrcpath}/scripts/logwatch.pl
38    reinplace s|/usr/share/${name}|${prefix}/share/${name}|g ${worksrcpath}/scripts/logwatch.pl
39    reinplace s|/var/cache/${name}|${prefix}/var/cache/${name}|g ${worksrcpath}/scripts/logwatch.pl
40    reinplace s|/var/cache/${name}|${prefix}/var/cache/${name}|g ${worksrcpath}/conf/logwatch.conf
41    reinplace s|messages|system|g ${worksrcpath}/conf/logfiles/messages.conf
42}
43
44destroot.keepdirs   ${destroot}${prefix}/var/cache/${name}
45destroot {
46    file mkdir ${destroot}${prefix}/etc/${name}/scripts
47    file mkdir ${destroot}${prefix}/etc/${name}/conf/logfiles
48    file mkdir ${destroot}${prefix}/etc/${name}/conf/services
49    file mkdir ${destroot}${prefix}/share/${name}/dist.conf/logfiles
50    file mkdir ${destroot}${prefix}/var/cache/${name}
51
52    file copy ${worksrcpath}/conf    ${destroot}${prefix}/share/${name}/default.conf
53    file copy ${worksrcpath}/scripts ${destroot}${prefix}/share/${name}/scripts
54    file copy ${worksrcpath}/lib     ${destroot}${prefix}/share/${name}/lib
55
56    # startup item
57    file mkdir ${destroot}${prefix}/etc/LaunchDaemons/${name}
58    file copy ${filespath}/org.macports.${name}.plist ${destroot}${prefix}/etc/LaunchDaemons/${name}/org.macports.${name}.plist
59    reinplace s|@PREFIX@|${prefix}|g ${destroot}${prefix}/etc/LaunchDaemons/${name}/org.macports.${name}.plist
60}
61
62post-destroot {
63    file delete /Library/LaunchDaemons/org.macports.${name}.plist
64    xinstall -d -m 0755 ${destroot}/Library/LaunchDaemons
65    ln -sf ${prefix}/etc/LaunchDaemons/${name}/org.macports.${name}.plist ${destroot}/Library/LaunchDaemons/
66    ln -sf ${prefix}/share/${name}/scripts/logwatch.pl ${destroot}${prefix}/bin/logwatch
67}
68
69pre-activate {
70    #- this port used to create a symlink directly in ${prefix} which was fixed in 7.4.1_1
71    #- we need to remove this symlink from ${prefix} though, so upgrades work
72    #- this can eventually be removed, origionally added 2014-10-01
73    set badfile ${prefix}/bin/${name}
74    if {[file exists ${badfile}] && [registry_file_registered ${badfile}] == "0"} {
75        if {[catch {delete ${badfile}}]} {
76            ui_warn "Cannot delete ${badfile}; please remove it manually"
77        }
78    }
79}
80
81notes "
82A startup item has been generated that will aid in
83starting logwatch with launchd. It is disabled
84by default. Execute the following command to start it,
85and to cause it to launch at startup:
86
87sudo launchctl load -w /Library/LaunchDaemons/org.macports.logwatch.plist
88"
89
90livecheck.regex     ${name}-(\[0-9.\]+)${extract.suffix}
Note: See TracBrowser for help on using the repository browser.