Changeset 70929


Ignore:
Timestamp:
Aug 26, 2010, 9:36:46 PM (7 years ago)
Author:
ryandesign@…
Message:

sleepwatcher:

  • update to 2.1, which requires Mac OS X 10.5 or higher
  • remove server variant; always install launchd plist
  • use startupitem.executable instead of startupitem.start and startupitem.stop
  • universal variant is no longer mandatory
  • add license keyword
  • use notes

See #26236

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/sysutils/sleepwatcher/Portfile

    r70906 r70929  
    55
    66name                    sleepwatcher
    7 version                 2.0.5
     7version                 2.1
    88categories              sysutils
    99maintainers             ryandesign
     10license                 GPL
    1011homepage                http://www.bernhard-baehr.de/
    1112master_sites            ${homepage}
    12 distname                ${name}_${version}_src
     13distname                ${name}_${version}
    1314extract.suffix          .tgz
    1415xcode.destroot.path     ${prefix}/sbin
     
    2425    time since last user activity.
    2526
    26 checksums \
    27     md5 886fd37f9ae2941e99eb507b312ba236 \
    28     sha1 4c1ca64d94768e0ccffb085d65632b4e37330882 \
    29     rmd160 f2b3a362b71a3b31e3c3774122fb282327e5151e
     27checksums               md5     d4ace64e2e978f4f289ca4dddd21c6f2 \
     28                        sha1    54d09ed7a25abd2f2a398bf7f17b0ddc70f1b1d9 \
     29                        rmd160  3bd630072825b5cac54e5a28f9d519827b67bdc4
    3030
    31 post-extract {
    32     reinplace "s|/usr/|${prefix}/|" ${worksrcpath}/sleepwatcher.xcodeproj/project.pbxproj
    33     reinplace "s|man/man1|man/man8|" ${worksrcpath}/sleepwatcher.xcodeproj/project.pbxproj
    34 }
    35 
    36 variant 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 "###########################################################"
     31pre-fetch {
     32    if {${os.major} < 9} {
     33        ui_error "${name} ${version} requires Mac OS X 10.5 or greater."
     34        return -code error "incompatible Mac OS X version"
    5335    }
    5436}
    5537
    56 default_variants +universal
    57 variant universal {}
    58 pre-fetch {
    59     if {![variant_isset universal]} {
    60         return -code error "${name} is only available in a universal version"
    61     }
     38build.dir               ${worksrcpath}/sources
     39
     40post-patch {
     41    reinplace "s|/usr/local/|${prefix}/|" ${build.dir}/sleepwatcher.xcodeproj/project.pbxproj
    6242}
     43
     44post-destroot {
     45    xinstall -m 755 -W ${worksrcpath}/config rc.sleep rc.wakeup ${destroot}${prefix}/etc
     46}
     47
     48startupitem.create      yes
     49startupitem.executable  ${prefix}/sbin/sleepwatcher \
     50                        --verbose \
     51                        --sleep ${prefix}/etc/rc.sleep \
     52                        --wakeup ${prefix}/etc/rc.wakeup
    6353
    6454livecheck.type          regex
    6555livecheck.regex         (?i)>${name} (\[0-9.\]+)<
     56
     57notes "\
     58The included system-wide launchd plist starts a ${name} daemon which calls\
     59the scripts \".sleep\" and \".wakeup\" in your home directory when the\
     60computer goes to sleep and wakes up, respectively.\
     61For more control, and to be able to respond to display sleep, idle, and\
     62power manager events, ignore the system-wide launchd plist and write your\
     63own user-specific plist.\
     64Consult the manpage for the full range of possibilities.\
     65"
Note: See TracChangeset for help on using the changeset viewer.