diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 38 |
1 files changed, 26 insertions, 12 deletions
@@ -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 } |