APKBUILD 1.87 KB
Newer Older
Natanael Copa's avatar
Natanael Copa committed
1 2
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ipsec-tools
3 4
pkgver=0.8_alpha20090903
_myver=0.8-alpha20090903
5
pkgrel=10
Natanael Copa's avatar
Natanael Copa committed
6 7 8
pkgdesc="User-space IPsec tools for various IPsec implementations"
url="http://ipsec-tools.sourceforge.net/"
license="BSD"
9
depends=""
10
makedepends="openssl-dev bison flex"
Natanael Copa's avatar
Natanael Copa committed
11 12 13 14
subpackages="$pkgname-doc $pkgname-dev"
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$_myver.tar.gz
	racoon.initd
	racoon.confd
15 16
	50-reverse-connect.patch
	60-debug-quick.patch
17
	initial-contact-fix.diff
18
	fd-priorities.patch
19
	70-rcvbuf-size.patch
20
	90-openssl-oneshot.patch
Natanael Copa's avatar
Natanael Copa committed
21 22
	"

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

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

35 36
build() {
	cd "$_builddir"
Natanael Copa's avatar
Natanael Copa committed
37 38 39 40 41 42 43 44 45 46 47 48 49 50
	./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
51 52 53 54
}

package() {
	cd "$_builddir"
Natanael Copa's avatar
Natanael Copa committed
55 56 57 58 59 60
	make DESTDIR="$pkgdir" install
	
	install -D -m755 ../racoon.initd "$pkgdir"/etc/init.d/racoon
	install -D -m644 ../racoon.confd "$pkgdir"/etc/conf.d/racoon
}

61
md5sums="8ec28d4e89c0f5e49ae2caa7463fbcfd  ipsec-tools-0.8-alpha20090903.tar.gz
62
74f12ed04ed273a738229c0bfbf829cc  racoon.initd
63
2d00250cf72da7f2f559c91b65a48747  racoon.confd
64
13bda94a598aabf593280e04ea16065d  50-reverse-connect.patch
65
baa13d7f0f48955c792f7fcd42a8587a  60-debug-quick.patch
66
69e06c5cc3a0c1cc8b10ddc89d1e644b  initial-contact-fix.diff
67
c1e8b8dc80ef4b5d79fece52a4865e68  fd-priorities.patch
68
f40c78e4ca4b92d2bf74e4fcf3a8d91f  70-rcvbuf-size.patch
69
11e2c21e443edab17725f74ffeaddb76  90-openssl-oneshot.patch"