[arch-commits] Commit in (4 files)

Caleb Maclennan alerque at gemini.archlinux.org
Sat Sep 4 13:53:41 UTC 2021


    Date: Saturday, September 4, 2021 @ 13:53:41
  Author: alerque
Revision: 1011249

Migrate lua-luaepnf from AUR

Added:
  lua-luaepnf/
  lua-luaepnf/repos/
  lua-luaepnf/trunk/
  lua-luaepnf/trunk/PKGBUILD

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

Added: lua-luaepnf/trunk/PKGBUILD
===================================================================
--- lua-luaepnf/trunk/PKGBUILD	                        (rev 0)
+++ lua-luaepnf/trunk/PKGBUILD	2021-09-04 13:53:41 UTC (rev 1011249)
@@ -0,0 +1,55 @@
+# Maintainer: Caleb Maclennan <caleb at alerque.com>
+
+pkgbase=lua-luaepnf
+_rockname=${pkgbase#lua-}
+pkgname=("$pkgbase" "lua51-$_rockname" "lua52-$_rockname" "lua53-$_rockname")
+pkgver=0.3
+pkgrel=7
+_rockrel=2
+pkgdesc='Extended PEG Notation Format (easy grammars for LPeg)'
+arch=(any)
+url="https://github.com/siffiejoe/$pkgbase"
+license=(MIT)
+_luadeps=(lpeg)
+makedepends=(lua
+             lua51
+             lua52
+             lua53
+             luarocks)
+_archive="$pkgbase-$pkgver"
+_rockspec="$_rockname-$pkgver-$_rockrel.rockspec"
+source=("$_archive.tar.gz::$url/archive/v$pkgver.tar.gz"
+        "https://luarocks.org/manifests/siffiejoe/$_rockspec")
+sha256sums=('57c0ad1917e45c5677bfed0f6122da2baff98117aba05a5e987a0238600f85f9'
+            '4aa148cb1df45d83332fa2b0c7609ecb56b214c2ff13f06b62d7551e82b4154f')
+
+prepare() {
+	# Lpeg is not needed at *build* time, but `luarocks make` checks for it
+	sed -i -e '/lpeg >=/d' $_rockspec
+}
+
+_package() {
+	cd "$_archive"
+	depends=("${pkgname%-*}" "${_luadeps[@]/#/${pkgname%-*}-}")
+	provides=("${pkgname/-lua/-}=$pkgver")
+	luarocks --lua-version="$1" --tree="$pkgdir/usr/" \
+		make --deps-mode=none --no-manifest "../$_rockspec"
+	sed -ne '/^License$/,$p' README.md |
+		install -Dm0644 /dev/stdin "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md"
+}
+
+package_lua-luaepnf() {
+  _package 5.4
+}
+
+package_lua51-luaepnf() {
+  _package 5.1
+}
+
+package_lua52-luaepnf() {
+  _package 5.2
+}
+
+package_lua53-luaepnf() {
+  _package 5.3
+}



More information about the arch-commits mailing list