summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 337ce601b9e7b5bc95b5e458a236a8dfefad093d (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
# Maintainer: Harry Jeffery <me@harry.pm>

pkgname=libgrapheme-git
pkgver=r87.39d896e
pkgrel=1
pkgdesc="grapheme cluster utility library"
url="https://libs.suckless.org/libgrapheme/"
license=("ISC")
arch=("x86_64")
makedepends=("git")
provides=("libgrapheme")
conflicts=("libgrapheme")
source=("libgrapheme-git::git://git.suckless.org/libgrapheme")
sha256sums=("SKIP")

pkgver() {
  cd "${pkgname}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "${pkgname}"
  make PREFIX=/usr all
}

check() {
  cd "${pkgname}"
  make PREFIX=/usr test
}

package() {
  cd "${pkgname}"
  make PREFIX=/usr DESTDIR="$pkgdir" install
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}