summaryrefslogtreecommitdiff
path: root/repo/libdaemon
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2023-02-02 14:10:02 +0000
committerdavidovski <david@davidovski.xyz>2023-02-02 14:10:02 +0000
commitf29d569cd33a73da5ad675f43a34ad53c5cc9bc6 (patch)
tree76fe6267f8307e7630fc6f53ff99a9767ad40de0 /repo/libdaemon
parent05d004dfe0c9a9d898fac8a4a0292ca2a74ca391 (diff)
Work
Diffstat (limited to 'repo/libdaemon')
-rw-r--r--repo/libdaemon/fix-includes.patch13
-rw-r--r--repo/libdaemon/libdaemon.xibuild30
2 files changed, 43 insertions, 0 deletions
diff --git a/repo/libdaemon/fix-includes.patch b/repo/libdaemon/fix-includes.patch
new file mode 100644
index 0000000..51c5133
--- /dev/null
+++ b/repo/libdaemon/fix-includes.patch
@@ -0,0 +1,13 @@
+--- libdaemon-0.14.orig/examples/testd.c
++++ libdaemon-0.14/examples/testd.c
+@@ -21,9 +21,9 @@
+ #include <signal.h>
+ #include <errno.h>
+ #include <string.h>
++#include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/time.h>
+-#include <sys/unistd.h>
+ #include <sys/select.h>
+
+ #include <libdaemon/dfork.h>
diff --git a/repo/libdaemon/libdaemon.xibuild b/repo/libdaemon/libdaemon.xibuild
new file mode 100644
index 0000000..1a2b731
--- /dev/null
+++ b/repo/libdaemon/libdaemon.xibuild
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+NAME="libdaemon"
+DESC="A lightweight C library which eases the writing of UNIX daemons"
+
+MAKEDEPS=""
+
+PKG_VER=0.14
+SOURCE="https://dev.alpinelinux.org/archive/libdaemon/libdaemon-$PKG_VER.tar.gz"
+
+ADDITIONAL="
+fix-includes.patch
+"
+
+prepare() {
+ apply_patches
+}
+
+build() {
+ ./configure \
+ --prefix=/usr \
+ --localstatedir=/var \
+ --disable-lynx
+ make
+}
+
+package() {
+ make DESTDIR="$PKG_DEST" install
+}
+