[arch-commits] Commit in busted/repos (community-any community-any/PKGBUILD)

Caleb Maclennan alerque at gemini.archlinux.org
Sat Dec 25 21:22:28 UTC 2021


    Date: Saturday, December 25, 2021 @ 21:22:27
  Author: alerque
Revision: 1083801

archrelease: copy trunk to community-any

Added:
  busted/repos/community-any/
  busted/repos/community-any/PKGBUILD
    (from rev 1083800, busted/trunk/PKGBUILD)

----------+
 PKGBUILD |   68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

Copied: busted/repos/community-any/PKGBUILD (from rev 1083800, busted/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD	                        (rev 0)
+++ community-any/PKGBUILD	2021-12-25 21:22:27 UTC (rev 1083801)
@@ -0,0 +1,68 @@
+# Maintainer: Caleb Maclennan <caleb at alerque.com>
+
+pkgbase=busted
+pkgname=("$pkgbase" "lua-$pkgbase" "lua53-$pkgbase" "lua52-$pkgbase" "lua51-$pkgbase")
+pkgver=2.0.0
+_rockrel=0
+pkgrel=11
+pkgdesc='Elegant Lua unit testing'
+arch=(any)
+url="https://olivinelabs.com/$pkgbase"
+license=(MIT)
+_luadeps=(cliargs
+          dkjson
+          filesystem
+          luassert
+          mediator
+          penlight
+          say
+          system
+          term)
+makedepends=(lua
+             lua51
+             lua52
+             lua53
+             luarocks)
+_archive="$pkgbase-$pkgver"
+source=("$_archive.tgz::https://github.com/Olivine-Labs/$pkgbase/archive/v$pkgver.tar.gz")
+sha256sums=('fda34db8cd10142d2a88d6df638a7d0874c295fd2bd6338c745cc546dc5847df')
+
+_package() {
+	cd "$_archive"
+	luarocks --lua-version="$1" --tree="$pkgdir/usr/" \
+		make --deps-mode=none --no-manifest "rockspecs/$_archive-$_rockrel.rockspec"
+	install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
+	if [[ $pkgname =~ lua* ]]; then
+		rm -rf "$pkgdir/usr/bin"
+	else
+		rm -rf "$pkgdir/usr/share/lua"
+		rm -rf "$pkgdir/usr/lib"
+		find "$pkgdir/usr/bin" -type f -execdir sed -i -e "s#$pkgdir##" {} \;
+	fi
+}
+
+package_busted() {
+	_package 5.4
+	pkgdesc+=' (CLI)'
+	depends=(lua "lua-$pkgname")
+}
+
+package_lua-busted() {
+	_package 5.4
+	depends=("${pkgname%-*}" "${_luadeps[@]/#/${pkgname%-*}-}")
+}
+
+package_lua51-busted() {
+	_package 5.1
+	depends=("${pkgname%-*}" "${_luadeps[@]/#/${pkgname%-*}-}")
+}
+
+package_lua52-busted() {
+	_package 5.2
+	depends=("${pkgname%-*}" "${_luadeps[@]/#/${pkgname%-*}-}")
+}
+
+package_lua53-busted() {
+	_package 5.3
+	depends=("${pkgname%-*}" "${_luadeps[@]/#/${pkgname%-*}-}")
+}



More information about the arch-commits mailing list