daemon: new package
authorBaruch Siach <baruch@tkos.co.il>
Tue, 2 May 2017 05:07:44 +0000 (08:07 +0300)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 2 May 2017 20:46:08 +0000 (22:46 +0200)
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
DEVELOPERS
package/Config.in
package/daemon/0001-fix-musl.patch [new file with mode: 0644]
package/daemon/Config.in [new file with mode: 0644]
package/daemon/daemon.hash [new file with mode: 0644]
package/daemon/daemon.mk [new file with mode: 0644]

index 019e100e47910cbcc8e879ef6fc118992d6d3a37..82eb819ebecfaac337a5babfc2a52e0b66c2f429 100644 (file)
@@ -140,6 +140,7 @@ F:  package/pulseview/
 F:     package/sigrok-cli/
 
 N:     Baruch Siach <baruch@tkos.co.il>
+F:     package/daemon/
 F:     package/ebtables/
 F:     package/openipmi/
 F:     package/ti-uim/
index e3b6682c17078c5103dcea9793235c5203591c57..aaecd61176064e76627e27017a3f526bcc832e6f 100644 (file)
@@ -1795,6 +1795,7 @@ menu "System tools"
        source "package/circus/Config.in"
        source "package/coreutils/Config.in"
        source "package/cpuload/Config.in"
+       source "package/daemon/Config.in"
        source "package/dc3dd/Config.in"
        source "package/dcron/Config.in"
        source "package/ddrescue/Config.in"
diff --git a/package/daemon/0001-fix-musl.patch b/package/daemon/0001-fix-musl.patch
new file mode 100644 (file)
index 0000000..9454d72
--- /dev/null
@@ -0,0 +1,18 @@
+daemon: fix build with musl
+
+musl requires the ttydefaults.h to be included explicitly for CEOF.
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+---
+
+diff -Nuar daemon-0.6.4-orig/daemon.c daemon-0.6.4/daemon.c
+--- daemon-0.6.4-orig/daemon.c 2010-06-12 16:37:00.000000000 +0300
++++ daemon-0.6.4/daemon.c      2017-05-01 22:02:17.721413468 +0300
+@@ -665,6 +665,7 @@
+ #ifdef _RESTORE_POSIX_SOURCE
+ #define _POSIX_SOURCE
+ #endif
++#include <sys/ttydefaults.h>
+ #include <sys/wait.h>
+ #include <sys/stat.h>
+ #include <sys/select.h>
diff --git a/package/daemon/Config.in b/package/daemon/Config.in
new file mode 100644 (file)
index 0000000..b97f8cf
--- /dev/null
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_DAEMON
+       bool "daemon"
+       depends on BR2_USE_MMU # fork()
+       depends on BR2_TOOLCHAIN_HAS_THREADS
+       help
+         Daemon turns other process into daemons.
+
+         http://www.libslack.org/daemon/
+
+comment "daemon needs a toolchain w/ threads"
+       depends on BR2_USE_MMU
+       depends on !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/daemon/daemon.hash b/package/daemon/daemon.hash
new file mode 100644 (file)
index 0000000..32308ea
--- /dev/null
@@ -0,0 +1,3 @@
+# md5 from http://www.libslack.org/daemon/; sha256 locally calculated
+md5 6cd0a28630a29ac279bc501f39baec66 daemon-0.6.4.tar.gz
+sha256 c4b9ea4aa74d55ea618c34f1e02c080ddf368549037cb239ee60c83191035ca1 daemon-0.6.4.tar.gz
diff --git a/package/daemon/daemon.mk b/package/daemon/daemon.mk
new file mode 100644 (file)
index 0000000..dfa573f
--- /dev/null
@@ -0,0 +1,26 @@
+################################################################################
+#
+# daemon
+#
+################################################################################
+
+DAEMON_VERSION = 0.6.4
+DAEMON_SITE = http://libslack.org/daemon/download
+DAEMON_LICENSE = GPL-2.0+
+DAEMON_LICENSE_FILES = LICENSE
+
+define DAEMON_CONFIGURE_CMDS
+       (cd $(@D); ./config)
+endef
+
+define DAEMON_BUILD_CMDS
+       $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
+endef
+
+define DAEMON_INSTALL_TARGET_CMDS
+       $(TARGET_MAKE_ENV) DEB_BUILD_OPTIONS=nostrip \
+               $(MAKE) PREFIX=$(TARGET_DIR)/usr -C $(@D) \
+               install-daemon-bin
+endef
+
+$(eval $(generic-package))