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

Caleb Maclennan alerque at gemini.archlinux.org
Sat Sep 4 16:56:09 UTC 2021


    Date: Saturday, September 4, 2021 @ 16:56:09
  Author: alerque
Revision: 1011363

archrelease: copy trunk to community-any

Added:
  lua-cosmo/repos/community-any/
  lua-cosmo/repos/community-any/PKGBUILD
    (from rev 1011362, lua-cosmo/trunk/PKGBUILD)

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

Copied: lua-cosmo/repos/community-any/PKGBUILD (from rev 1011362, lua-cosmo/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD	                        (rev 0)
+++ community-any/PKGBUILD	2021-09-04 16:56:09 UTC (rev 1011363)
@@ -0,0 +1,54 @@
+# Maintainer: Caleb Maclennan <caleb at alerque.com>
+
+pkgbase=lua-cosmo
+_rockname=${pkgbase#lua-}
+pkgname=("$pkgbase" "lua51-$_rockname" "lua52-$_rockname" "lua53-$_rockname")
+pkgver=16.06.04
+pkgrel=5
+_rockrel=1
+pkgdesc='Safe templates for Lua'
+arch=(any)
+url="https://github.com/mascarenhas/$_rockname"
+license=(MIT)
+_luadeps=(lpeg)
+makedepends=(lua
+             lua51
+             lua52
+             lua53
+             luarocks)
+_archive="$_rockname-$pkgver"
+_rockspec="$_rockname-$pkgver-$_rockrel.rockspec"
+source=("$_archive.tar.gz::$url/archive/v$pkgver.tar.gz")
+sha256sums=('86d17aea5080a90671d965cffeb9b104c19e0e1ea55c08687c0924c4512b52b1')
+
+prepare() {
+	cd "$_archive"
+	# Lpeg is not needed at *build* time, but `luarocks make` checks for it
+	# and depends=() is set at package time too late for makepkg to install it
+	sed -i -e '/lpeg >=/d' "rockspec/$_rockspec"
+}
+
+_package() {
+	cd "$_archive"
+	depends=("${pkgname%-*}" "${_luadeps[@]/#/${pkgname%-*}-}")
+	luarocks --lua-version="$1" --tree="$pkgdir/usr/" \
+		make --deps-mode=none --no-manifest "rockspec/$_rockspec"
+	sed -ne '/license/p' rockspec/$_rockspec |
+		install -Dm0644 /dev/stdin "$pkgdir/usr/share/licenses/$pkgname/LICENSE.lua"
+}
+
+package_lua-cosmo() {
+	_package 5.4
+}
+
+package_lua51-cosmo() {
+	_package 5.1
+}
+
+package_lua52-cosmo() {
+	_package 5.2
+}
+
+package_lua53-cosmo() {
+	_package 5.3
+}



More information about the arch-commits mailing list