blob: 29d091b7d2f57e19b86663d1b0eeb07275ebad29 (
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=lua-ossl
_pkgname=luaossl
pkgver=20180708
_ver=${pkgver%_git*}
pkgrel=2
pkgdesc="A comprehensive OpenSSL Lua module"
url="http://25thandclement.com/~william/projects/luaossl.html"
arch="all"
license="MIT"
depends=""
makedepends="openssl-dev"
subpackages=""
source="$_pkgname-$_ver.tar.gz::https://github.com/wahern/$_pkgname/archive/rel-$pkgver.tar.gz
0001-pkey-getPrivateKey-method.patch
0002-pkey.getPrivateKey-encryption.patch
0003-pkey.new-decryption.patch
0004-pkey.getPrivateKey-use-password-callback.patch
0005-pkey-PEM-password-callback.patch
"
builddir="$srcdir/$_pkgname-rel-$pkgver"
_luaversions="5.1 5.2 5.3"
for _v in $_luaversions; do
makedepends="$makedepends lua$_v-dev"
subpackages="$subpackages lua$_v-${pkgname#lua-}:_package"
done
build() {
cd "$builddir"
make config prefix=/usr
local lver; for lver in $_luaversions; do
make openssl$lver
done
}
check() {
local lver; for lver in $_luaversions; do
msg "Checking on lua$lver..."
# Lua sources in src/ are in non-standard layout, so we can't
# use them directly.
make -C "$builddir" DESTDIR="$builddir/.test$lver" install$lver
cd "$builddir"/regress
local file; for file in $(find . -type f -perm +111); do
echo "$file:" >&2
LUA_CPATH="../.test$lver/usr/lib/lua/$lver/?.so;;" \
LUA_PATH="../.test$lver/usr/share/lua/$lver/?.lua;;" \
lua$lver $file
done
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"
local rockdir="$subpkgdir/usr/lib/luarocks/rocks-$lver/$_pkgname/$pkgver-1"
cd "$builddir"
make DESTDIR="$subpkgdir" install$lver
mkdir -p "$rockdir"
echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
}
sha512sums="b2a73a7e7ace9a01c8c5a26603107f7741de88de32c393ed9134b70d55278c81d48e357955e671654825de282449b9570ecdc6a4fbcf4890439c0200ba471338 luaossl-20180708.tar.gz
385ca444d860deaf22b460cba0510daf40014c5da90bafb5e0299ee173625e4ab4083dab17fcd973f816a46b3cb1d2d3d535633128462ba33f5ab9c14c2baa77 0001-pkey-getPrivateKey-method.patch
0e33d10cb40f0b4d614591a3fda3e8ddc35438a9ddd8170239e8680b831ecbfea108ff111504686fbfc8a82bc59b96bbeb166ddef2ee6e299707fb5795b4b3ce 0002-pkey.getPrivateKey-encryption.patch
c5800c658773477c967a73eb1a86d9f746a6a0821ee462e8873ac5149c0b77ef3b54ee651ea7bf5d93c42e67b8e60b449e6697c1167aa92bf73e6d65aa645205 0003-pkey.new-decryption.patch
9eb6a87241bba69fc4508fb28a95e043fea9078aa7515314e9f181fd5e0789a31715de3912e4095c7b0028c24ee9ea4061e411ffb8ae7161ba7477ee85d6609c 0004-pkey.getPrivateKey-use-password-callback.patch
e0028d4623018de3f467b405e704a8cbb9e6a2a88d12358ff26ffad1aa0d28733f55fb2ed0ead4c358b350dd702c80a3d322a70c2d4463ee58ebf68ef1a9ab6a 0005-pkey-PEM-password-callback.patch"
|