mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-08 08:30:47 -09:00
package/snooze: new package
Signed-off-by: J. Neuschäfer <j.neuschaefer@gmx.net> [Peter: add to DEVELOPERS, add s-o-b to patch, add TARGET_CFLAGS/LDFLAGS, use /usr PREFIX] Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
committed by
Peter Korsgaard
parent
1155290904
commit
1503580dcd
@@ -1473,6 +1473,7 @@ F: package/s6-networking/
|
||||
F: package/s6-portable-utils/
|
||||
F: package/s6-rc/
|
||||
F: package/skalibs/
|
||||
F: package/snooze/
|
||||
F: package/tipidee/
|
||||
|
||||
N: Jagan Teki <jagan@amarulasolutions.com>
|
||||
|
||||
@@ -2406,6 +2406,7 @@ menu "Miscellaneous"
|
||||
source "package/qpdf/Config.in"
|
||||
source "package/rtl_433/Config.in"
|
||||
source "package/shared-mime-info/Config.in"
|
||||
source "package/snooze/Config.in"
|
||||
source "package/sunwait/Config.in"
|
||||
source "package/taskd/Config.in"
|
||||
source "package/wine/Config.in"
|
||||
|
||||
40
package/snooze/0001-fix-snooze-n-format-string.patch
Normal file
40
package/snooze/0001-fix-snooze-n-format-string.patch
Normal file
@@ -0,0 +1,40 @@
|
||||
From 5f9e616b29fe272fffbb31e4b7ea8ff61f781601 Mon Sep 17 00:00:00 2001
|
||||
From: Leah Neukirchen <leah@vuxu.org>
|
||||
Date: Wed, 29 May 2024 19:42:27 +0200
|
||||
Subject: [PATCH] fix "snooze -n" format string
|
||||
|
||||
Fixes #22.
|
||||
|
||||
Signed-off-by: J. Neuschäfer <j.neuschaefer@gmx.net>
|
||||
|
||||
Upstream: https://github.com/leahneukirchen/snooze/commit/5f9e616b29fe272fffbb31e4b7ea8ff61f781601
|
||||
---
|
||||
snooze.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/snooze.c b/snooze.c
|
||||
index 06f0d07..e47ad11 100644
|
||||
--- a/snooze.c
|
||||
+++ b/snooze.c
|
||||
@@ -329,13 +329,13 @@ main(int argc, char *argv[])
|
||||
char weekstr[4];
|
||||
struct tm *tm = localtime(&t);
|
||||
strftime(weekstr, sizeof weekstr, "%a", tm);
|
||||
- printf("%s %s %2ldd%3ldh%3ldm%3lds ",
|
||||
+ printf("%s %s %2dd%3dh%3dm%3ds ",
|
||||
isotime(tm),
|
||||
weekstr,
|
||||
- ((t - now) / (60*60*24)),
|
||||
- ((t - now) / (60*60)) % 24,
|
||||
- ((t - now) / 60) % 60,
|
||||
- (t - now) % 60);
|
||||
+ ((int)(t - now) / (60*60*24)),
|
||||
+ ((int)(t - now) / (60*60)) % 24,
|
||||
+ ((int)(t - now) / 60) % 60,
|
||||
+ (int)(t - now) % 60);
|
||||
if(jitter) {
|
||||
printf("(plus up to %ds for jitter)\n", jitter);
|
||||
} else {
|
||||
--
|
||||
2.43.0
|
||||
|
||||
8
package/snooze/Config.in
Normal file
8
package/snooze/Config.in
Normal file
@@ -0,0 +1,8 @@
|
||||
config BR2_PACKAGE_SNOOZE
|
||||
bool "snooze"
|
||||
help
|
||||
snooze is a tool for waiting until a particular time and then
|
||||
running a command. Together with a service supervision system
|
||||
such as runit, this can be used to replace cron(8).
|
||||
|
||||
https://github.com/leahneukirchen/snooze
|
||||
3
package/snooze/snooze.hash
Normal file
3
package/snooze/snooze.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally computed:
|
||||
sha256 d63fde85d9333188bed5996baabd833eaa00842ce117443ffbf8719c094be414 snooze-0.5.tar.gz
|
||||
sha256 2cea433f84afcfd9d55515908d3ea69ed1df00ffbf90cc48cd68d72a2b464544 README.md
|
||||
28
package/snooze/snooze.mk
Normal file
28
package/snooze/snooze.mk
Normal file
@@ -0,0 +1,28 @@
|
||||
################################################################################
|
||||
#
|
||||
# snooze
|
||||
#
|
||||
################################################################################
|
||||
|
||||
SNOOZE_VERSION = 0.5
|
||||
SNOOZE_SITE = $(call github,leahneukirchen,snooze,v$(SNOOZE_VERSION))
|
||||
SNOOZE_LICENSE = CC0-1.0
|
||||
|
||||
# Unfortunately, snooze doesn't have a dedicated file for the license, but it
|
||||
# is mentioned in the README and in the manpage.
|
||||
SNOOZE_LICENSE_FILES = README.md
|
||||
|
||||
SNOOZE_MAKE_OPTS = \
|
||||
PREFIX=/usr \
|
||||
CC=$(TARGET_CC) \
|
||||
CFLAGS="$(TARGET_CFLAGS) $(TARGET_LDFLAGS)"
|
||||
|
||||
define SNOOZE_BUILD_CMDS
|
||||
$(MAKE) -C $(@D)/ $(SNOOZE_MAKE_OPTS)
|
||||
endef
|
||||
|
||||
define SNOOZE_INSTALL_TARGET_CMDS
|
||||
$(MAKE) -C $(@D)/ $(SNOOZE_MAKE_OPTS) DESTDIR=$(TARGET_DIR) install
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
Reference in New Issue
Block a user