summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fa3cb057041099b4abecd57b2442eff35d03c3f6 (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
42
43
44
45
46
47
48
49
# Maintainer: kotontrion <kotontrion@tutanota.de>
pkgbase=libastal-lua-git
pkgname=("libastal-lua-git" "libastal-lua51-git" "libastal-lua53-git")
pkgver=r580.d538d8e
pkgrel=1
pkgdesc="Lua bindings for libastal."
arch=("x86_64")
license=(LGPL-2.1-only)
url="https://github.com/Aylur/astal"
makedepends=(
  "git"
  "lua-lgi" "lua51" "lua51-lgi" "lua53" "lua53-lgi"
  "luarocks")
depends=("libastal-git" "libastal-4-git")
groups=("libastal")
provides=(libastal-lua)
source=("git+${url}.git")
sha256sums=('SKIP')
_rockname=astal-dev-1.rockspec

pkgver(){
  cd astal
  # git describe --long --tags --abbrev=7 | sed "s/^v//;s/\([^-]*-g\)/r\1/;s/-/./g"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

_package_lua() {
  cd astal/lang/lua
	luarocks --lua-version $1 --tree "$pkgdir/usr/" \
		make --deps-mode none --no-manifest -- "$_rockname"
}

package_libastal-lua-git() {
	depends=("lua" "lua-lgi")
  pkgdesc="lua bindings for libstal."
  _package_lua 5.4
}

package_libastal-lua51-git() {
	depends=("lua51" "lua51-lgi")
  pkgdesc="lua bindings for libstal."
  _package_lua 5.1
}

package_libastal-lua53-git() {
	depends=("lua53" "lua53-lgi")
  pkgdesc="lua bindings for libstal."
  _package_lua 5.3
}