# -*- 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
checksums rmd160 d42350573650e6424d1ce9e2ad0c139f346c451e \
sha256 4bf1656702167871141fbc119a844d1363d89994e1a67027f0e773023ae9643e \
maintainers {ryandesign @ryandesign} openmaintainer
homepage https://www.bernhard-baehr.de
distname ${name}_${version}
description monitors sleep, wakeup and idleness of a Mac
long_description SleepWatcher monitors sleep, wakeup and idleness of \
a Mac. It can be used to execute a Unix command \
when the Mac or the display of the Mac goes to sleep \
mode or wakes up or after a given time without user \
interaction. It also can send the Mac to sleep mode \
or retrieve the time since last user activity.
ui_error "${name} ${version} requires Mac OS X 10.5 or greater."
return -code error "incompatible Mac OS X version"
patchfiles Makefile.patch
build.dir ${worksrcpath}/sources
build.args CC=${configure.cc} \
CFLAGS="${configure.cflags} [get_canonical_archflags cc]"
destroot.args BINDIR=${destroot}${prefix}/sbin \
MANDIR=${destroot}${prefix}/share/man
xinstall -m 0755 -W ${worksrcpath}/config rc.sleep rc.wakeup ${destroot}${prefix}/etc
set docdir ${destroot}${prefix}/share/doc/${name}
xinstall -m 0644 -W ${worksrcpath} ReadMe.rtf ${docdir}
startupitem.executable ${prefix}/sbin/sleepwatcher \
--sleep ${prefix}/etc/rc.sleep \
--wakeup ${prefix}/etc/rc.wakeup