diff options
author | Caleb Maclennan | 2020-02-06 12:00:51 +0300 |
---|---|---|
committer | Caleb Maclennan | 2020-02-06 12:00:51 +0300 |
commit | 4fd21e52f8e4d06826476a66cde982ff67b980d9 (patch) | |
tree | b74a15802f2c037455a83aed7cbe0d1a6aef9a76 | |
parent | b1f9932fff3e7209289e54df28b075c9f88bb6e4 (diff) | |
download | aur-4fd21e52f8e4d06826476a66cde982ff67b980d9.tar.gz |
Fix Lua packaging to not re-download sources
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | PKGBUILD | 38 |
2 files changed, 36 insertions, 16 deletions
@@ -1,15 +1,21 @@ pkgbase = lua-path pkgdesc = File system path manipulation library pkgver = 0.3.1 - pkgrel = 1 + pkgrel = 2 url = https://github.com/moteus/lua-path arch = i686 arch = x86_64 license = MIT makedepends = luarocks - depends = lua - source = https://luarocks.org/lua-path-0.3.1-1.rockspec - sha256sums = bde578f79d032ccda47da4d73e0633281b3e0497c54b87a8667acfc477491e50 + source = path-0.3.1.tar.gz::https://github.com/moteus/lua-path/archive/v0.3.1.tar.gz + sha256sums = f7419d9012cb5005a9adbc6e567fee44832a42a73532451336de066ff2ebcce5 pkgname = lua-path + depends = lua + +pkgname = lua52-path + depends = lua52 + +pkgname = lua51-path + depends = lua51 @@ -1,21 +1,35 @@ # Maintainer: Caleb Maclennan <caleb@alerque.com> -pkgname=lua-path +_rockname=path +_pkgname=lua-path +pkgname=("lua-$_rockname" "lua52-$_rockname" "lua51-$_rockname") pkgver=0.3.1 -_rockname=lua-path _rockrel=1 -pkgrel=1 -pkgdesc="File system path manipulation library" +pkgrel=2 +pkgdesc='File system path manipulation library' arch=('i686' 'x86_64') -url="https://github.com/moteus/lua-path" +url="https://github.com/moteus/$pkgname" license=('MIT') -depends=('lua') makedepends=('luarocks') -conflicts=() -source=("https://luarocks.org/$_rockname-$pkgver-$_rockrel.rockspec") -sha256sums=('bde578f79d032ccda47da4d73e0633281b3e0497c54b87a8667acfc477491e50') +source=("${_rockname}-${pkgver}.tar.gz::https://github.com/moteus/$_pkgname/archive/v$pkgver.tar.gz") +sha256sums=('f7419d9012cb5005a9adbc6e567fee44832a42a73532451336de066ff2ebcce5') -package() { - luarocks --tree="$pkgdir/usr" install --deps-mode=none "$_rockname-$pkgver-$_rockrel.rockspec" - find "$pkgdir/usr" -name manifest -delete +_package_helper() { + cd "$_pkgname-$pkgver" + luarocks --lua-version=$1 --tree="$pkgdir/usr/" make --deps-mode=none --no-manifest "rockspecs/$_pkgname-$pkgver-$_rockrel.rockspec" +} + +package_lua-path() { + depends+=('lua') + _package_helper 5.3 +} + +package_lua52-path() { + depends+=('lua52') + _package_helper 5.2 +} + +package_lua51-path() { + depends+=('lua51') + _package_helper 5.1 } |