aboutsummaryrefslogtreecommitdiffstats
path: root/main/knock/APKBUILD
blob: 617a9e45b3e37c0fccc757c95da9000fcb9242dc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=knock
pkgver=0.8
pkgrel=1
pkgdesc="A simple port-knocking daemon"
url="http://www.zeroflux.org/projects/knock"
arch="all"
license="GPL-2.0-or-later"
depends="iptables"
makedepends="libpcap-dev autoconf automake"
install=
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
	knock.initd
	knock.confd"
options="!check"

builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	autoreconf -fi
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install

	install -m755 -D "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/knockd
	install -m644 -D "$srcdir"/$pkgname.confd \
		"$pkgdir"/etc/conf.d/knockd
}

sha512sums="cfc0b92e90c34ffa629b866e63f9f9f4b9c2423491680e6155efeb8f40c24446df29f961f2f8505441b153c2a87a32b834fd1182896b6de92dee430044680c27  knock-0.8.tar.gz
369010549a1b33efe9f634794f039249421778d49739e8f10e4d6baa83424e066a63c0ef637b70762ee34617e7b67f9ac6683125d35ded85d6779d6b2ef0f7db  knock.initd
63fa311e6adf21450d4c93008a9537ec1b3c0dbed28e3daf955f2761127d9d756f2f7a84d8357d81a5e1a5a48453f9179d0c18cf18af0b9f30437c862a438d7f  knock.confd"