blob: de9d2bb176dcd67eb3d1db53b98d4f30e3533969 (
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
62
63
64
65
66
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=fwknop
pkgver=2.6.3
pkgrel=0
pkgdesc="A Single Packet Authorization (SPA) implementation"
url="http://www.cipherdyne.org/fwknop/"
arch="all"
license="GPL2"
depends="iptables"
depends_dev=""
makedepends="$depends_dev libpcap-dev iptables gpgme-dev"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-server"
source="http://cipherdyne.org/fwknop/download/fwknop-$pkgver.tar.gz
fwknopd.initd"
_builddir="$srcdir"/fwknop-$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 \
--localstatedir=/var \
--with-gpgme \
|| return 1
make || return 1
}
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
rm -f "$pkgdir"/usr/lib/*.la || return 1
install -Dm755 "$srcdir"/fwknopd.initd "$pkgdir"/etc/init.d/fwknopd
echo "# If using gnupg2 see http://www.gnupg.org/faq/GnuPG-FAQ.html#how-can-i-use-gnupg-in-an-automated-environment" >> "$pkgdir"/etc/fwknop/access.conf
echo "# & sign the client public key on the server with a normal key which has a password" >> "$pkgdir"/etc/fwknop/access.conf
echo "# disable GPG_DECRYPT_PW & enable the following variable:" >> "$pkgdir"/etc/fwknop/access.conf
echo "#GPG_ALLOW_NO_PW: Y;" >> "$pkgdir"/etc/fwknop/access.conf
}
server() {
pkgdesc="A Single Packet Authorization (SPA) server"
mkdir -p "$subpkgdir"/usr
mv "$pkgdir"/usr/sbin "$subpkgdir"/usr/ \
&& mv "$pkgdir"/etc "$subpkgdir"/
}
md5sums="7a1e5d078346069f9f33b40dfe983d01 fwknop-2.6.3.tar.gz
6921ba05a6b672c0994d005c4c4771ef fwknopd.initd"
sha256sums="4558b06eb91d9a0b43993abfaea01eb2270bb13da50cb6379a6d96e1aeae2b47 fwknop-2.6.3.tar.gz
07083bba79ada87a46fb4559b7b1ec79109e941ab299bf44de9ae318b9dac040 fwknopd.initd"
sha512sums="c6c93fc302a05ea1a88a07a368c9561fcdb17487298314eb2702be1fcf81b2faf5a3f6b5a75641dfbdb0a7f5ec2a6db6652b267ea7495b6e6f63d03bf6d82fa6 fwknop-2.6.3.tar.gz
d782eca76f036cf1eccfe4296e0e169c13ca15f191eddffc65bd696a551e8e1dec0b3c146ce0dfb19ed812fe36409620cb5d259ceb5a000adb64ceaa0f7825f8 fwknopd.initd"
|