dcron: update to 4.6; new upstream

This commit is contained in:
Roberto Ricci
2025-10-22 07:19:19 -04:00
committed by Andrew J. Hesford
parent 50fc7854ff
commit 9c3237064a
3 changed files with 112 additions and 45 deletions
+98
View File
@@ -0,0 +1,98 @@
From 13624a38e198221dd5f9396c8f522f85a3797790 Mon Sep 17 00:00:00 2001
From: fkobi <fkobi@pm.me>
Date: Thu, 9 Jan 2025 22:24:56 +0000
Subject: [PATCH 1/4] Makefile: update version
Closes: https://github.com/ptchinster/dcron/issues/4
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 547febc..0b9e746 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
# Makefile for Dillon's crond and crontab
-VERSION = 4.5
+VERSION = 4.6
# these variables can be configured by e.g. `make SCRONTABS=/different/path`
PREFIX = /usr/local
--
2.51.0
From a4310a4fe9aef53f0d8395fef12894d91d536d4a Mon Sep 17 00:00:00 2001
From: ptc <ptchinster@gmail.com>
Date: Tue, 18 Mar 2025 13:50:55 -0600
Subject: [PATCH 2/4] fixed typo in Makefile
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 0b9e746..b6516a9 100644
--- a/Makefile
+++ b/Makefile
@@ -59,7 +59,7 @@ crond: $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o crond
crontab: $(TABOBJS)
- $(CC) $(CLFAGS) $(LDFLAGS) $^ -o crontab
+ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o crontab
%.o: %.c defs.h $(PROTOS)
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(DEFS) $< -o $@
--
2.51.0
From 79e11eba74da3251b3f3c3566267d392cb366ecf Mon Sep 17 00:00:00 2001
From: ptc <ptchinster@gmail.com>
Date: Tue, 18 Mar 2025 13:53:37 -0600
Subject: [PATCH 3/4] fixed clearing out LDFLAGS
---
Makefile | 1 -
1 file changed, 1 deletion(-)
diff --git a/Makefile b/Makefile
index b6516a9..47269da 100644
--- a/Makefile
+++ b/Makefile
@@ -34,7 +34,6 @@ TABSRCS = crontab.c chuser.c
TABOBJS = crontab.o chuser.o
PROTOS = protos.h
LIBS =
-LDFLAGS =
DEFS = -DVERSION='"$(VERSION)"' \
-DSCRONTABS='"$(SCRONTABS)"' -DCRONTABS='"$(CRONTABS)"' \
-DCRONSTAMPS='"$(CRONSTAMPS)"' -DLOG_IDENT='"$(LOG_IDENT)"' \
--
2.51.0
From 5dbcca7a6aa1e7c9dbafc554e4411a178bc4d14c Mon Sep 17 00:00:00 2001
From: Roberto Ricci <io@r-ricci.it>
Date: Wed, 10 Sep 2025 19:13:40 +0200
Subject: [PATCH 4/4] Makefile: obtain PREFIX from environment
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 47269da..f1c59fe 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
VERSION = 4.6
# these variables can be configured by e.g. `make SCRONTABS=/different/path`
-PREFIX = /usr/local
+PREFIX ?= /usr/local
CRONTAB_GROUP = wheel
SCRONTABS = /etc/cron.d
CRONTABS = /var/spool/cron/crontabs
--
2.51.0
@@ -1,23 +0,0 @@
--- a/Makefile 2012-01-23 10:56:26.473607101 +0100
+++ b/Makefile 2012-01-23 10:57:43.806746482 +0100
@@ -32,7 +32,6 @@ TABSRCS = crontab.c chuser.c
TABOBJS = crontab.o chuser.o
PROTOS = protos.h
LIBS =
-LDFLAGS =
DEFS = -DVERSION='"$(VERSION)"' \
-DSCRONTABS='"$(SCRONTABS)"' -DCRONTABS='"$(CRONTABS)"' \
-DCRONSTAMPS='"$(CRONSTAMPS)"' -DLOG_IDENT='"$(LOG_IDENT)"' \
@@ -54,10 +53,10 @@ protos.h: $(SRCS) $(TABSRCS)
fgrep -h Prototype $(SRCS) $(TABSRCS) > protos.h
crond: $(OBJS)
- $(CC) $(LDFLAGS) $^ $(LIBS) -o crond
+ $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o crond
crontab: $(TABOBJS)
- $(CC) $(LDFLAGS) $^ -o crontab
+ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o crontab
%.o: %.c defs.h $(PROTOS)
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(DEFS) $< -o $@
+14 -22
View File
@@ -1,15 +1,19 @@
# Template file for 'dcron'
pkgname=dcron
version=4.5
revision=34
conf_files="/var/spool/cron/root"
version=4.6
revision=1
build_style="gnu-makefile"
make_use_env="yes"
make_build_args="CRONTAB_GROUP=root CRONTABS=/var/spool/cron CRONSTAMPS=/var/spool/cronstamps"
make_install_args="SBINDIR=/usr/bin"
short_desc="Dillon's lightweight cron daemon"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-only"
homepage="https://github.com/dubiousjim/dcron"
changelog="https://raw.githubusercontent.com/dubiousjim/dcron/v${version}/CHANGELOG"
distfiles="https://github.com/dubiousjim/dcron/archive/v${version}.tar.gz"
checksum=7c047194b9339b781971b000bf5512c11e856d20a14fe5323d5a1823f04c2a3f
license="GPL-2.0-or-later"
homepage="https://github.com/ptchinster/dcron"
changelog="https://raw.githubusercontent.com/ptchinster/dcron/refs/heads/master/CHANGELOG.md"
distfiles="https://github.com/ptchinster/dcron/archive/refs/tags/v${version}.tar.gz"
checksum=d1dced1554213225f5ca333ebc5eab96ab80fa30800d9420782d5dfa6e2a15e7
conf_files="/var/spool/cron/root"
provides="cron-daemon-0_1"
alternatives="
@@ -28,21 +32,9 @@ make_dirs="
/etc/cron.monthly 0755 root root
/var/spool/cronstamps 0755 root root"
do_configure() {
sed -i 's,-[og] root,,g' Makefile
}
do_build() {
make CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \
PREFIX=/usr CRONTAB_GROUP=$(whoami) CRONTABS=/var/spool/cron \
CRONSTAMPS=/var/spool/cronstamps ${makejobs}
}
do_install() {
make SBINDIR=/usr/bin DESTDIR=${DESTDIR} install
post_install() {
vbin extra/run-cron
install -Dm600 extra/root.crontab ${DESTDIR}/var/spool/cron/root
vinstall extra/root.crontab 644 /var/spool/cron root
# crontab must be setuid for all users to work!
chmod 4755 ${DESTDIR}/usr/bin/crontab