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

Caleb Maclennan alerque at gemini.archlinux.org
Thu Dec 30 23:02:41 UTC 2021


    Date: Thursday, December 30, 2021 @ 23:02:41
  Author: alerque
Revision: 1089021

upgpkg: lua-cliargs 3.0-7; add check() function and optdepends

Modified:
  lua-cliargs/trunk/PKGBUILD

----------+
 PKGBUILD |   17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-12-30 22:57:11 UTC (rev 1089020)
+++ PKGBUILD	2021-12-30 23:02:41 UTC (rev 1089021)
@@ -4,7 +4,7 @@
 _rockname=${pkgbase#lua-}
 pkgname=("$pkgbase" "lua51-$_rockname" "lua52-$_rockname" "lua53-$_rockname")
 pkgver=3.0
-pkgrel=6
+pkgrel=7
 _rockrel=2
 pkgdesc='A command-line argument parser'
 arch=(any)
@@ -15,16 +15,27 @@
              lua52
              lua53
              luarocks)
+checkdepends=(busted
+              lua-inifile
+              lua-yaml)
+_optdepends=('inifile: load config file from INI'
+             'yaml: load config file from YAML')
 _archive="${pkgbase/-/_}-$pkgver-$_rockrel"
-source=("$_archive.tar.gz::$url/archive/v$pkgver-$_rockrel.tar.gz")
+source=("$url/archive/v$pkgver/$_archive.tar.gz")
 sha256sums=('971d6f1440a55bdf9db581d4b2bcbf472a301d76f696a0d0ed9423957c7d176e')
 
+check() {
+	cd "$_archive"
+	busted
+}
+
 _package() {
 	cd "$_archive"
 	depends=("${pkgname%-*}")
+	optdepends=("${_optdepends[@]/#/${pkgname%-*}-}")
 	luarocks --lua-version="$1" --tree="$pkgdir/usr/" \
 		make --deps-mode=none --no-manifest "${pkgbase/-/_}-$pkgver-$_rockrel.rockspec"
-    install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
+	install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
 }
 
 package_lua-cliargs() {



More information about the arch-commits mailing list