aboutsummaryrefslogtreecommitdiffstats
path: root/main/knock/APKBUILD
blob: 4728243d0d316e27ee0282a958ab8c07f39db797 (plain)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=knock
pkgver=0.7
pkgrel=0
pkgdesc="A simple port-knocking daemon"
url="http://www.zeroflux.org/projects/knock"
arch="all"
license="GPL2+"
depends="iptables"
makedepends="libpcap-dev"
install=
subpackages="$pkgname-doc"
source="http://www.zeroflux.org/proj/knock/files/$pkgname-$pkgver.tar.gz
	knock.initd
	knock.confd"

_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
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1

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

md5sums="cb6373fd4ccb42eeca3ff406b7fdb8a7  knock-0.7.tar.gz
5f05196d700c04287523d184226e2dc2  knock.initd
8067d3b8401a0b5d513c44d3ff436032  knock.confd"
sha256sums="9938479c321066424f74c61f6bee46dfd355a828263dc89561a1ece3f56578a4  knock-0.7.tar.gz
a29db7f05c0454642706da297c60a32c8c539eb436942fa6bcf4eaec9ac18b55  knock.initd
569d0596f28e6df05aeff16331fa5b19c60e4d6a2e36eec57dc9ac377ba3b46e  knock.confd"
sha512sums="eab5d855f7111d9411e84a56a15e8ea74f41c5bd9dee27ab49f0d8d509eeeb96a60c508928c92916dc0ec9b737c447ca8ca5ed4db6479b389549d60e76a85aa7  knock-0.7.tar.gz
fd913590f29ea5d7cc813980e9d968a59ead17bb4ceafe456ece4a62da083888c7d7a4810bc0e947ce2d106e1910a150cc9b5c34bad98e594f09a62de76c9cec  knock.initd
63fa311e6adf21450d4c93008a9537ec1b3c0dbed28e3daf955f2761127d9d756f2f7a84d8357d81a5e1a5a48453f9179d0c18cf18af0b9f30437c862a438d7f  knock.confd"