summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1ce66440deaeb4a8cca4a66d6e7a3e6e75b42b7f (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: George Rawlinson <grawlinson@archlinux.org>

pkgname=zycore-c
pkgver=1.4.1
pkgrel=1
pkgdesc='Zyan Core Library for C'
arch=('x86_64')
url='https://github.com/zyantific/zycore-c'
license=('MIT')
depends=('glibc')
makedepends=('git' 'cmake')
_commit='1401fb85ac313f6605ec795c52bf99ea3f292a69'
source=("$pkgname::git+$url.git#commit=$_commit")
b2sums=('SKIP')

pkgver() {
  cd "$pkgname"

  git describe --tags | sed 's/^v//'
}

prepare() {
  cmake \
    -S "$pkgname" \
    -B build \
    -D CMAKE_INSTALL_PREFIX=/usr \
    -D ZYCORE_BUILD_SHARED_LIB=ON
}

build() {
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build

  install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" "$pkgname/LICENSE"
}