jobcore/json-c/PKGBUILD
2024-07-05 01:29:03 +03:00

64 lines
1.7 KiB
Bash

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=json-c
pkgver=0.17
_tagdate=20230812
pkgrel=02
pkgdesc="A JSON implementation in C"
url="https://github.com/json-c/json-c/wiki"
depends=(glibc)
makedepends=(git cmake ninja)
provides=(libjson-c.so)
#options=(debug)
#_commit=b4c371fa0cbc4dcbaccc359ce9e957a22988fb34 # tags/json-c-0.17-20230812^0
#source=("git+https://github.com/json-c/json-c#commit=$_commit")
source=("git+https://github.com/json-c/json-c#tag=json-c-$pkgver-$_tagdate")
#pkgver() {
# cd json-c
# local tag="$(git describe --tags --abbrev=0)"
# local ver="$(git describe --tags)"
# echo "${tag%-*}${ver#$tag}" | sed 's/^json-c-//;s/[^-]*-g/r&/;s/-/+/g'
#}
prepare() {
cd json-c
}
build() {
cmake -S json-c -B build -G Ninja \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
-DBUILD_STATIC_LIBS=OFF \
-DENABLE_THREADING=ON \
-DENABLE_RDRAND=OFF
cmake --build build
}
check() {
# cd build
# ctest --output-on-failure --stop-on-failure -j$(nproc)
ctest --test-dir build --output-on-failure --stop-on-failure -j$(nproc)
}
package() {
DESTDIR="$pkgdir" cmake --install build
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 json-c/COPYING
}
#---- arch license gpg-key & sha256sums ----
arch=(x86_64)
license=(MIT)
sha256sums=(SKIP)
## 1717962f6d984071b48415ec767b506aef784a092d4a7fd5b02c6d26ebb99e12 json-c-0.17-02-x86_64.pkg.tar.lz