summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Maclennan2022-05-07 22:02:38 +0300
committerCaleb Maclennan2022-05-07 22:02:38 +0300
commitd49367670eafb82b9527056f7a00a46d51b0ae27 (patch)
treea7df7a5fc8cacfb6e880fbfa799af54141eeca16
parentd962e8ba666472195cd3c8b70fdb34e8de09596c (diff)
downloadaur-lua-penlight-git.tar.gz
upgpkg: lua-penlight-git 1.12.0.r9.ga7b9f88-1
-rw-r--r--.SRCINFO31
-rw-r--r--PKGBUILD82
2 files changed, 50 insertions, 63 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1a74e5db5fd..afc48d3cdba 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,39 +1,24 @@
pkgbase = lua-penlight-git
pkgdesc = Lua libraries for on input data handling, functional programming, and OS interface
- pkgver = 1.9.2.r0.gce0bdba
+ pkgver = 1.12.0.r9.ga7b9f88
pkgrel = 1
- url = https://tieske.github.io/Penlight
+ url = https://github.com/lunarmodules/Penlight
arch = any
license = MIT
- checkdepends = lua-filesystem
+ makedepends = git
makedepends = lua
- makedepends = lua53
- makedepends = lua52
makedepends = lua51
- source = penlight::git+https://github.com/Tieske/Penlight.git
+ makedepends = lua52
+ makedepends = lua53
+ makedepends = luarocks
+ options = debug
+ source = penlight::git+https://github.com/lunarmodules/Penlight.git
sha256sums = SKIP
pkgname = lua-penlight-git
- depends = lua
- depends = lua-filesystem
- provides = lua-penlight
- conflicts = lua-penlight
pkgname = lua53-penlight-git
- depends = lua53
- depends = lua53-filesystem
- provides = lua53-penlight
- conflicts = lua53-penlight
pkgname = lua52-penlight-git
- depends = lua52
- depends = lua52-filesystem
- provides = lua52-penlight
- conflicts = lua52-penlight
pkgname = lua51-penlight-git
- depends = lua51
- depends = lua51-filesystem
- provides = lua51-penlight
- conflicts = lua51-penlight
-
diff --git a/PKGBUILD b/PKGBUILD
index 1486ef97178..67cf31a4479 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,63 +3,65 @@
_pkgname=penlight
pkgname=("lua-$_pkgname-git" "lua53-$_pkgname-git" "lua52-$_pkgname-git" "lua51-$_pkgname-git")
-pkgver=1.9.2.r0.gce0bdba
+pkgver=1.12.0.r9.ga7b9f88
pkgrel=1
pkgdesc='Lua libraries for on input data handling, functional programming, and OS interface'
-url='https://tieske.github.io/Penlight'
-arch=('any')
-license=('MIT')
-_lua_deps=('filesystem')
-makedepends=('lua' 'lua53' 'lua52' 'lua51')
-checkdepends=("${_lua_deps[@]/#/lua-}")
-source=("$_pkgname::git+https://github.com/Tieske/Penlight.git")
+url="https://github.com/lunarmodules/${_pkgname^}"
+arch=(any)
+license=(MIT)
+_luadeps=(filesystem)
+makedepends=(git
+ lua
+ lua51
+ lua52
+ lua53
+ luarocks)
+options=(debug)
+_rockspec="$_pkgname-dev-1.rockspec"
+_rock="${_rockspec%.rockspec}.all.rock"
+source=("$_pkgname::git+https://github.com/lunarmodules/Penlight.git")
sha256sums=('SKIP')
pkgver() {
- cd "$_pkgname"
- git describe --long --tags --abbrev=7 HEAD |
- sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+ cd "$_pkgname"
+ git describe --long --tags --abbrev=7 HEAD |
+ sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
-check() {
- cd "$_pkgname"
- export LUA_PATH="./lua/?/init.lua;./lua/?.lua;;"
- lua run.lua tests
+build() {
+ cd "$_pkgname"
+ for LUAVER in 5.{1,2,3,4}; do
+ luarocks --lua-version "$LUAVER" \
+ make --pack-binary-rock --deps-mode none -- "$_rockspec"
+ install -Dm0644 -t "lua-$LUAVER/" "$_rock"
+ done
}
-_package_helper() {
- cd "$_pkgname"
- install -Dm 644 -t "$pkgdir/usr/share/lua/$1/pl" lua/pl/*
- install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" CONTRIBUTING.md CHANGELOG.md README.md
- install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/manual/" docs/manual/*
- install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/examples/" examples/*
- install -Dm 644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE.md
+_package() {
+ cd "$_pkgname"
+ depends=("${pkgname%-*}" "${_luadeps[@]/#/${pkgname%-*}-}")
+ provides=("${pkgname/%-git}")
+ conflicts=("${pkgname/%-git}")
+ luarocks --lua-version "$1" --tree "$pkgdir/usr/" \
+ install --deps-mode none --no-manifest -- "lua-$1/$_rock"
+ install -Dm0644 -t "$pkgdir/usr/share/doc/$pkgname/" CONTRIBUTING.md CHANGELOG.md README.md
+ install -Dm0644 -t "$pkgdir/usr/share/doc/$pkgname/manual/" docs/manual/*
+ install -Dm0644 -t "$pkgdir/usr/share/doc/$pkgname/examples/" examples/*
+ install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE.md
}
package_lua-penlight-git() {
- depends+=('lua' "${_lua_deps[@]/#/lua-}")
- provides=("${pkgname/%-git}")
- conflicts=("${pkgname/%-git}")
- _package_helper 5.4
+ _package 5.4
}
-package_lua53-penlight-git() {
- depends+=('lua53' "${_lua_deps[@]/#/lua53-}")
- provides=("${pkgname/%-git}")
- conflicts=("${pkgname/%-git}")
- _package_helper 5.3
+package_lua51-penlight-git() {
+ _package 5.1
}
package_lua52-penlight-git() {
- depends+=('lua52' "${_lua_deps[@]/#/lua52-}")
- provides=("${pkgname/%-git}")
- conflicts=("${pkgname/%-git}")
- _package_helper 5.2
+ _package 5.2
}
-package_lua51-penlight-git() {
- depends+=('lua51' "${_lua_deps[@]/#/lua51-}")
- provides=("${pkgname/%-git}")
- conflicts=("${pkgname/%-git}")
- _package_helper 5.1
+package_lua53-penlight-git() {
+ _package 5.3
}