summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7d8e80aa4f1950f88ff63196efc0c705c260ed6c (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: éclairevoyant

_pkgname=yyjson
pkgname="$_pkgname-git"
pkgver=0.8.0.r17.f1867b0
pkgrel=1
pkgdesc="High performance C JSON library"
arch=(x86_64)
url="https://ibireme.github.io/yyjson/"
license=(MIT)
depends=(glibc)
makedepends=(cmake git)
provides=("$_pkgname=${pkgver%%.r*}")
conflicts=("$_pkgname")
source=("git+https://github.com/ibireme/yyjson.git")
b2sums=('SKIP')

pkgver() {
	git -C $_pkgname describe --long --tags | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g'
}

build() {
	cmake -S $_pkgname -B build \
		-DBUILD_SHARED_LIBS=ON \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=/usr/lib \

	cmake --build build
}

package() {
	make -C build DESTDIR="${pkgdir}" install
	install -vDm644 $_pkgname/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}