aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/libreswan/APKBUILD
blob: 08c063aab04e2795a4e564932e5615a4c2fac085 (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.11
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="d8ffd012eb6933ff0f069334a85f81e1  libreswan-3.11.tar.gz"
sha256sums="f2837f0ab380671844359fca397357e3045137ba31fabcef5abdb1d613939fc2  libreswan-3.11.tar.gz"
sha512sums="40b91f05ca1156e33a3d6e2ee2932a65936392ae762b64bd20639bbb9a63269ae24d349f377d8b77743c84fbdfe0290bf581aa17e8634777147a5642995a1c7c  libreswan-3.11.tar.gz"