diff options
-rw-r--r-- | testing/knot/APKBUILD | 14 | ||||
-rw-r--r-- | testing/knot/knot.post-install | 10 | ||||
-rw-r--r-- | testing/knot/knot.pre-install | 3 |
3 files changed, 21 insertions, 6 deletions
diff --git a/testing/knot/APKBUILD b/testing/knot/APKBUILD index 3a7030b555..3a652a5947 100644 --- a/testing/knot/APKBUILD +++ b/testing/knot/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Francesco Colista <fcolista@alpinelinux.org> pkgname=knot pkgver=1.5.3 -pkgrel=0 +pkgrel=1 pkgdesc="An high-performance authoritative-only DNS server" url="https://www.knot-dns.cz" arch="all" @@ -11,7 +11,9 @@ options="libtool" depends="" depends_dev="autoconf flex bison zlib-dev openssl-dev userspace-rcu-dev" makedepends="$depends_dev" -install="" +install="$pkgname.pre-install $pkgname.post-install" +pkgusers="knot" +pkggroups="knot" subpackages="$pkgname-dev $pkgname-doc" source="https://secure.nic.cz/files/knot-dns/${pkgname}-${pkgver}.tar.xz knot.confd @@ -35,13 +37,11 @@ build() { --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ - --localstatedir=/var/lib \ --libexecdir=/usr/lib/knot \ - --with-rundir=/run/knot \ + --with-rundir=/var/run/knot \ --with-storage=/var/lib/knot \ --enable-recvmmsg=yes \ --disable-silent-rules - make make check } @@ -50,7 +50,9 @@ package() { cd "$_builddir" make DESTDIR="${pkgdir}" install install -Dm 644 "${srcdir}/knot.confd" "${pkgdir}/etc/conf.d/knot" - install -Dm 644 "${srcdir}/knot.initd" "${pkgdir}/etc/init.d/knot" + install -Dm 755 "${srcdir}/knot.initd" "${pkgdir}/etc/init.d/knot" + chown $pkgusers:$pkggroups "${pkgdir}"/var/lib/$pkgname + chown $pkgusers:$pkggroups "${pkgdir}"/var/run/$pkgname rm -f "$pkgdir"/usr/lib/*.la } diff --git a/testing/knot/knot.post-install b/testing/knot/knot.post-install new file mode 100644 index 0000000000..74d367a035 --- /dev/null +++ b/testing/knot/knot.post-install @@ -0,0 +1,10 @@ +#!/bin/sh + +echo "*" >&2 +echo "* Before running knot, you must create a knot.conf file." >&2 +echo "* There is an example into /etc/knot directory. " >&2 +echo "* You can rename the example file and make the necessary adjustment. >&2 +echo "*" >&2 + +exit 0 + diff --git a/testing/knot/knot.pre-install b/testing/knot/knot.pre-install new file mode 100644 index 0000000000..bc93e098ec --- /dev/null +++ b/testing/knot/knot.pre-install @@ -0,0 +1,3 @@ +#!/bin/sh +adduser -H -s /sbin/nologin -S -D knot -G knot 2>/dev/null +exit 0 |