[arch-commits] Commit in luasec/trunk (PKGBUILD)
Daurnimator
daurnimator at archlinux.org
Sun May 2 14:34:32 UTC 2021
Date: Sunday, May 2, 2021 @ 14:34:32
Author: daurnimator
Revision: 926154
upgpkg: luasec 2:1.0.1-1
Modified:
luasec/trunk/PKGBUILD
----------+
PKGBUILD | 62 +++++++++++++++++++++++++------------------------------------
1 file changed, 26 insertions(+), 36 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2021-05-02 14:25:14 UTC (rev 926153)
+++ PKGBUILD 2021-05-02 14:34:32 UTC (rev 926154)
@@ -6,76 +6,66 @@
pkgbase=luasec
pkgname=(lua-sec lua51-sec lua52-sec lua53-sec)
epoch=2
-pkgver=0.9
-pkgrel=2
-pkgdesc='Lua bindings for OpenSSL library to provide TLS/SSL communication.'
+pkgver=1.0.1
+pkgrel=1
+pkgdesc='Lua bindings for OpenSSL library to provide TLS/SSL communication'
arch=('x86_64')
url='https://github.com/brunoos/luasec/wiki'
license=('MIT')
-makedepends=('openssl'
- 'lua'
- 'lua-socket'
- 'lua51'
- 'lua51-socket'
- 'lua52'
- 'lua52-socket'
- 'lua53'
- 'lua53-socket')
+makedepends=('luarocks'
+ 'lua51' 'lua52' 'lua53' 'lua') # https://github.com/luarocks/luarocks/issues/1275
depends=('openssl')
source=("$pkgbase-v$pkgver.tar.gz"::"https://github.com/brunoos/luasec/archive/v$pkgver.tar.gz")
-sha512sums=('ea601016328232ca0ff12be72897eeedac88a78834a63e1c36d2828a3187039665a2c60597b5af1fa6917b6fe87cd292fbcdfabcd67bab968f587e038d52a933')
+sha512sums=('21ae200e40f13a35eebca95cdac25ae13532a3008b2f9ec97a079033b9efde69e81954354453623eb77340368f482d3c69adb26881a6c0d7c4897df31301af93')
-prepare() {
- cp -a luasec-$pkgver luasec-$pkgver-51
- cp -a luasec-$pkgver luasec-$pkgver-52
- cp -a luasec-$pkgver luasec-$pkgver-53
-}
-
build() {
- cd "$srcdir"/luasec-$pkgver-51
- make linux INC_PATH=-I/usr/include/lua5.1
+ cd "luasec-$pkgver"
- cd "$srcdir"/luasec-$pkgver-52
- make linux INC_PATH=-I/usr/include/lua5.2
-
- cd "$srcdir"/luasec-$pkgver-53
- make linux INC_PATH=-I/usr/include/lua5.3
-
- cd "$srcdir"/luasec-$pkgver
- make linux
+ for v in 5.1 5.2 5.3 5.4; do
+ mkdir -p "$v/"
+ luarocks make --pack-binary-rock --lua-version="$v" --deps-mode=none \
+ CFLAGS="$CPPFLAGS $CFLAGS -fPIC" \
+ LIBFLAG="$LDFLAGS -shared" \
+ luasec-"$pkgver"-1.rockspec
+ mv luasec-"$pkgver"-1.*.rock "$v/"
+ done
}
package_lua51-sec() {
+ pkgdesc="$pkgdesc for Lua 5.1"
depends+=('lua51-socket')
conflicts=('luasec')
replaces=('luasec')
- cd "luasec-$pkgver-51"
- make LUACPATH="$pkgdir/usr/lib/lua/5.1" LUAPATH="$pkgdir/usr/share/lua/5.1" install
+ cd "luasec-$pkgver"
+ luarocks install --lua-version=5.1 --tree="$pkgdir/usr/" --deps-mode=none --no-manifest 5.1/*.rock
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
package_lua52-sec() {
+ pkgdesc="$pkgdesc for Lua 5.2"
depends+=('lua52-socket')
- cd "luasec-$pkgver-52"
- make LUACPATH="$pkgdir/usr/lib/lua/5.2" LUAPATH="$pkgdir/usr/share/lua/5.2" install
+ cd "luasec-$pkgver"
+ luarocks install --lua-version=5.2 --tree="$pkgdir/usr/" --deps-mode=none --no-manifest 5.2/*.rock
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
package_lua53-sec() {
+ pkgdesc="$pkgdesc for Lua 5.3"
depends+=('lua53-socket')
- cd "luasec-$pkgver-53"
- make LUACPATH="$pkgdir/usr/lib/lua/5.3" LUAPATH="$pkgdir/usr/share/lua/5.3" install
+ cd "luasec-$pkgver"
+ luarocks install --lua-version=5.3 --tree="$pkgdir/usr/" --deps-mode=none --no-manifest 5.3/*.rock
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
package_lua-sec() {
+ pkgdesc="$pkgdesc for Lua 5.4"
depends+=('lua-socket')
cd "luasec-$pkgver"
- make LUACPATH="$pkgdir/usr/lib/lua/5.4" LUAPATH="$pkgdir/usr/share/lua/5.4" install
+ luarocks install --lua-version=5.4 --tree="$pkgdir/usr/" --deps-mode=none --no-manifest 5.4/*.rock
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
More information about the arch-commits
mailing list