aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorMichael Aldridge <aldridge.mac@gmail.com>2019-11-08 21:15:51 -0800
committerLeo <thinkabit.ukim@gmail.com>2019-11-10 05:43:05 -0300
commitafa07e42e00e1bf4ad4f1a2a3e8c6c2ea72f456c (patch)
tree616a951dcacab6c0b56875fd530e0fb9518ae7fd /testing
parent9fcc748e66782e79571331fc7c349030fa43781d (diff)
downloadaports-afa07e42e00e1bf4ad4f1a2a3e8c6c2ea72f456c.tar.bz2
aports-afa07e42e00e1bf4ad4f1a2a3e8c6c2ea72f456c.tar.xz
testing/nscd: new aport
Diffstat (limited to 'testing')
-rw-r--r--testing/nscd/APKBUILD46
-rw-r--r--testing/nscd/nscd.initd10
-rw-r--r--testing/nscd/nscd.post-deinstall9
-rw-r--r--testing/nscd/nscd.pre-install6
4 files changed, 71 insertions, 0 deletions
diff --git a/testing/nscd/APKBUILD b/testing/nscd/APKBUILD
new file mode 100644
index 0000000000..3ab6ff0835
--- /dev/null
+++ b/testing/nscd/APKBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Michael Aldridge <maldridge@voidlinux.org>
+pkgname=nscd
+pkgver=1.0.2
+pkgrel=0
+pkgdesc="Implementation of nscd for nsswitch modules for musl"
+url="https://github.com/pikhq/musl-nscd"
+arch="all"
+license="MIT"
+depends_dev="bison flex"
+makedepends="$depends_dev"
+install="$pkgname.pre-install $pkgname.post-deinstall"
+subpackages="$pkgname-dev $pkgname-doc"
+source="
+ ${pkgname}-${pkgver}.tar.gz::https://github.com/pikhq/musl-nscd/archive/v${pkgver}.tar.gz
+ nscd.initd
+ "
+
+builddir="$srcdir"/musl-$pkgname-$pkgver
+build() {
+ cd "$builddir"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var
+ make
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+
+ install -m644 -D include/nss.h \
+ "$pkgdir"/usr/include
+
+ install -m644 -D COPYRIGHT \
+ "$pkgdir"/usr/share/licenses/$pkgname/COPYRIGHT
+
+ install -m755 -D "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname
+}
+
+sha512sums="45cd73f1e0eee7b32c3dcdfa96c0a11379f6208389b87fee97016af0ecb19e9e7d2a2f10e0df6e5ed8a6ad4bbbef70c01cd31ac3631fb1bcce6e69bf48843a3d nscd-1.0.2.tar.gz
+d66265b6e4f15d330282eb57a0e58860d49e24656a90bb7fe0360fdeecb0a0f0d411e9c21da16f0ceadace0523d994398d64e9dc60aaf3734c4d0aab3b8ae73f nscd.initd"
diff --git a/testing/nscd/nscd.initd b/testing/nscd/nscd.initd
new file mode 100644
index 0000000000..d917cbc062
--- /dev/null
+++ b/testing/nscd/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/testing/nscd/nscd.post-deinstall b/testing/nscd/nscd.post-deinstall
new file mode 100644
index 0000000000..d8c88a7d54
--- /dev/null
+++ b/testing/nscd/nscd.post-deinstall
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# This user is only present on the system to run nscd and does not
+# itself own any files. Great care must be taken to never delete a
+# user or group that actively controls system resources.
+deluser nscd 2>/dev/null
+delgroup nscd 2>/dev/null
+
+exit 0
diff --git a/testing/nscd/nscd.pre-install b/testing/nscd/nscd.pre-install
new file mode 100644
index 0000000000..45e214e5ad
--- /dev/null
+++ b/testing/nscd/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