aboutsummaryrefslogtreecommitdiffstats
path: root/main/libressl/APKBUILD
blob: 5c669565babea2e4bb1b2e995d714ab14ccd719f (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
62
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Orion <systmkor@gmail.com>
# Maintainer: Orion <systmkor@gmail.com>
pkgname=libressl
pkgver=2.4.4
_namever=${pkgname}${pkgver%.*}
pkgrel=0
pkgdesc="Version of the TLS/crypto stack forked from OpenSSL"
url="http://www.libressl.org/"
arch="all"
license="custom"
depends=""
makedepends_build=""
makedepends_host="linux-headers"
makedepends="$makedepends_host"
replaces="openssl"
subpackages="$pkgname-dbg $_namever-libcrypto:_libs $_namever-libssl:_libs
	$_namever-libtls:_libs $pkgname-dev $pkgname-doc"
source="http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/$pkgname-$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	CFLAGS="-L$CBUILDROOT/usr/lib $CFLAGS" \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--with-sysroot=$CBUILDROOT \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		|| return 1
	make || return 1
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1
	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

dev() {
	default_dev || return 1
	replaces="openssl-dev"
}

_libs() {
	local name="${subpkgname#$_namever-}"
	pkgdesc="libressl $name library"
	depends=""

	mkdir -p "$subpkgdir"/lib "$subpkgdir"/usr/lib
	local f; for f in "$pkgdir"/usr/lib/$name.so.*; do
		mv $f "$subpkgdir"/lib/
		ln -s ../../lib/${f##*/} "$subpkgdir"/usr/lib/${f##*/}
	done
}

md5sums="9d98be5dffb1e4e3a3e6423267eba5dc  libressl-2.4.4.tar.gz"
sha256sums="6fcfaf6934733ea1dcb2f6a4d459d9600e2f488793e51c2daf49b70518eebfd1  libressl-2.4.4.tar.gz"
sha512sums="3999e1a61d3e5f14fbce72fdb0089eaf1481fb20f8675a56b2ce8b5388cf7e1ef7d2f66d9593960b708037537053b47f87b2a7f820504213a756b21c34584fe4  libressl-2.4.4.tar.gz"