APKBUILD 1.88 KB
Newer Older
Natanael Copa's avatar
Natanael Copa committed
1 2
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ipsec-tools
3
pkgver=0.8.1
4
pkgrel=1
Natanael Copa's avatar
Natanael Copa committed
5 6
pkgdesc="User-space IPsec tools for various IPsec implementations"
url="http://ipsec-tools.sourceforge.net/"
7
arch="all"
Natanael Copa's avatar
Natanael Copa committed
8
license="BSD"
9
depends=""
10
makedepends="openssl-dev bison flex"
Natanael Copa's avatar
Natanael Copa committed
11
subpackages="$pkgname-doc $pkgname-dev"
12
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
Natanael Copa's avatar
Natanael Copa committed
13 14
	racoon.initd
	racoon.confd
15
	01-fix-deletion-notification.patch
16
	20-grekey-support.patch
17
	50-reverse-connect.patch
Timo Teräs's avatar
Timo Teräs committed
18
	70-defer-isakmp-ident-handling.patch
19
	75-racoonctl-rcvbuf.patch
20
	90-dead-on-initial-contact.patch
Natanael Copa's avatar
Natanael Copa committed
21 22
	"

23
_builddir="$srcdir"/$pkgname-$pkgver
24 25
prepare() {
	cd "$_builddir"
26 27 28 29
	for i in ../*.patch; do
		msg "Applying $i..."
		patch -p1 -i $i || return 1
	done
30

31
	sed -i 's:-Werror::g' configure
32
}
Natanael Copa's avatar
Natanael Copa committed
33

34 35
build() {
	cd "$_builddir"
Natanael Copa's avatar
Natanael Copa committed
36 37 38 39 40 41 42 43 44 45 46 47 48 49
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var/lib \
		--with-kernel-headers=/usr/include \
		--disable-security-context \
		--enable-adminport \
		--enable-dpd \
		--enable-frag \
		--enable-hybrid \
		--enable-ipv6 \
		--enable-natt
	make || return 1
50 51 52 53
}

package() {
	cd "$_builddir"
Natanael Copa's avatar
Natanael Copa committed
54
	make DESTDIR="$pkgdir" install
55 56
	rm "$pkgdir"/usr/lib/*.la

Natanael Copa's avatar
Natanael Copa committed
57 58 59 60
	install -D -m755 ../racoon.initd "$pkgdir"/etc/init.d/racoon
	install -D -m644 ../racoon.confd "$pkgdir"/etc/conf.d/racoon
}

61
md5sums="4d5d5ccc402c9c6bec0e87217e451fe5  ipsec-tools-0.8.1.tar.gz
62
74f12ed04ed273a738229c0bfbf829cc  racoon.initd
63
2d00250cf72da7f2f559c91b65a48747  racoon.confd
64
c8b141e2c705c31af1c35d481e695ee6  01-fix-deletion-notification.patch
65
79b919ab23080f54dc3e7686877ca6bd  20-grekey-support.patch
66
f97205eea3dc68d2437a2ad8720f4520  50-reverse-connect.patch
Timo Teräs's avatar
Timo Teräs committed
67
94773c94233e14cdce0fa02ff780a43e  70-defer-isakmp-ident-handling.patch
68 69
2d5d24c4a3684a38584f88720f71c7d6  75-racoonctl-rcvbuf.patch
1d0d8ef21c65138d40f902502412da9c  90-dead-on-initial-contact.patch"