diff options
author | Caleb Maclennan | 2020-02-12 13:22:52 +0300 |
---|---|---|
committer | Caleb Maclennan | 2020-02-12 13:22:52 +0300 |
commit | 6985843a2934315e3ecbb9f80bfc286efa2079e9 (patch) | |
tree | e2a3c99987084e8765861a12f3088ccb5f04c1f8 | |
parent | 08d86fdbd1058b325320318ab166efa4b086a954 (diff) | |
download | aur-6985843a2934315e3ecbb9f80bfc286efa2079e9.tar.gz |
Adopt, provide Lua 5.2 and 5.1 packages
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | PKGBUILD | 43 |
2 files changed, 46 insertions, 16 deletions
@@ -1,14 +1,23 @@ pkgbase = lua-std-normalize pkgdesc = Normalized Lua functions pkgver = 2.0.2 - pkgrel = 3 - url = https://github.com/lua-stdlib/normalize#normalized-lua-functions + pkgrel = 4 + url = https://github.com/lua-stdlib/normalize arch = any license = MIT - depends = lua - depends = lua-std-_debug + makedepends = luarocks source = lua-std-normalize-2.0.2.tar.gz::https://github.com/lua-stdlib/normalize/archive/v2.0.2.tar.gz - md5sums = ef79927f6d272182bf5d4fdc5e89dd8f + sha256sums = 7ca9bc7812a0581f421f29dcb996011575849e4acda3d1683aa27fe4ff8c2687 pkgname = lua-std-normalize + depends = lua + depends = lua-std-_debug + +pkgname = lua52-std-normalize + depends = lua52 + depends = lua52-std-_debug + +pkgname = lua51-std-normalize + depends = lua51 + depends = lua51-std-_debug @@ -1,19 +1,40 @@ # Maintainer: Kilian Guillaume "cafehaine" <kilian dot guillaume at gmail dot com> -pkgname=lua-std-normalize -_realname=normalize +# Maintainer: Caleb Maclennan <caleb@alerque.com> + +_rockname=std-normalize +pkgbase=lua-$_rockname +pkgname=("lua-$_rockname" "lua52-$_rockname" "lua51-$_rockname") +_pkgname=normalize pkgver=2.0.2 -pkgrel=3 +_rockrel=1 +pkgrel=4 pkgdesc="Normalized Lua functions" arch=('any') -url="https://github.com/lua-stdlib/normalize#normalized-lua-functions" +url="https://github.com/lua-stdlib/$_pkgname" license=('MIT') -depends=('lua' 'lua-std-_debug') -source=("$pkgname-$pkgver.tar.gz::https://github.com/lua-stdlib/normalize/archive/v$pkgver.tar.gz") -md5sums=('ef79927f6d272182bf5d4fdc5e89dd8f') +_lua_deps=('std-_debug') +makedepends=('luarocks') +source=("$pkgbase-$pkgver.tar.gz::https://github.com/lua-stdlib/normalize/archive/v$pkgver.tar.gz") +sha256sums=('7ca9bc7812a0581f421f29dcb996011575849e4acda3d1683aa27fe4ff8c2687') + +_package_helper() { + cd "$_pkgname-$pkgver" + luarocks --lua-version=$1 --tree="$pkgdir/usr/" make --deps-mode=none --no-manifest "${_rockname/-/.}-$pkgver-$_rockrel.rockspec" + install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} + +package_lua-std-normalize() { + depends+=('lua' "${_lua_deps[@]/#/lua-}") + _package_helper 5.3 +} + +package_lua52-std-normalize() { + depends+=('lua52' "${_lua_deps[@]/#/lua52-}") + _package_helper 5.2 +} -package() { - cd "$srcdir/$_realname-$pkgver" - install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE" - install -Dm644 lib/std/$_realname/*.lua -t "$pkgdir"/usr/lib/lua/5.3/std/$_realname/ +package_lua51-std-normalize() { + depends+=('lua51' "${_lua_deps[@]/#/lua51-}") + _package_helper 5.1 } |