summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 13c0f27519ac2222538ff4be9f59f40d0af115e7 (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: Butui Hu <hot123tea123@gmail.com>

_pkgname=KWIML
pkgname=kwiml-git
pkgver=r56.9c534d2
pkgrel=1
pkgdesc='The Kitware Information Macro Library'
arch=('any')
url='https://gitlab.kitware.com/utils/kwiml'
license=('BSD')
makedepends=(
  cmake
  git
)
provides=(kwiml)
conflicts=(kwiml)
source=("${_pkgname}::git+https://gitlab.kitware.com/utils/kwiml.git")
sha512sums=('SKIP')

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

build() {
  cmake -B build -S ${srcdir}/${_pkgname} \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release
  make -C build
}

package() {
  make -C build DESTDIR="${pkgdir}" install
  install -Dm644 "${srcdir}/${_pkgname}/Copyright.txt" -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

# vim:set ts=2 sw=2 et: