summaryrefslogtreecommitdiff
path: root/knockd-ipv6-git/PKGBUILD
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-09-17 13:40:51 +0200
committerErich Eckner <git@eckner.net>2019-09-17 13:40:51 +0200
commitb817bd626eff7895154e83dc8e66473b2b5544a0 (patch)
tree875b920555ed27dbaa0bd810333475dda449ea17 /knockd-ipv6-git/PKGBUILD
parent9b1db843fca083cc6a3b27f2c4f4ba03d6deb8b8 (diff)
downloadarchlinuxewe-b817bd626eff7895154e83dc8e66473b2b5544a0.tar.xz
knockd-ipv6-git new
Diffstat (limited to 'knockd-ipv6-git/PKGBUILD')
-rw-r--r--knockd-ipv6-git/PKGBUILD69
1 files changed, 69 insertions, 0 deletions
diff --git a/knockd-ipv6-git/PKGBUILD b/knockd-ipv6-git/PKGBUILD
new file mode 100644
index 000000000..285cc30ad
--- /dev/null
+++ b/knockd-ipv6-git/PKGBUILD
@@ -0,0 +1,69 @@
+# Maintainer: Erich Eckner <arch at eckner dot net>
+# Contributor: Markus Schanz <coksnuss@googlemail.com>
+# Contributor: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributor: Mike Sampson <mike at sambodata dot com>
+# Contributor: Steven <steven at stebalien dot com>
+# Contributor: Aaron Griffin <aaron@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+pkgname=knockd-ipv6-git
+pkgver=0.7.8.r19.ac5b0dc
+pkgrel=1
+pkgdesc="Latest upstream version of knockd with added IPv6 support. Based on community/knockd."
+arch=('armv6h' 'armv7h' 'aarch64' 'i486' 'i686' 'pentium4' 'x86_64')
+url="http://www.zeroflux.org/projects/knock"
+license=('GPL2')
+makedepends=('git')
+provides=("knockd")
+conflicts=("knockd")
+backup=('etc/knockd.conf')
+source=('git+https://github.com/Coksnuss/knock.git#tag='"${pkgver##*.}"
+ 'knockd.logrotate'
+ 'knockd.service')
+sha512sums=('SKIP'
+ '9ffad661a13b24c7723ff73bcf82a71fe3d3f705f773467fa731702f9c465c32424e07c7dd7da3b498f32ac605f0c297913b077e2e3a32e9476c381b9ecc9abb'
+ '6e5fec91e07fb74169798f320607bd413258af0af48bd2a9c006a02bc97ce4ea9a5293eb9e166b9870c086bf147fca1462b98b3d914d7a28708e9fa2cc9c85cb')
+
+pkgver() {
+ cd "${srcdir}/knock"
+ _rev=$(
+ git rev-parse --short master
+ )
+ _pkgver=$(
+ git archive "${_rev}" -- src/knockd.c \
+ | tar -Ox \
+ | sed -n '
+ s/^static char version\[] = "\([^"]\+\)";$/\1/
+ T
+ =
+ p
+ ' \
+ | sed '
+ N
+ s/\n/ /
+ '
+ )
+ _line="${_pkgver% *}"
+ _pkgver="${_pkgver#* }"
+ _rev_count=$(
+ git rev-list "${_rev}" ^$(git blame -L${_line},${_line} "${_rev}" -- src/knockd.c | cut -d' ' -f1) --count
+ )
+ printf '%s.r%s.%s' \
+ "${_pkgver}" \
+ "${_rev_count}" \
+ "${_rev}"
+}
+
+build() {
+ cd "$srcdir/knock"
+ autoreconf -fi
+ ./configure --prefix=/usr --sbin=/usr/bin --sysconfdir=/etc
+ make
+}
+
+package() {
+ cd "$srcdir/knock"
+ make DESTDIR="$pkgdir/" install
+ install -Dm 644 "${srcdir}/knockd.service" "${pkgdir}/usr/lib/systemd/system/knockd.service"
+ install -Dm 644 "${srcdir}/knockd.logrotate" "${pkgdir}/etc/logrotate.d/knockd"
+ install -Dm 644 "README.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md"
+}