aboutsummaryrefslogtreecommitdiffstats
path: root/testing/openswan/APKBUILD
blob: ffd0a5ad8aeb24f9087d9b1739de4a97d75a059f (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
# Contributor: Danilo Godec <danilo.godec@agenda.si>
# Maintainer:
pkgname=openswan
pkgver=2.6.37
pkgrel=0
pkgdesc="IPsec Implementation which Allows Building of VPNs"
url="http://www.openswan.org/"
arch="all"
license="GPL"
depends=""
makedepends="gmp-dev bison flex coreutils bash"
install=""
subpackages="$pkgname-doc"
source="http://www.openswan.org/download/$pkgname-$pkgver.tar.gz
	ipsec.initd setup.patch"

_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"
	make INC_RCDEFAULT=/etc/init.d INC_USRLOCAL=/usr programs || return 1
}

package() {
	cd "$_builddir"
	make INC_MANDIR=share/man INC_RCDEFAULT=/etc/init.d INC_USRLOCAL=/usr DESTDIR="$pkgdir" install || return 1
	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING

	install -Dm755 "$srcdir"/ipsec.initd "$pkgdir"/etc/init.d/ipsec
	install -Dm644 BUGS "$pkgdir"/usr/share/doc/$pkgname/BUGS
	install -Dm644 CHANGES "$pkgdir"/usr/share/doc/$pkgname/CHANGES
	install -Dm644 CREDITS "$pkgdir"/usr/share/doc/$pkgname/CREDITS
	install -Dm644 INSTALL "$pkgdir"/usr/share/doc/$pkgname/INSTALL
	install -Dm644 README "$pkgdir"/usr/share/doc/$pkgname/README
	cp -aR docs/* "$pkgdir"/usr/share/doc/$pkgname/

}
md5sums="e5c948555088df06cfadcfbe6c13adfe  openswan-2.6.37.tar.gz
f019d1fa23627d54462054fedc9de03b  ipsec.initd
fd3cd27f9da9140fabd935377c3d6921  setup.patch"