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

Caleb Maclennan alerque at gemini.archlinux.org
Fri Apr 22 14:53:46 UTC 2022


    Date: Friday, April 22, 2022 @ 14:53:46
  Author: alerque
Revision: 1187349

upgpkg: lua-term 0.7-8; drop CFLAGS workarounds obsoleted by luarocks 3.9.0; split build() and package() steps

Modified:
  lua-term/trunk/PKGBUILD

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

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-04-22 14:53:09 UTC (rev 1187348)
+++ PKGBUILD	2022-04-22 14:53:46 UTC (rev 1187349)
@@ -6,7 +6,7 @@
 pkgver=0.7
 _pkgver=0.07
 _rockrel=1
-pkgrel=7
+pkgrel=8
 pkgdesc='Terminal functions for Lua'
 arch=(x86_64)
 url="https://github.com/hoelzro/$pkgbase"
@@ -16,17 +16,27 @@
              lua52
              lua53
              luarocks)
+options=(debug)
 _archive="$pkgbase-$_pkgver"
-source=("$_archive.tgz::$url/archive/$_pkgver.tar.gz")
+_rock="$pkgbase-$pkgver-$_rockrel.linux-$CARCH.rock"
+_rockspec="$pkgbase-$pkgver-$_rockrel.rockspec"
+source=("$url/archive/$_pkgver/$_archive.tar.gz")
 sha256sums=('c1a1d0c57107147ea02878a50b768d1c3c13aca2769b026c5bb7a84119607f30')
 
+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
+}
+
 _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 "$pkgbase-$pkgver-$_rockrel.rockspec"
+		install --deps-mode none --no-manifest -- "lua-$1/$_rock"
 	install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" COPYING
 }
 
@@ -34,8 +44,8 @@
 	_package 5.4
 }
 
-package_lua51-term() {
-	_package 5.1
+package_lua53-term() {
+	_package 5.3
 }
 
 package_lua52-term() {
@@ -42,6 +52,6 @@
 	_package 5.2
 }
 
-package_lua53-term() {
-	_package 5.3
+package_lua51-term() {
+	_package 5.1
 }



More information about the arch-commits mailing list