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

Caleb Maclennan alerque at gemini.archlinux.org
Fri Apr 22 15:13:11 UTC 2022


    Date: Friday, April 22, 2022 @ 15:13:10
  Author: alerque
Revision: 1187353

upgpkg: lua-system 0.2.1-9; drop CFLAGS workarounds obsoleted by luarocks 3.9.0; split build() and package() steps

Modified:
  lua-system/trunk/PKGBUILD

----------+
 PKGBUILD |   28 +++++++++++++++++++---------
 1 file changed, 19 insertions(+), 9 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-04-22 15:03:25 UTC (rev 1187352)
+++ PKGBUILD	2022-04-22 15:13:10 UTC (rev 1187353)
@@ -5,7 +5,7 @@
 pkgname=("$pkgbase" "lua51-$_rockname" "lua52-$_rockname" "lua53-$_rockname")
 pkgver=0.2.1
 _rockrel=0
-pkgrel=8
+pkgrel=9
 pkgdesc='Platform independent system calls for Lua'
 arch=(x86_64 i686)
 url="https://github.com/o-lim/${pkgbase/-/}"
@@ -16,10 +16,22 @@
              lua53
              luarocks)
 checkdepends=(busted)
+options=(debug)
 _archive="${pkgbase/-/}-$pkgver"
+_rock="$_archive-$_rockrel.linux-$CARCH.rock"
+_rockspec="$_archive-$_rockrel.rockspec"
 source=("$url/archive/v$pkgver/$_archive.tar.gz")
 sha256sums=('0b83f68e9edbba92bef11ec0ccf1e5bb779a7337653f7bb77e0240c8e85c0b94')
 
+build() {
+	cd "$_archive"
+	for LUAVER in 5.{1,2,3,4}; do
+		luarocks --lua-version "$LUAVER" \
+			make --pack-binary-rock --deps-mode none -- "$_rockspec"
+		install -Dm0644 -t "lua-$LUAVER/" "$_rock"
+	done
+}
+
 check() {
 	cd "$_archive"
 	busted
@@ -28,10 +40,8 @@
 _package() {
 	cd "$_archive"
 	depends=("${pkgname%-*}")
-	luarocks --lua-version="$1" --tree="$pkgdir/usr/" \
-		CFLAGS="$CPPFLAGS $CFLAGS -fPIC" \
-		LIBFLAG="$LDFLAGS -shared" \
-		make --deps-mode=none --no-manifest "$_archive-$_rockrel.rockspec"
+	luarocks --lua-version "$1" --tree "$pkgdir/usr/" \
+		install --deps-mode none --no-manifest -- "lua-$1/$_rock"
 	install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
 }
 
@@ -39,8 +49,8 @@
 	_package 5.4
 }
 
-package_lua51-system() {
-	_package 5.1
+package_lua53-system() {
+	_package 5.3
 }
 
 package_lua52-system() {
@@ -47,6 +57,6 @@
 	_package 5.2
 }
 
-package_lua53-system() {
-	_package 5.3
+package_lua51-system() {
+	_package 5.1
 }



More information about the arch-commits mailing list