Commit ee3b409e authored by Natanael Copa's avatar Natanael Copa

main/knock: split -openrc, modernize

parent a02ad24b
......@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=knock
pkgver=0.8
pkgrel=0
pkgrel=1
pkgdesc="A simple port-knocking daemon"
url="http://www.zeroflux.org/projects/knock"
arch="all"
......@@ -10,7 +10,7 @@ license="GPL-2.0-or-later"
depends="iptables"
makedepends="libpcap-dev autoconf automake"
install=
subpackages="$pkgname-doc"
subpackages="$pkgname-doc $pkgname-openrc"
# Original hasnt been maintained in a long time - use this fork instead - includes IPv6 support
_fork="TDFKAOlli"
source="$pkgname-$pkgver.tar.gz::https://github.com/$_fork/$pkgname/archive/${pkgver}.tar.gz
......@@ -18,20 +18,10 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/$_fork/$pkgname/archive/${pk
knock.confd"
options="!check"
_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"
autoreconf -fi
./configure \
--build=$CBUILD \
......@@ -39,19 +29,18 @@ build() {
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
|| return 1
make || return 1
--infodir=/usr/share/info
make
}
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
cd "$builddir"
make DESTDIR="$pkgdir" install
install -m755 -D "$srcdir"/$pkgname.initd \
"$pkgdir"/etc/init.d/knockd || return 1
"$pkgdir"/etc/init.d/knockd
install -m644 -D "$srcdir"/$pkgname.confd \
"$pkgdir"/etc/conf.d/knockd || return 1
"$pkgdir"/etc/conf.d/knockd
}
sha512sums="cfc0b92e90c34ffa629b866e63f9f9f4b9c2423491680e6155efeb8f40c24446df29f961f2f8505441b153c2a87a32b834fd1182896b6de92dee430044680c27 knock-0.8.tar.gz
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment