[23860] trunk/dports/sysutils/sleepwatcher/Portfile

source_changes at macosforge.org source_changes at macosforge.org
Wed Apr 11 06:37:45 PDT 2007


Revision: 23860
          http://trac.macosforge.org/projects/macports/changeset/23860
Author:   ryandesign at macports.org
Date:     2007-04-11 06:37:45 -0700 (Wed, 11 Apr 2007)

Log Message:
-----------
Add +server variant, which is the whole point after all.

Modified Paths:
--------------
    trunk/dports/sysutils/sleepwatcher/Portfile

Modified: trunk/dports/sysutils/sleepwatcher/Portfile
===================================================================
--- trunk/dports/sysutils/sleepwatcher/Portfile	2007-04-11 10:06:42 UTC (rev 23859)
+++ trunk/dports/sysutils/sleepwatcher/Portfile	2007-04-11 13:37:45 UTC (rev 23860)
@@ -5,7 +5,7 @@
 
 name                    sleepwatcher
 version                 2.0.4
-revision                1
+revision                2
 categories              sysutils
 maintainers             ryandesign at macports.org
 homepage                http://www.bernhard-baehr.de/
@@ -33,6 +33,26 @@
 	reinplace "s|/usr/|${prefix}/|" ${worksrcpath}/sleepwatcher.xcodeproj/project.pbxproj
 }
 
+variant server {
+	startupitem.create  yes
+	startupitem.start   "${prefix}/sbin/sleepwatcher --verbose --daemon --pidfile ${prefix}/var/run/${name}.pid --sleep ${prefix}/etc/rc.sleep --wakeup ${prefix}/etc/rc.wakeup"
+	startupitem.stop    "kill `cat ${prefix}/var/run/${name}.pid`"
+	
+	post-destroot {
+		xinstall -m 755 -d ${prefix}/etc
+		xinstall -m 755 "${worksrcpath}/SleepWatcher StartupItem.package/packagemaker.files/private/etc/rc.sleep" ${destroot}${prefix}/etc
+		xinstall -m 755 "${worksrcpath}/SleepWatcher StartupItem.package/packagemaker.files/private/etc/rc.wakeup" ${destroot}${prefix}/etc
+	}
+	
+	post-install {
+		ui_msg "###########################################################"
+		ui_msg "# Now each user can create scripts called .sleep and"
+		ui_msg "# .wakeup in their home directories, and the ${name}"
+		ui_msg "# daemon will run them at the appropriate times."
+		ui_msg "###########################################################"
+	}
+}
+
 # SleepWatcher always builds universal, so let's advertise that.
 default_variants +universal
 variant universal {}

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


More information about the macports-changes mailing list