diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2016-10-02 16:56:57 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-10-02 17:48:20 +0200 |
commit | 7727450408dbac359441a173e62935b809764c43 (patch) | |
tree | 570f974351a70616386b0ea2836e41004dc577f6 /community/knot | |
parent | 57513a61da0b64f7a9502d7a11d4b4dd09ed98f2 (diff) | |
download | aports-7727450408dbac359441a173e62935b809764c43.tar.bz2 aports-7727450408dbac359441a173e62935b809764c43.tar.xz |
community/knot: improve abuild
Diffstat (limited to 'community/knot')
-rw-r--r-- | community/knot/APKBUILD | 42 | ||||
-rw-r--r-- | community/knot/knot.post-install | 13 | ||||
-rw-r--r-- | community/knot/knotd.initd | 6 |
3 files changed, 28 insertions, 33 deletions
diff --git a/community/knot/APKBUILD b/community/knot/APKBUILD index 7684ad831e..add8197bba 100644 --- a/community/knot/APKBUILD +++ b/community/knot/APKBUILD @@ -9,7 +9,6 @@ pkgdesc="An high-performance authoritative-only DNS server" url="https://www.knot-dns.cz" arch="all" license="GPL3" -options="" depends="" depends_dev="gnutls-dev libedit-dev jansson-dev libcap-ng-dev libidn-dev openssl-dev userspace-rcu-dev zlib-dev" @@ -22,20 +21,10 @@ source="https://secure.nic.cz/files/knot-dns/${pkgname}-${pkgver}.tar.xz knotd.confd knotd.initd " -_builddir="$srcdir"/$pkgname-$pkgver - -prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} +builddir="$srcdir/$pkgname-$pkgver" build() { - cd "$_builddir" + cd "$builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ @@ -51,22 +40,27 @@ build() { } package() { - cd "$_builddir" - make DESTDIR="${pkgdir}" install || return 1 - install -Dm 644 "${srcdir}/knotd.confd" "${pkgdir}/etc/conf.d/knotd" - install -Dm 755 "${srcdir}/knotd.initd" "${pkgdir}/etc/init.d/knotd" - chown $pkgusers:$pkggroups "${pkgdir}"/var/lib/$pkgname - chmod 750 "${pkgdir}"/var/lib/$pkgname - chown $pkgusers:$pkggroups "${pkgdir}"/var/run/$pkgname - chmod 750 "${pkgdir}"/var/run/$pkgname + cd "$builddir" + + make DESTDIR="$pkgdir" install || return 1 + + chown $pkgusers:$pkggroups "$pkgdir"/var/lib/$pkgname || return 1 + chmod 750 "$pkgdir"/var/lib/$pkgname || return 1 + chown $pkgusers:$pkggroups "$pkgdir"/var/run/$pkgname || return 1 + chmod 750 "$pkgdir"/var/run/$pkgname || return 1 + + install -Dm 644 "$srcdir"/knotd.confd \ + "$pkgdir"/etc/conf.d/knotd || return 1 + install -Dm 755 "$srcdir"/knotd.initd \ + "$pkgdir"/etc/init.d/knotd || return 1 } md5sums="7ca754f972fb07faa4f30e50d8a4385b knot-2.3.0.tar.xz 66f3111080662280d95bc928d6ca92d5 knotd.confd -5bdbc22866a28caae068e65d53916915 knotd.initd" +e243f6266fa6c84ea664678630896fa1 knotd.initd" sha256sums="8abf9a6562ecf2f7f4222d16ca6c75463399870db360eda7caa40530b469533c knot-2.3.0.tar.xz ff384d428c9e67139ed21b0c78eabf6a26d96f31775f6143ce0c4f9c4f6beaf3 knotd.confd -c7690f1c4f748f436faa9e305ecbbb3d05e5cc50493eb10ca92bc73365578428 knotd.initd" +bb2b3815c180086cfd566250c4ba529efe9650dfec3297ddf923dffa2b15d56c knotd.initd" sha512sums="28f0f6a00af3feb95ebd9af0c324ffeff1093f8e74136ce81f5a6e7f4434f22b9e371715b4b116de9b8faf39776be4d943c2ae09fb786e6061cc0394a767e8b6 knot-2.3.0.tar.xz 471d3c639a8235ba09491c99d36c0a4f1074d6055ccfd3807be02a30d3ed5bbe69a84f0414ea7810db6bbc1e38f5837108e5744fc59f949ed78a262a7de4597e knotd.confd -b6cd5b52ba65f9726164b21003fe0a0fc54f4f51aa7bbbcfd5b83aa4466e5224567a26c9c8ede13ac6a8090706e975e3220456112b20eb45304c9d92be7fb3d3 knotd.initd" +c7ca9ec5dcbf9cf99a3805c7ca040fb43f65945a9ec689d2ee8ead1314f17ecb51147ca2c496ca9289c48a78b71dd2e3d8066c855c42ba8c2fe6d425518f2203 knotd.initd" diff --git a/community/knot/knot.post-install b/community/knot/knot.post-install index 179e5fc92a..c9cced828f 100644 --- a/community/knot/knot.post-install +++ b/community/knot/knot.post-install @@ -1,10 +1,11 @@ #!/bin/sh -echo "*" >&2 -echo "* Before running knot, you must create a knot.conf file." >&2 -echo "* There is an example in the /etc/knot directory." >&2 -echo "* You can rename the example file and make the necessary adjustment." >&2 -echo "*" >&2 +cat >&2 <<EOF +* +* Before running knot, you must create a knot.conf file. +* There is an example in the /etc/knot directory. +* You can rename the example file and make the necessary adjustment. +* +EOF exit 0 - diff --git a/community/knot/knotd.initd b/community/knot/knotd.initd index 49309869e5..8ec8600a9b 100644 --- a/community/knot/knotd.initd +++ b/community/knot/knotd.initd @@ -20,17 +20,17 @@ start_pre() { } stop() { - ebegin "Stopping ${name}" + ebegin "Stopping $name" /usr/sbin/knotc stop >/dev/null 2>&1 # Mark service as stopped if remote control was successful - if [ 0 -eq $? ]; then + if [ $? -eq 0 ]; then start-stop-daemon --stop --quiet --pidfile /var/run/knot/knot.pid fi eend $? } reload() { - ebegin "Reloading knot" + ebegin "Reloading $name" /usr/sbin/knotc reload >/dev/null eend $? } |