aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-ossl/APKBUILD
blob: f25c05fd16005f7dbd370542f5b206f2b21899a8 (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
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>

_luaversions="5.1 5.2 5.3"
pkgname=lua-ossl
_pkgname=luaossl
pkgver=20161101
_ver=${pkgver%_git*}
pkgrel=0
pkgdesc="A comprehensive OpenSSL Lua module"
url="http://25thandclement.com/~william/projects/luaossl.html"
arch="all"
license="MIT"
depends=""
makedepends="libressl-dev"
subpackages=""
for _v in $_luaversions; do
	makedepends="$makedepends lua$_v-dev"
	subpackages="$subpackages lua$_v-${pkgname#lua-}:_package"
done
source="luaossl-$_ver.tar.gz::https://github.com/wahern/$_pkgname/archive/rel-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-rel-$pkgver"

build() {
	cd "$builddir"

	make config prefix=/usr || return 1
	local lver; for lver in $_luaversions; do
		make openssl$lver || return 1
	done
}

package() {
	mkdir -p "$pkgdir"
}

_package() {
	local lver="${subpkgname:3:3}"
	pkgdesc="$pkgdesc for Lua $lver"
	depends="lua$lver"
	install_if="lua$lver $pkgname=$pkgver-r$pkgrel"

	cd "$builddir"
	make DESTDIR="$subpkgdir" install$lver
}

md5sums="20fb418ad0514bafe9d456d82dc9ae77  luaossl-20161101.tar.gz"
sha256sums="ac7d609e63ae85a653e02014224cfd7d7d0946ae18d02b19b35c242af526c834  luaossl-20161101.tar.gz"
sha512sums="47ba8330d2e2113dd82faea1ff98d98ac72c3b714afb414ef9f5745d98d9fb6bc8ce3be57c26a1efbc700a246d0f04c4363eb73c2ad89a5f9ae30d71aaf9c718  luaossl-20161101.tar.gz"