aboutsummaryrefslogtreecommitdiffstats
path: root/community/stunnel/APKBUILD
blob: 24c2e3cc8f79181a54bf53a44f51379e21381398 (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
53
54
55
56
57
58
59
60
61
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Dean Takemori <deant@hawaii.rr.com>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=stunnel
pkgver=5.44
pkgrel=2
pkgdesc="SSL encryption wrapper between network client and server."
url="http://www.stunnel.org/"
arch="all"
license="GPL-2.0-or-later with OpenSSL exception"
# support for SO_ORIGINAL_DST will be silently disabled without linux-headers
makedepends="libressl-dev linux-headers"
subpackages="$pkgname-doc"
install="$pkgname.pre-install"
source="http://www.stunnel.org/downloads/archive/${pkgver%.*}.x/stunnel-$pkgver.tar.gz
	update-test-certs.patch
	libressl-2.7.patch
	stunnel.initd
	stunnel.conf"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-fips
	make
}

check() {
	cd "$builddir"
	# the CRL file has expired
	rm tests/recipes/013_CRL_file

	make check
}

package() {
	cd "$builddir"

	make DESTDIR="$pkgdir" install

	install -Dm755 "$srcdir"/stunnel.initd "$pkgdir"/etc/init.d/stunnel
	install -m644 "$srcdir"/stunnel.conf "$pkgdir"/etc/stunnel/stunnel.conf

	mkdir -p "$pkgdir"/usr/share/doc/$pkgname/examples/
	mv "$pkgdir"/etc/stunnel/stunnel.conf-sample \
		"$pkgdir"/usr/share/doc/$pkgname/examples/
}

sha512sums="a1aa4f234926208bf1b2c9acc0bf83dc0f2c8f575bc57f5ce89b32b4e3fde0412ea0ef7c2edb364fbe0b52fdd89773fab4df53950c58797c11b7668f3e4e7638  stunnel-5.44.tar.gz
4581f6db2451dcd465c39132956ca97149917edff922c5211d68d2b1c33e98436e00a9dbbcd215a8c34ea58f1345c5732ba768ab0f42b36e0a4ccdcb6719b627  update-test-certs.patch
f0174128a6c145f22b1fc7aaa23817eadae43105422b9638335409ad1491996bfc0c8c102a514593b0bcf0f06c0503fda1e4f92b0ea2a0a66bfe1b0f48071ec6  libressl-2.7.patch
33e215413e08fdd5783cc76e6ba6a2342fb6d0573f801815c4d3022625e71be6c9739d47a7a61bf7c803f27911b9c92cf6ae3e522add040f83802e1aaeaee000  stunnel.initd
a72bfddeb74787d58c9fd24782d86c0498ce3530a43fbdd4ec4c4b57baa6257b6ef21005aca274b22c4a22cdbbbcee63dd3d841f458af248db9c69e8d59fa56f  stunnel.conf"