[arch-commits] Commit in lua-luaepnf/repos (community-any community-any/PKGBUILD)
Caleb Maclennan
alerque at gemini.archlinux.org
Sat Sep 4 14:02:29 UTC 2021
Date: Saturday, September 4, 2021 @ 14:02:29
Author: alerque
Revision: 1011261
archrelease: copy trunk to community-any
Added:
lua-luaepnf/repos/community-any/
lua-luaepnf/repos/community-any/PKGBUILD
(from rev 1011260, lua-luaepnf/trunk/PKGBUILD)
----------+
PKGBUILD | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
Copied: lua-luaepnf/repos/community-any/PKGBUILD (from rev 1011260, lua-luaepnf/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD (rev 0)
+++ community-any/PKGBUILD 2021-09-04 14:02:29 UTC (rev 1011261)
@@ -0,0 +1,57 @@
+# 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() {
+ 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 -e '/lpeg >=/d' "../$_rockspec" > "$_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