archrelease: copy trunk to community-any
[ArchLinux/community.git] / lua-luaossl / trunk / PKGBUILD
blob531d18ad3197693fa7ff66c72f46781798949eba
1 # Maintainer: Daurnimator <daurnimator@archlinux.org>
3 pkgname=(lua-luaossl lua51-luaossl lua52-luaossl lua53-luaossl)
4 pkgver=20220711
5 pkgrel=2
6 pkgdesc='Most comprehensive OpenSSL module in the Lua universe'
7 arch=('x86_64')
8 url='http://25thandclement.com/~william/projects/luaossl.html'
9 license=('MIT')
10 makedepends=('luarocks' 'lua' 'lua51' 'lua52' 'lua53')
11 depends=('openssl')
12 source=("$pkgname-$pkgver.tar.gz::https://github.com/wahern/luaossl/archive/rel-$pkgver.tar.gz"
13       "https://github.com/wahern/luaossl/releases/download/rel-20220711/luaossl-$pkgver-0.rockspec")
14 sha256sums=('f16c4cd2c880f270c1c73daa0a4bfdd11ae3155b92a2086863731e06d241300b'
15             '1ec15fc11183ca911af98c50472ac1e9693f8148e7065656a5f1a0f2dd9ec82c')
17 build() {
18   cd "luaossl-rel-$pkgver"
19   for v in 5.1 5.2 5.3 5.4; do
20     mkdir -p "$v/"
21     luarocks make --pack-binary-rock --lua-version="$v" --deps-mode=none \
22       CFLAGS="$CPPFLAGS $CFLAGS -fPIC" \
23       LIBFLAG="$LDFLAGS -shared" \
24       ../luaossl-"$pkgver"-0.rockspec
25     mv luaossl-"$pkgver"-0.*.rock "$v/"
26   done
29 package_lua-luaossl() {
30   pkgdesc="$pkgdesc for Lua 5.4"
32   cd "luaossl-rel-$pkgver"
33   luarocks install --lua-version=5.4 --tree="$pkgdir/usr/" --deps-mode=none 5.4/*.rock --no-manifest
34   install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
37 package_lua51-luaossl() {
38   pkgdesc="$pkgdesc for Lua 5.1"
40   cd "luaossl-rel-$pkgver"
41   luarocks install --lua-version=5.1 --tree="$pkgdir/usr/" --deps-mode=none 5.1/*.rock --no-manifest
42   install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
45 package_lua52-luaossl() {
46   pkgdesc="$pkgdesc for Lua 5.2"
48   cd "luaossl-rel-$pkgver"
49   luarocks install --lua-version=5.2 --tree="$pkgdir/usr/" --deps-mode=none 5.2/*.rock --no-manifest
50   install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
53 package_lua53-luaossl() {
54   pkgdesc="$pkgdesc for Lua 5.3"
56   cd "luaossl-rel-$pkgver"
57   luarocks install --lua-version=5.3 --tree="$pkgdir/usr/" --deps-mode=none 5.3/*.rock --no-manifest
58   install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"