source: trunk/dports/sysutils/sleepwatcher/Portfile @ 26023

Last change on this file since 26023 was 26023, checked in by ryandesign@…, 12 years ago

sleepwatcher: add livecheck

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1# $Id: Portfile 26023 2007-06-09 08:44:53Z ryandesign@macports.org $
2
3PortSystem              1.0
4PortGroup               xcode 1.0
5
6name                    sleepwatcher
7version                 2.0.4
8revision                2
9categories              sysutils
10maintainers             ryandesign
11homepage                http://www.bernhard-baehr.de/
12master_sites            ${homepage}
13distname                ${name}_${version}_src
14extract.suffix          .tgz
15xcode.destroot.path     ${prefix}/sbin
16
17description \
18        monitors sleep, wakeup and idleness of a Mac
19
20long_description \
21        SleepWatcher monitors sleep, wakeup and idleness of a Mac. It can be \
22        used to execute a Unix command when the Mac or the display of the Mac \
23        goes to sleep mode or wakes up or after a given time without user \
24        interaction. It also can send the Mac to sleep mode or retrieve the \
25        time since last user activity.
26
27checksums \
28        md5 03756e4f5c61d384ed0c1b05144d0c32 \
29        sha1 ec088be2bb727432109751b828df5d50369bca3e \
30        rmd160 c345ba739caaa94b093da4c27a20445c16b29bfb
31
32post-extract {
33        reinplace "s|/usr/|${prefix}/|" ${worksrcpath}/sleepwatcher.xcodeproj/project.pbxproj
34}
35
36variant server {
37        startupitem.create  yes
38        startupitem.start   "${prefix}/sbin/sleepwatcher --verbose --daemon --pidfile ${prefix}/var/run/${name}.pid --sleep ${prefix}/etc/rc.sleep --wakeup ${prefix}/etc/rc.wakeup"
39        startupitem.stop    "kill `cat ${prefix}/var/run/${name}.pid`"
40       
41        post-destroot {
42                xinstall -m 755 -d ${prefix}/etc
43                xinstall -m 755 "${worksrcpath}/SleepWatcher StartupItem.package/packagemaker.files/private/etc/rc.sleep" ${destroot}${prefix}/etc
44                xinstall -m 755 "${worksrcpath}/SleepWatcher StartupItem.package/packagemaker.files/private/etc/rc.wakeup" ${destroot}${prefix}/etc
45        }
46       
47        post-install {
48                ui_msg "###########################################################"
49                ui_msg "# Now each user can create scripts called .sleep and"
50                ui_msg "# .wakeup in their home directories, and the ${name}"
51                ui_msg "# daemon will run them at the appropriate times."
52                ui_msg "###########################################################"
53        }
54}
55
56# SleepWatcher always builds universal, so let's advertise that.
57default_variants +universal
58variant universal {}
59
60livecheck.check     regex
61livecheck.regex     ${name}_(\[0-9\.\]+)\.dmg
Note: See TracBrowser for help on using the repository browser.