summaryrefslogtreecommitdiff
path: root/opt/dcron/MAKEPKG
diff options
context:
space:
mode:
authorrawnix ports <ports@rawnix.org>2026-09-26 18:19:05 +0000
committerrawnix ports <ports@rawnix.org>2026-09-26 18:19:05 +0000
commitc82e88dd00d1b0b7fcfb4e5628d99611388cef6f (patch)
tree56d864b5a5c6c145edd96178ae219a8f90e191a6 /opt/dcron/MAKEPKG
downloadports-c82e88dd00d1b0b7fcfb4e5628d99611388cef6f.tar.gz
sync 2026-09-26 18:19 UTC
1672 files changed, 151396 insertions(+)
Diffstat (limited to 'opt/dcron/MAKEPKG')
-rw-r--r--opt/dcron/MAKEPKG82
1 files changed, 82 insertions, 0 deletions
diff --git a/opt/dcron/MAKEPKG b/opt/dcron/MAKEPKG
new file mode 100644
index 0000000..60109c8
--- /dev/null
+++ b/opt/dcron/MAKEPKG
@@ -0,0 +1,82 @@
+#!/bin/mkpkg
+# description: Dillon's lightweight cron daemon
+# url: https://github.com/ptchinster/dcron
+
+name=dcron
+version=4.6
+release=1
+groups=(cron:user:cron:/var/spool/cron:755)
+services=(crond)
+permissions=(
+ /usr/sbin/crond:root:root:700
+ /usr/bin/crontab:root:cron:4750
+ /var/spool/cron/crontabs:root:root:755
+ /var/spool/cron/cronstamps:root:root:755
+)
+source=(https://github.com/ptchinster/dcron/archive/refs/tags/v$version.tar.gz)
+
+sha256sums=(
+ "d1dced1554213225f5ca333ebc5eab96ab80fa30800d9420782d5dfa6e2a15e7"
+)
+
+build() {
+ cd $name-$version
+
+ make CC=clang \
+ PREFIX=/usr \
+ MANDIR=/usr/share/man \
+ CRONTAB_GROUP=cron \
+ LOG_IDENT=crond
+
+ make install \
+ DESTDIR=$PKG \
+ PREFIX=/usr \
+ MANDIR=/usr/share/man \
+ CRONTAB_GROUP=cron
+
+ # Per-user crontabs and timestamps
+ install -d -m 755 $PKG/var/spool/cron/crontabs
+ install -d -m 755 $PKG/var/spool/cron/cronstamps
+
+ # System crontabs directory (drop files here for system-wide jobs)
+ install -d -m 755 $PKG/etc/cron.d
+
+ # Periodic-run directories (run-cron compatible)
+ install -d -m 755 $PKG/etc/cron.hourly
+ install -d -m 755 $PKG/etc/cron.daily
+ install -d -m 755 $PKG/etc/cron.weekly
+ install -d -m 755 $PKG/etc/cron.monthly
+}
+
+post_build() {
+ # runit service - crond runs as root because it exec()s user
+ # crontabs as those users (drops privs per-job, not at startup).
+ install -d $PKG/etc/sv/crond/log
+
+ printf '%s\n' \
+ '#!/bin/sh' \
+ 'exec 2>&1' \
+ '' \
+ '# -f keeps crond in foreground for runit' \
+ '# -L /dev/stderr sends log lines to stderr, captured by svlogd' \
+ '# -l NOTICE keeps log volume sensible (default)' \
+ 'exec /usr/sbin/crond -f -L /dev/stderr -l NOTICE' \
+ > $PKG/etc/sv/crond/run
+
+ printf '%s\n' \
+ '#!/bin/sh' \
+ 'mkdir -p /var/log/crond' \
+ 'exec svlogd -tt /var/log/crond' \
+ > $PKG/etc/sv/crond/log/run
+
+ chmod 755 $PKG/etc/sv/crond/run
+ chmod 755 $PKG/etc/sv/crond/log/run
+}
+
+signify() {
+ untrusted comment: public key
+ RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3
+}
+
+# vim: filetype=sh
+