[arch-commits] Commit in lua-luaossl/trunk (PKGBUILD)

Daurnimator daurnimator at archlinux.org
Fri Feb 5 13:48:51 UTC 2021


    Date: Friday, February 5, 2021 @ 13:48:51
  Author: daurnimator
Revision: 846042

Use luarocks build system

Modified:
  lua-luaossl/trunk/PKGBUILD

----------+
 PKGBUILD |   53 +++++++++++++++++++++++++++++++----------------------
 1 file changed, 31 insertions(+), 22 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-02-05 13:34:53 UTC (rev 846041)
+++ PKGBUILD	2021-02-05 13:48:51 UTC (rev 846042)
@@ -2,49 +2,58 @@
 
 pkgname=(lua-luaossl lua51-luaossl lua52-luaossl lua53-luaossl)
 pkgver=20200709
-pkgrel=1
+pkgrel=2
 pkgdesc='Most comprehensive OpenSSL module in the Lua universe'
 arch=('x86_64')
 url='http://25thandclement.com/~william/projects/luaossl.html'
 license=('MIT')
-makedepends=('lua' 'lua51' 'lua52' 'lua53')
+makedepends=('luarocks' 'lua' 'lua51' 'lua52' 'lua53')
 depends=('openssl')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/wahern/luaossl/archive/rel-$pkgver.tar.gz")
-sha256sums=('f3054e1ce26ca65ecaa7dcf193ea97d6a06933e4aa516779ebb89a6727d8a28f')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/wahern/luaossl/archive/rel-$pkgver.tar.gz"
+      "https://luarocks.org/manifests/daurnimator/luaossl-$pkgver-0.rockspec")
+sha256sums=('f3054e1ce26ca65ecaa7dcf193ea97d6a06933e4aa516779ebb89a6727d8a28f'
+            'c31532910df32a986d38e72976a9d36a3b48bc5883a8cfac920427c27eeefd47')
 
 build() {
-	cd "luaossl-rel-$pkgver"
-	make prefix=/usr
+  cd "luaossl-rel-$pkgver"
+  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" \
+      ../luaossl-"$pkgver"-0.rockspec
+    mv luaossl-"$pkgver"-0.*.rock "$v/"
+  done
 }
 
 package_lua-luaossl() {
-	pkgdesc='Most comprehensive OpenSSL module in the Lua universe for Lua 5.4'
+  pkgdesc="$pkgdesc for Lua 5.4"
 
-	cd "luaossl-rel-$pkgver"
-	make DESTDIR="$pkgdir" prefix=/usr install5.4
-	install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+  cd "luaossl-rel-$pkgver"
+  luarocks install --lua-version=5.4 --tree="$pkgdir/usr/" --deps-mode=none 5.4/*.rock --no-manifest
+  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 }
 
 package_lua51-luaossl() {
-	pkgdesc='Most comprehensive OpenSSL module in the Lua universe for Lua 5.1'
+  pkgdesc="$pkgdesc for Lua 5.1"
 
-	cd "luaossl-rel-$pkgver"
-	make DESTDIR="$pkgdir" prefix=/usr install5.1
-	install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+  cd "luaossl-rel-$pkgver"
+  luarocks install --lua-version=5.1 --tree="$pkgdir/usr/" --deps-mode=none 5.1/*.rock --no-manifest
+  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 }
 
 package_lua52-luaossl() {
-	pkgdesc='Most comprehensive OpenSSL module in the Lua universe for Lua 5.2'
+  pkgdesc="$pkgdesc for Lua 5.2"
 
-	cd "luaossl-rel-$pkgver"
-	make DESTDIR="$pkgdir" prefix=/usr install5.2
-	install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+  cd "luaossl-rel-$pkgver"
+  luarocks install --lua-version=5.2 --tree="$pkgdir/usr/" --deps-mode=none 5.2/*.rock --no-manifest
+  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 }
 
 package_lua53-luaossl() {
-	pkgdesc='Most comprehensive OpenSSL module in the Lua universe for Lua 5.3'
+  pkgdesc="$pkgdesc for Lua 5.3"
 
-	cd "luaossl-rel-$pkgver"
-	make DESTDIR="$pkgdir" prefix=/usr install5.3
-	install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+  cd "luaossl-rel-$pkgver"
+  luarocks install --lua-version=5.3 --tree="$pkgdir/usr/" --deps-mode=none 5.3/*.rock --no-manifest
+  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 }


More information about the arch-commits mailing list