OCaml 4.14.0 rebuild
[arch-packages.git] / json-c / trunk / PKGBUILD
blobcec7aadd07aff63d033b4df5ddbdb6bda375a20d
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Geoffroy Carrier <geoffroy.carrier@koon.fr>
3 # Contributor: congyiwu <congyiwu AT gmail DOT com>
5 pkgname=json-c
6 pkgver=0.16
7 pkgrel=1
8 pkgdesc="A JSON implementation in C"
9 url="https://github.com/json-c/json-c/wiki"
10 license=(MIT)
11 arch=(x86_64)
12 depends=(glibc)
13 makedepends=(git cmake ninja)
14 provides=(libjson-c.so)
15 options=(debug)
16 _commit=2f2ddc1f2dbca56c874e8f9c31b5b963202d80e7  # tags/json-c-0.16-20220414^0
17 source=("git+https://github.com/json-c/json-c#commit=$_commit")
18 sha256sums=('SKIP')
20 pkgver() {
21   cd json-c
22   local tag="$(git describe --tags --abbrev=0)"
23   local ver="$(git describe --tags)"
24   echo "${tag%-*}${ver#$tag}" | sed 's/^json-c-//;s/[^-]*-g/r&/;s/-/+/g'
27 prepare() {
28   cd json-c
31 build() {
32   cmake -S json-c -B build -G Ninja \
33     -DCMAKE_BUILD_TYPE=None \
34     -DCMAKE_INSTALL_PREFIX=/usr \
35     -DCMAKE_INSTALL_LIBDIR=/usr/lib \
36     -DBUILD_STATIC_LIBS=OFF \
37     -DENABLE_THREADING=ON \
38     -DENABLE_RDRAND=OFF
39   cmake --build build
42 check() {
43   cmake --build build --target test
46 package() {
47   DESTDIR="$pkgdir" cmake --install build
48   install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 json-c/COPYING
51 # vim:set sw=2 et: