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

pkgname=libgrapheme-git
pkgver=r48.f128a91
pkgrel=1
pkgdesc="grapheme cluster utility library"
url="https://git.suckless.org/libgrapheme/log.html"
license=("ISC")
arch=("x86_64")
makedepends=("git")
provides=("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"
}