summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9e807ce4fd92b20e81fab8598707978a216536b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Maintainer: Caleb Maclennan <caleb@alerque.com>

_rockname=path
pkgbase="lua-$_rockname"
pkgname=("lua-$_rockname" "lua53-$_rockname" "lua52-$_rockname" "lua51-$_rockname")
pkgver=0.3.1
_rockrel=1
pkgrel=4
pkgdesc='File system path manipulation library'
arch=('i686' 'x86_64')
url="https://github.com/moteus/$pkgbase"
license=('MIT')
makedepends=('lua' 'lua53' 'lua52' 'lua51' 'luarocks')
source=("$_rockname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('f7419d9012cb5005a9adbc6e567fee44832a42a73532451336de066ff2ebcce5')

_package_helper() {
  cd "$pkgbase-$pkgver"
  luarocks --lua-version="$1" --tree="$pkgdir/usr/" \
    make --deps-mode=none --no-manifest "rockspecs/$pkgbase-$pkgver-$_rockrel.rockspec"
}

package_lua-path() {
  depends+=('lua')
  _package_helper 5.4
}

package_lua53-path() {
  depends+=('lua53')
  _package_helper 5.3
}

package_lua52-path() {
  depends+=('lua52')
  _package_helper 5.2
}

package_lua51-path() {
  depends+=('lua51')
  _package_helper 5.1
}