source: trunk/dports/sysutils/sleepwatcher/Portfile

Last change on this file was 83226, checked in by ryandesign@…, 6 years ago

sleepwatcher: update to 2.2

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.6 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 83226 2011-08-29 04:50:53Z ryandesign@macports.org $
3
4PortSystem              1.0
5PortGroup               xcode 1.0
6
7name                    sleepwatcher
8version                 2.2
9categories              sysutils
10maintainers             ryandesign
11license                 GPL-3+
12homepage                http://www.bernhard-baehr.de/
13master_sites            ${homepage}
14distname                ${name}_${version}
15extract.suffix          .tgz
16xcode.destroot.path     ${prefix}/sbin
17
18description             monitors sleep, wakeup and idleness of a Mac
19
20long_description        SleepWatcher monitors sleep, wakeup and idleness of \
21                        a Mac. It can be used to execute a Unix command \
22                        when the Mac or the display of the Mac goes to sleep \
23                        mode or wakes up or after a given time without user \
24                        interaction. It also can send the Mac to sleep mode \
25                        or retrieve the time since last user activity.
26
27checksums               rmd160  4e1ff469e59ae992ee297cb16a96a74e9993d4bb \
28                        sha256  c04ac1c49e2b5785ed5d5c375854c9c0b9e959affa46adab57985e4123e8b6be
29
30pre-fetch {
31    if {${os.major} < 9} {
32        ui_error "${name} ${version} requires Mac OS X 10.5 or greater."
33        return -code error "incompatible Mac OS X version"
34    }
35}
36
37build.dir               ${worksrcpath}/sources
38
39post-patch {
40    reinplace "s|/usr/local/|${prefix}/|" ${build.dir}/sleepwatcher.xcodeproj/project.pbxproj
41}
42
43post-destroot {
44    xinstall -m 755 -W ${worksrcpath}/config rc.sleep rc.wakeup ${destroot}${prefix}/etc
45    set docdir ${destroot}${prefix}/share/doc/${name}
46    xinstall -d ${docdir}
47    xinstall -m 644 -W ${worksrcpath} ReadMe.rtf ${docdir}
48}
49
50startupitem.create      yes
51startupitem.executable  ${prefix}/sbin/sleepwatcher \
52                        --verbose \
53                        --sleep ${prefix}/etc/rc.sleep \
54                        --wakeup ${prefix}/etc/rc.wakeup
55
56livecheck.type          regex
57livecheck.regex         (?i)>${name} (\[0-9.\]+)<
58
59notes "\
60The included system-wide launchd plist starts a ${name} daemon which calls\
61the scripts \".sleep\" and \".wakeup\" in your home directory when the\
62computer goes to sleep and wakes up, respectively.\
63For more control, and to be able to respond to display sleep, idle, and\
64power manager events, ignore the system-wide launchd plist and write your\
65own user-specific plist.\
66Consult the manpage for the full range of possibilities.\
67"
Note: See TracBrowser for help on using the repository browser.