upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / lua-linenoise / repos / community-x86_64 / PKGBUILD
blob6f494a13bc8f7e1515afa5d33760d5ef21d87521
1 # Maintainer: Caleb Maclennan <caleb@alerque.com>
2 # Contributor: wenLiangcan <boxeed at gmail dot com>
4 pkgbase=lua-linenoise
5 _rockname=${pkgbase#lua-}
6 pkgname=("$pkgbase" "lua51-$_rockname" "lua52-$_rockname" "lua53-$_rockname")
7 pkgver=0.9
8 pkgrel=8
9 _rockrel=1
10 pkgdesc='A binding for the linenoise command line library'
11 arch=(x86_64)
12 url="https://github.com/hoelzro/$pkgbase"
13 license=(MIT)
14 makedepends=(lua
15              lua51
16              lua52
17              lua53
18              luarocks)
19 options=(debug)
20 _archive="$pkgbase-$pkgver"
21 _rock="$_rockname-$pkgver-$_rockrel.linux-$CARCH.rock"
22 _rockspec="$_rockname-$pkgver-$_rockrel.rockspec"
23 source=("$_archive.tar.gz::$url/archive/$pkgver.tar.gz")
24 sha256sums=('cc1cdb4047edd056a10dcdeec853dbaf5088e2202941d579e4592584d733f09c')
26 build() {
27         cd "$_archive"
28         for LUAVER in 5.{1,2,3,4}; do
29                 luarocks --lua-version "$LUAVER" \
30                         make --pack-binary-rock --deps-mode none -- "$_rockspec"
31                 install -Dm0644 -t "lua-$LUAVER/" "$_rock"
32         done
35 _package() {
36         cd "$_archive"
37         depends=("${pkgname%-*}")
38         luarocks --lua-version "$1" --tree "$pkgdir/usr/" \
39                 install --deps-mode none --no-manifest -- "lua-$1/$_rock"
40         install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" COPYING
43 package_lua-linenoise() {
44   _package 5.4
47 package_lua51-linenoise() {
48   _package 5.1
51 package_lua52-linenoise() {
52   _package 5.2
55 package_lua53-linenoise() {
56   _package 5.3