Created
October 20, 2019 13:41
-
-
Save daurnimator/71a6a5540d63530efc34fea342425b99 to your computer and use it in GitHub Desktop.
luarocks draft makepkg-template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkgname=("lua-$_rockname" "lua51-$_rockname" "lua52-$_rockname") | |
makedepends+=('luarocks' 'lua' 'lua51' 'lua52') | |
build() { | |
for lua_ver in 5.1 5.2 5.3; do | |
mkdir -p "$lua_ver" | |
(cd "$lua_ver"; luarocks build --pack-binary-rock --lua-version="$lua_ver" --deps-mode=none --no-manifest "$_rockname"-"$pkgver"-*.rockspec) | |
done | |
} | |
check() { | |
luarocks test "$_rockspec" | |
} | |
package_lua51-"$_rockname" { | |
pkgdesc="$pkgdesc for Lua 5.1" | |
luarocks install --lua-version=5.1 --tree="$pkgdir/usr/" --deps-mode=none 5.1/*.rock | |
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE | |
} | |
package_lua52-"$_rockname" { | |
pkgdesc="$pkgdesc for Lua 5.2" | |
luarocks install --lua-version=5.2 --tree="$pkgdir/usr/" --deps-mode=none 5.2/*.rock | |
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE | |
} | |
package_lua-"$_rockname" { | |
pkgdesc="$pkgdesc for Lua 5.3" | |
luarocks install --lua-version=5.3 --tree="$pkgdir/usr/" --deps-mode=none 5.3/*.rock | |
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment