[24987] trunk/dports/net/nedi

source_changes at macosforge.org source_changes at macosforge.org
Thu May 10 12:20:39 PDT 2007


Revision: 24987
          http://trac.macosforge.org/projects/macports/changeset/24987
Author:   markd at macports.org
Date:     2007-05-10 12:20:39 -0700 (Thu, 10 May 2007)

Log Message:
-----------
More hackage for additional startupitems.

Modified Paths:
--------------
    trunk/dports/net/nedi/Portfile
    trunk/dports/net/nedi/files/org.macports.nedisyslog.plist

Added Paths:
-----------
    trunk/dports/net/nedi/files/nedisyslog.wrapper

Modified: trunk/dports/net/nedi/Portfile
===================================================================
--- trunk/dports/net/nedi/Portfile	2007-05-10 19:13:53 UTC (rev 24986)
+++ trunk/dports/net/nedi/Portfile	2007-05-10 19:20:39 UTC (rev 24987)
@@ -47,6 +47,11 @@
 patch {}
 build {}
 
+post-patch {
+	eval reinplace "s|__PREFIX__|${prefix}|g" \
+		[glob ${filespath}/*]
+}
+
 destroot {
 	set nedidir ${prefix}/share/
 	xinstall -m 755 -d ${destroot}${nedidir}
@@ -96,6 +101,8 @@
 	file mkdir ${destroot}${prefix}/etc/LaunchDaemons/org.macports.nedisyslog/
 	file copy ${filespath}/org.macports.nedisyslog.plist \
 		${destroot}${prefix}/etc/LaunchDaemons/org.macports.nedisyslog/
+	file copy ${filespath}/nedisyslog.wrapper \
+		${destroot}${prefix}/etc/LaunchDaemons/org.macports.nedisyslog/
 	system "cd /Library/LaunchDaemons && ln -sf \
 		${prefix}/etc/LaunchDaemons/org.macports.nedisyslog/org.macports.nedisyslog.plist"
 

Added: trunk/dports/net/nedi/files/nedisyslog.wrapper
===================================================================
--- trunk/dports/net/nedi/files/nedisyslog.wrapper	                        (rev 0)
+++ trunk/dports/net/nedi/files/nedisyslog.wrapper	2007-05-10 19:20:39 UTC (rev 24987)
@@ -0,0 +1,52 @@
+#!/bin/sh
+#
+# MacPorts generated daemondo support script
+#
+
+#
+# Init
+#
+prefix=/opt/local
+
+#
+# Start
+#
+Start()
+{
+        __PREFIX__/share/nedi/syslog.pl
+}
+
+#
+# Stop
+#
+Stop()
+{
+        sh /opt/local/etc/startup/nedi.sh stop
+}
+
+#
+# Restart
+#
+Restart()
+{
+        Stop
+        Start
+}
+
+#
+# Run
+#
+Run()
+{
+case $1 in
+  start  ) Start   ;;
+  stop   ) Stop    ;;
+  restart) Restart ;;
+  *      ) echo "$0: unknown argument: $1";;
+esac
+}
+
+#
+# Run a phase based on the selector
+#
+Run $1

Modified: trunk/dports/net/nedi/files/org.macports.nedisyslog.plist
===================================================================
--- trunk/dports/net/nedi/files/org.macports.nedisyslog.plist	2007-05-10 19:13:53 UTC (rev 24986)
+++ trunk/dports/net/nedi/files/org.macports.nedisyslog.plist	2007-05-10 19:20:39 UTC (rev 24987)
@@ -10,18 +10,18 @@
         <false/>
         <key>ProgramArguments</key>
         <array>
-                <string>/opt/local/bin/daemondo</string>
+                <string>__PREFIX__/bin/daemondo</string>
                 <string>--label=nedisyslog</string>
                 <string>--start-cmd</string>
-                <string>/opt/local/etc/LaunchDaemons/org.macports.nedisyslog/nedisyslog.wrapper</string>
+                <string>__PREFIX__/etc/LaunchDaemons/org.macports.nedisyslog/nedisyslog.wrapper</string>
                 <string>start</string>
                 <string>;</string>
                 <string>--stop-cmd</string>
-                <string>/opt/local/etc/LaunchDaemons/org.macports.nedisyslog/nedisyslog.wrapper</string>
+                <string>__PREFIX__/etc/LaunchDaemons/org.macports.nedisyslog/nedisyslog.wrapper</string>
                 <string>stop</string>
                 <string>;</string>
                 <string>--restart-cmd</string>
-                <string>/opt/local/etc/LaunchDaemons/org.macports.nedisyslog/nedisyslog.wrapper</string>
+                <string>__PREFIX__/etc/LaunchDaemons/org.macports.nedisyslog/nedisyslog.wrapper</string>
                 <string>restart</string>
                 <string>;</string>
                 <string>--pid=none</string>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070510/0a946b54/attachment.html


More information about the macports-changes mailing list