Package Details: lua-ansicolors 1.0.2-1

Git Clone URL: https://aur.archlinux.org/lua-ansicolors.git (read-only, click to copy)
Package Base: lua-ansicolors
Description: ANSI terminal color manipulation module for Lua 5.3
Upstream URL: https://github.com/kikito/ansicolors.lua
Keywords: ANSI colors Lua
Licenses: MIT
Submitter: ragouel
Maintainer: None
Last Packager: ragouel
Votes: 0
Popularity: 0.000000
First Submitted: 2020-04-28 05:57 (UTC)
Last Updated: 2020-05-13 16:07 (UTC)

Dependencies (1)

Required by (1)

Sources (1)

Latest Comments

Freed commented on 2023-03-31 02:43 (UTC) (edited on 2023-07-31 14:01 (UTC) by Freed)

Why not add lua5.4?

diff --git a/PKGBUILD b/PKGBUILD
index 9c29f2f..af9cbde 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
 # Maintainer: Dimitris Kiziridis <ragouel at outlook dot com>

-pkgname=('lua-ansicolors' 'lua51-ansicolors' 'lua52-ansicolors')
+pkgname=('lua-ansicolors' 'lua51-ansicolors' 'lua52-ansicolors' 'lua53-ansicolors')
 _rockname=ansicolors
 _rockver=1.0
 pkgver=1.0.2
@@ -20,7 +20,7 @@ prepare() {
 }

 build() {
-  mkdir -p 5.1 5.2 5.3
+  mkdir -p 5.1 5.2 5.3 5.4

   # Build for 5.1
   (cd 5.1; luarocks build --pack-binary-rock --lua-version=5.1 --deps-mode=none ../"${_rockname}.lua-$pkgver/${_rockname}-${_rockver}-1.rockspec")
@@ -28,17 +28,19 @@ build() {
   (cd 5.2; luarocks build --pack-binary-rock --lua-version=5.2 --deps-mode=none ../"${_rockname}.lua-$pkgver/${_rockname}-${_rockver}-1.rockspec")
   # Build for 5.3
   (cd 5.3; luarocks build --pack-binary-rock --lua-version=5.3 --deps-mode=none ../"${_rockname}.lua-$pkgver/${_rockname}-${_rockver}-1.rockspec")
+  # Build for 5.4
+  (cd 5.4; luarocks build --pack-binary-rock --lua-version=5.3 --deps-mode=none ../"${_rockname}.lua-$pkgver/${_rockname}-${_rockver}-1.rockspec")
 }

 package_lua-ansicolors() {
   pkgdesc='ANSI terminal color manipulation module for Lua 5.3'

-  luarocks install --lua-version=5.3 --tree="$pkgdir/usr/" --deps-mode=none 5.3/${_rockname}-${_rockver}-1.all.rock
+  luarocks install --lua-version=5.4 --tree="$pkgdir/usr/" --deps-mode=none 5.4/${_rockname}-${_rockver}-1.all.rock

   install -Dm644 "${srcdir}/${_rockname}.lua-${pkgver}/COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

   # remove luarocks-created root manifest
-  rm "$pkgdir/usr/lib/luarocks/rocks-5.3/manifest"
+  rm "$pkgdir/usr/lib/luarocks/rocks-5.4/manifest"
 }

 package_lua51-ansicolors() {
@@ -61,4 +63,15 @@ package_lua52-ansicolors() {

   # remove luarocks-created root manifest
   rm "$pkgdir/usr/lib/luarocks/rocks-5.2/manifest"
-}
\ No newline at end of file
+}
+
+package_lua53-ansicolors() {
+  pkgdesc='ANSI terminal color manipulation module for Lua 5.3'
+
+  luarocks install --lua-version=5.3 --tree="$pkgdir/usr/" --deps-mode=none 5.3/${_rockname}-${_rockver}-1.all.rock
+
+  install -Dm644 "${srcdir}/${_rockname}.lua-${pkgver}/COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+  # remove luarocks-created root manifest
+  rm "$pkgdir/usr/lib/luarocks/rocks-5.3/manifest"
+}