summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 41682a61b9a7f13d0169708ffd818c9c290b72b9 (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
# 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)"
}

prepare() {
  cd "${pkgname}"
  sed -i 's|/usr/local|/usr|' config.mk
}

build() {
  cd "${pkgname}"
  make all
}

check() {
  cd "${pkgname}"
  make test
}

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