Skip to content
Snippets Groups Projects
Commit 50448340 authored by Caleb Maclennan's avatar Caleb Maclennan
Browse files

Migrate lua-repl from AUR (as luarepl)

parents
Branches master
No related tags found
No related merge requests found
PKGBUILD 0 → 100644
# Maintainer: Caleb Maclennan <caleb@alerque.com>
pkgbase=lua-luarepl
_rockname=${pkgbase#lua-}
pkgname=("$pkgbase" "lua51-$_rockname" "lua52-$_rockname" "lua53-$_rockname")
pkgver=0.9
_rockrel=1
pkgrel=6
pkgdesc='A reusable REPL component for Lua, written in Lua'
arch=(any)
url="https://github.com/hoelzro/${pkgbase/-lua/-}"
license=(MIT)
depends=(bash)
makedepends=(lua
lua51
lua52
lua53
luarocks)
_archive="${pkgbase/-lua/-}-$pkgver"
source=("$_archive.tar.gz::$url/archive/$pkgver.tar.gz")
sha256sums=('3c88a3b102a4a4897c46fadb2cd12ee6760438e41e39ffc6cf353582d651b313')
_package() {
cd "$_archive"
depends+=("${pkgname%-*}")
provides=("${pkgname/-lua/-}=$pkgver")
replaces=("${pkgname/-lua/-}")
optdepends=("${pkgname%-*}-filesystem: Enable filename_completion plugin")
luarocks --lua-version="$1" --tree="$pkgdir/usr/" \
make --deps-mode=none --no-manifest "$_rockname-$pkgver-$_rockrel.rockspec"
sed -i -e "s#$pkgdir##" "$pkgdir/usr/bin/rep.lua"
sed -i -e "1s/lua/${pkgname%-*}/" "$pkgdir/usr/lib/luarocks/rocks-$1/$_rockname/$pkgver-$_rockrel/bin/rep.lua"
install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" COPYING
[[ ${pkgname%-*} == lua ]] || mv "$pkgdir"/usr/bin/rep.{lua,${pkgname%-*}}
}
package_lua-luarepl() {
_package 5.4
}
package_lua51-luarepl() {
_package 5.1
}
package_lua52-luarepl() {
_package 5.2
}
package_lua53-luarepl() {
_package 5.3
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment