diff options
author | Erich Eckner <git@eckner.net> | 2019-09-17 13:40:51 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-09-17 13:40:51 +0200 |
commit | b817bd626eff7895154e83dc8e66473b2b5544a0 (patch) | |
tree | 875b920555ed27dbaa0bd810333475dda449ea17 | |
parent | 9b1db843fca083cc6a3b27f2c4f4ba03d6deb8b8 (diff) | |
download | archlinuxewe-b817bd626eff7895154e83dc8e66473b2b5544a0.tar.xz |
knockd-ipv6-git new
-rw-r--r-- | knockd-ipv6-git/PKGBUILD | 69 | ||||
-rw-r--r-- | knockd-ipv6-git/knockd.logrotate | 4 | ||||
-rw-r--r-- | knockd-ipv6-git/knockd.service | 9 |
3 files changed, 82 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" +} diff --git a/knockd-ipv6-git/knockd.logrotate b/knockd-ipv6-git/knockd.logrotate new file mode 100644 index 000000000..6c4d236a0 --- /dev/null +++ b/knockd-ipv6-git/knockd.logrotate @@ -0,0 +1,4 @@ +/var/log/knockd.log { + missingok + notifempty + delaycompress diff --git a/knockd-ipv6-git/knockd.service b/knockd-ipv6-git/knockd.service new file mode 100644 index 000000000..162a8a01c --- /dev/null +++ b/knockd-ipv6-git/knockd.service @@ -0,0 +1,9 @@ +[Unit] +Description=Port-Knocking Daemon +After=network.target + +[Service] +ExecStart=/usr/bin/knockd + +[Install] +WantedBy=multi-user.target |