head 1.1; access; symbols pkgsrc-2026Q1:1.1.0.34 pkgsrc-2026Q1-base:1.1 pkgsrc-2025Q4:1.1.0.32 pkgsrc-2025Q4-base:1.1 pkgsrc-2025Q3:1.1.0.30 pkgsrc-2025Q3-base:1.1 pkgsrc-2025Q2:1.1.0.28 pkgsrc-2025Q2-base:1.1 pkgsrc-2025Q1:1.1.0.26 pkgsrc-2025Q1-base:1.1 pkgsrc-2024Q4:1.1.0.24 pkgsrc-2024Q4-base:1.1 pkgsrc-2024Q3:1.1.0.22 pkgsrc-2024Q3-base:1.1 pkgsrc-2024Q2:1.1.0.20 pkgsrc-2024Q2-base:1.1 pkgsrc-2024Q1:1.1.0.18 pkgsrc-2024Q1-base:1.1 pkgsrc-2023Q4:1.1.0.16 pkgsrc-2023Q4-base:1.1 pkgsrc-2023Q3:1.1.0.14 pkgsrc-2023Q3-base:1.1 pkgsrc-2023Q2:1.1.0.12 pkgsrc-2023Q2-base:1.1 pkgsrc-2023Q1:1.1.0.10 pkgsrc-2023Q1-base:1.1 pkgsrc-2022Q4:1.1.0.8 pkgsrc-2022Q4-base:1.1 pkgsrc-2022Q3:1.1.0.6 pkgsrc-2022Q3-base:1.1 pkgsrc-2022Q2:1.1.0.4 pkgsrc-2022Q2-base:1.1 pkgsrc-2022Q1:1.1.0.2 pkgsrc-2022Q1-base:1.1; locks; strict; comment @# @; 1.1 date 2022.01.05.10.56.00; author schmonz; state Exp; branches; next ; commitid ggCItHeunZTFZqnD; desc @@ 1.1 log @Add sleepwatcher, a daemon that runs a Unix command on various macOS sleep or wake events. SleepWatcher is a daemon for macOS that 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, after a given time without user interaction or when the user resumes activity after a break or when the power supply of a Mac notebook is attached or detached. It also can send the Mac to sleep mode or retrieve the time since last user activity. @ text @$NetBSD$ Build for the host architecture only. Support DESTDIR and PREFIX. --- sources/Makefile.orig 2018-12-26 09:31:52.000000000 +0000 +++ sources/Makefile @@@@ -18,14 +18,11 @@@@ CFLAGS_I386= -O3 -prebind -mmacosx-versi CFLAGS_X86_64= -O3 -prebind -mmacosx-version-min=10.4 -arch x86_64 LIBS= -framework IOKit -framework CoreFoundation -BINDIR=/usr/local/sbin -MANDIR=/usr/local/man +BINDIR=$(PREFIX)/sbin +MANDIR=$(PREFIX)/$(PKGMANDIR) sleepwatcher: sleepwatcher.c - $(CC) $(CFLAGS_I386) -o sleepwatcher.i386 sleepwatcher.c $(LIBS) - $(CC) $(CFLAGS_X86_64) -o sleepwatcher.x86_64 sleepwatcher.c $(LIBS) - lipo -create sleepwatcher.i386 sleepwatcher.x86_64 -output sleepwatcher - rm sleepwatcher.i386 sleepwatcher.x86_64 + $(CC) $(CFLAGS) -o sleepwatcher sleepwatcher.c $(LIBS) fat: sleepwatcher sleepwatcher.ppc lipo -create sleepwatcher sleepwatcher.ppc -output sleepwatcher.fat @@@@ -36,10 +33,10 @@@@ sleepwatcher.ppc: sleepwatcher.c $(CC) $(CFLAGS_PPC) -o sleepwatcher.ppc sleepwatcher.c $(LIBS) install: sleepwatcher sleepwatcher.8 - mkdir -p $(BINDIR) - install -o root -g wheel -m 755 sleepwatcher $(BINDIR) - mkdir -p $(MANDIR)/man8 - install -o root -g wheel -m 644 sleepwatcher.8 $(MANDIR)/man8 + mkdir -p $(DESTDIR)$(BINDIR) + $(BSD_INSTALL_PROGRAM) sleepwatcher $(DESTDIR)$(BINDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man8 + $(BSD_INSTALL_MAN) sleepwatcher.8 $(DESTDIR)$(MANDIR)/man8 clean: rm -f sleepwatcher @