summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cb66d7edb9caf8b9307cf45c781927ab32c1afc8 (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
# Maintainer: aksr <aksr at t-com dot me>
# Maintainer: Caleb Maclennan <caleb@alerque.com

pkgname=grcompiler-git
pkgver=5.2
pkgrel=1
pkgdesc='The SIL Graphite compiler'
arch=('x86_64' 'i686')
url="https://github.com/silnrsi/${pkgname%-git}"
license=('CPL' 'LGPL')
depends=('icu')
makedepends=('cmake' 'docbook-utils' 'git' 'perl-sgmls')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("$pkgname::git+$url.git")
sha256sums=('SKIP')

pkgver() {
  cd "$pkgname"
  git describe --tags --abbrev=7 --match="v*" HEAD |
    sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "$pkgname"
  cmake -S . -B build \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=/usr
  make -C build
}

package() {
  cd "$pkgname"
  make -C build DESTDIR="$pkgdir" install
  install -Dm0644 -t "$pkgdir/usr/share/doc/${pkgname%-git}/" README.md
  install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" license/*.txt
}