On Feb 9, 2009, at 09:30, [email protected] wrote:
Revision: 46644
http://trac.macports.org/changeset/46644
Author: [email protected]
Date: 2009-02-09 07:30:24 -0800 (Mon, 09 Feb 2009)
Log Message:
-----------
create logwatch, ticket #18021
Added Paths:
-----------
trunk/dports/security/logwatch/
trunk/dports/security/logwatch/Portfile
trunk/dports/security/logwatch/files/
trunk/dports/security/logwatch/files/org.macports.logwatch.plist
Added: trunk/dports/security/logwatch/Portfile
===================================================================
--- trunk/dports/security/logwatch/Portfile
(rev 0)
+++ trunk/dports/security/logwatch/Portfile 2009-02-09 15:30:24 UTC
(rev 46644)
@@ -0,0 +1,64 @@
+# -*- 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
+# $Id$
+
+PortSystem 1.0
+
+name logwatch
+version 7.3.6
+distname logwatch-${version}
The distname line can be removed because that is already the default.
+categories security
+maintainers [email protected]
+description system log analyzer and reporter
+long_description \
+ Logwatch is a customizable log analysis
system. Logwatch \
+ parses through your system's logs for a given
period of \
+ time and creates a report analyzing areas that
you \
+ specify, in as much detail as you require.
Logwatch is \
+ easy to use and will work right out of the
package on most \
+ systems.
+
+homepage http://www.logwatch.org
+master_sites ftp://ftp.kaybee.org/pub/linux
Is there an http master site that could be added? Some users,
including our own distfiles mirror, cannot fetch from ftp sites.
+platforms darwin
+checksums md5 937d982006b2a76a83edfcfd2e5a9d7d
+
+use_configure no
+build { }
+destroot {
+
+ reinplace s|/usr/share/${name}|${prefix}/share/${name}|g $
{worksrcpath}/scripts/logwatch.pl
+ reinplace s|/var/cache/${name}|${prefix}/var/cache/${name}|g $
{worksrcpath}/scripts/logwatch.pl
+ reinplace s|/var/cache/${name}|${prefix}/var/cache/${name}|g $
{worksrcpath}/conf/logwatch.conf
+ reinplace s|messages|system|g ${worksrcpath}/conf/logfiles/
messages.conf
I suppose technically this reinplace business might be more
appropriate in the otherwise-empty build phase.
+ file mkdir ${destroot}${prefix}/etc/${name}/scripts
+ file mkdir ${destroot}${prefix}/etc/${name}/conf/logfiles
+ file mkdir ${destroot}${prefix}/etc/${name}/conf/services
+ file mkdir ${destroot}${prefix}/share/${name}/dist.conf/logfiles
+ file mkdir ${destroot}${prefix}/var/cache/${name}
+ touch ${destroot}${prefix}/var/cache/.turd
destroot.keepdirs should be used for this instead of calling touch.
+ file copy ${worksrcpath}/conf ${destroot}${prefix}/share/$
{name}/default.conf
+ file copy ${worksrcpath}/scripts ${destroot}${prefix}/share/$
{name}/scripts
+ file copy ${worksrcpath}/lib ${destroot}${prefix}/share/$
{name}/lib
+
+ ln -s ../share/${name}/scripts/logwatch.pl ${destroot}$
{prefix}/bin/logwatch
+
+ # startup item
+ file delete /Library/LaunchDaemons/org.macports.${name}.plist
Why is the port removing a file that's outside of the destroot?
+ file mkdir ${destroot}${prefix}/etc/LaunchDaemons/${name}
+ file copy files/org.macports.${name}.plist ${destroot}$
{prefix}/etc/LaunchDaemons/${name}/org.macports.${name}.plist
+ reinplace s|@PREFIX@|${prefix}|g ${destroot}${prefix}/etc/
LaunchDaemons/${name}/org.macports.${name}.plist
+}
+
+post-destroot {
+ ln -s ${prefix}/etc/LaunchDaemons/${name}/org.macports.$
{name}.plist /Library/LaunchDaemons
More importantly, why is the port creating a file that's outside of
the destroot?
+ ui_msg
"###########################################################"
+ ui_msg "# A startup item has been generated that will aid in"
+ ui_msg "# starting dnsmasq with launcd. It is disabled"
+ ui_msg "# by default. Execute the following command to start it,"
+ ui_msg "# and to cause it to launch at startup:"
+ ui_msg "#"
+ ui_msg "# sudo launchctl load -w /Library/LaunchDaemons/
org.macports.dnsmasq.plist"
+ ui_msg
"###########################################################"
+}
_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev