summaryrefslogtreecommitdiff
path: root/repo/musl-nscd
diff options
context:
space:
mode:
Diffstat (limited to 'repo/musl-nscd')
-rw-r--r--repo/musl-nscd/musl-nscd.initd10
-rw-r--r--repo/musl-nscd/musl-nscd.pre-install6
-rw-r--r--repo/musl-nscd/musl-nscd.xibuild32
3 files changed, 48 insertions, 0 deletions
diff --git a/repo/musl-nscd/musl-nscd.initd b/repo/musl-nscd/musl-nscd.initd
new file mode 100644
index 0000000..d13e233
--- /dev/null
+++ b/repo/musl-nscd/musl-nscd.initd
@@ -0,0 +1,10 @@
+#!/sbin/openrc-run
+
+name="$SVCNAME"
+command="/usr/sbin/nscd"
+command_args="$NSCD_OPTS -d -p /var/run/$SVCNAME.pid"
+pidfile="/var/run/$SVCNAME.pid"
+
+start_pre() {
+ mkdir -p /var/run/nscd
+}
diff --git a/repo/musl-nscd/musl-nscd.pre-install b/repo/musl-nscd/musl-nscd.pre-install
new file mode 100644
index 0000000..45e214e
--- /dev/null
+++ b/repo/musl-nscd/musl-nscd.pre-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+addgroup -S nscd 2>/dev/null
+adduser -S -D -H -s /bin/false -G nscd -g nscd nscd 2>/dev/null
+
+exit 0
diff --git a/repo/musl-nscd/musl-nscd.xibuild b/repo/musl-nscd/musl-nscd.xibuild
new file mode 100644
index 0000000..0ad276b
--- /dev/null
+++ b/repo/musl-nscd/musl-nscd.xibuild
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+NAME="musl-nscd"
+DESC="Implementation of nscd for nsswitch modules for musl"
+
+MAKEDEPS="bison flex"
+
+PKG_VER=1.1.1
+SOURCE="https://github.com/pikhq/musl-nscd/archive/v$PKG_VER.tar.gz"
+
+ADDITIONAL="
+musl-nscd.initd
+"
+
+build() {
+ ./configure \
+ --prefix=/usr \ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var
+ make
+}
+
+package() {
+ make DESTDIR="$PKG_DEST" install
+
+ install -m644 -D COPYRIGHT \
+ "$PKG_DEST"/usr/share/licenses/musl-nscd/COPYRIGHT
+
+ install -m755 -D "$BUILD_ROOT"/musl-nscd.initd \
+ "$PKG_DEST"/etc/init.d/nscd
+}
+