aboutsummaryrefslogtreecommitdiffstats
path: root/testing/libreswan/APKBUILD
blob: b9f1938cf1de61bd5d3a2ab4b6eb478fd3dba8ed (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>

pkgname=libreswan
pkgver=3.6
pkgrel=1
pkgdesc="IPsec implementation for Linux"
url="https://libreswan.org"
arch="all"
license="GPLv2"
depends="nss-tools iproute2"
depends_dev="gmp-dev linux-pam-dev nss-dev unbound-dev libcap-ng-dev curl-dev nspr-dev"
makedepends="$depends_dev bison flex pkgconf coreutils bash"
subpackages="$pkgname-doc"
source="https://download.libreswan.org/libreswan-$pkgver.tar.gz
	openrc.patch"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	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 \
		FINALBINDIR=/usr/libexec/ipsec \
		FINALLIBEXECDIR=/usr/libexec/ipsec \
		programs || return 1
}

package() {
	cd "$_builddir"
	make INC_MANDIR=share/man \
		INC_RCDEFAULT=/etc/init.d \
		INC_USRLOCAL=/usr \
		DESTDIR="$pkgdir" \
		INSTCONFFLAGS=-m644 \
		FINALBINDIR=/usr/libexec/ipsec \
		FINALLIBEXECDIR=/usr/libexec/ipsec \
		install || return 1
}
md5sums="6c6f0ffec329e09d2d7fa24ae102c69b  libreswan-3.6.tar.gz
7feffc23906671e6bf5d653355a21b6e  openrc.patch"
sha256sums="50e7fdeccd9626bab15c47d69f78dbfce108c7cb583957d9f7b1559db9d5ee92  libreswan-3.6.tar.gz
b86a2ec9111c071446b83d446a72149d0540e0c9b3a76776f60b2354624a2c2f  openrc.patch"
sha512sums="3eb0a8de0ae271a6036656a1b02600c02c2e4ee484128a7d6e5e170cbe0edc26010576201ecc9cc7ce88ad6f9292d42a8755f9c07720d7d9af2e4ed6e308532b  libreswan-3.6.tar.gz
223b730e1ced8086e5361435f2d5bdf47ccd764e95e570ec0d81e101b7b63f67ee6ae746087ffd99c887e46fbf0fbe5024a7a08ae80a991a69cfb81d8527f448  openrc.patch"