testing/musl-nscd: new aport

This commit is contained in:
opal hart 2019-09-25 21:34:33 +00:00 committed by Kevin Daudt
parent 11837b2085
commit d2cb738b2e
4 changed files with 61 additions and 0 deletions

View File

@ -0,0 +1,43 @@
# Maintainer: Josiah Worcester <josiahw@gmail.com>
pkgname=musl-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 $pkgname-openrc"
options="!check" # No test suite
source="
$pkgname-$pkgver.tar.gz::https://github.com/pikhq/musl-nscd/archive/v$pkgver.tar.gz
musl-nscd.initd
"
build() {
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var \
make
}
package() {
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 musl-nscd-1.0.2.tar.gz
be2bfc7ac417f81dabd77862fb78f60835bc2590e427f6947356421037f6fbab52514b6d728c03bcb2e9a6559a159468a70856b3cbfc078099d71919d9e8818a musl-nscd.initd"

View File

@ -0,0 +1,6 @@
#!/sbin/openrc-run
name="$SVCNAME"
pidfile="/var/run/$SVCNAME.pid"
command="/usr/sbin/$SVCNAME"
command_args="${NSCD_OPTS:-d -p ${pidfile}}"

View File

@ -0,0 +1,6 @@
#!/bin/sh
deluser nscd 2>/dev/null
delgroup nscd 2>/dev/null
exit 0

View File

@ -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