summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bec58b83f8c3829b45ca507f18981257766f731b (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
# Maintainer: bilabila <bilabila@qq.com>
_srcname=LuaFormatter
_pkgname=lua-format
pkgname=$_pkgname-git
pkgver=r293.29afe10
pkgrel=1
pkgdesc='LuaFormatter - Code formatter for Lua'
arch=(x86_64 aarch64)
url=https://github.com/Koihik/LuaFormatter
provides=($_pkgname $_srcname)
conflicts=($_pkgname $_srcname)
license=(Apache2)
depends=()
makedepends=(git cmake)
source=(git+https://github.com/Koihik/LuaFormatter)
sha512sums=(SKIP)
pkgver() {
  cd $_srcname
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
  cd $_srcname
  git submodule update --init
}
build() {
  cd $_srcname
  cmake -D BUILD_TESTS=OFF -D COVERAGE=OFF .
  cmake --build .
}
package() {
  install -Dm644 $_srcname/LICENSE "$pkgdir"/usr/share/licenses/$_pkgname/LICENSE
  install -Dm755 $_srcname/$_pkgname "$pkgdir"/usr/bin/$_pkgname
}