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

pkgname=libreswan
pkgver=3.8
pkgrel=0
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 coreutils bash"
subpackages="$pkgname-doc"
source="https://download.libreswan.org/libreswan-$pkgver.tar.gz"

_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="3c9912eebb98184594cc0f5dd15477f7  libreswan-3.8.tar.gz"
sha256sums="a2e285fc9d20d2819a8fd8e3742d3aa5b1b33f0fd371584788800b7a5ebf12e4  libreswan-3.8.tar.gz"
sha512sums="de2c7b92a22762bb3fb2d10c5efd60d9de2cc8289f31e61c23ee6c9e876a8f3fd327b3613de7c38b1fc4979cdf047baa5d78f7f809196c59f62d2b51b93cb246  libreswan-3.8.tar.gz"