2022-03-20 13:19:37 +01:00
|
|
|
#!/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"
|
|
|
|
#-----------------------------------------| DESCRIPTION |---------------------------------------
|
|
|
|
|
|
|
|
pkgname=json-c
|
2023-08-17 17:25:08 +02:00
|
|
|
pkgver=0.17
|
2022-04-16 03:33:45 +02:00
|
|
|
pkgrel=01
|
2022-03-20 13:19:37 +01:00
|
|
|
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)
|
2023-08-17 17:25:08 +02:00
|
|
|
_commit=b4c371fa0cbc4dcbaccc359ce9e957a22988fb34 # tags/json-c-0.17-20230812^0
|
2022-03-20 13:19:37 +01:00
|
|
|
source=("git+https://github.com/json-c/json-c#commit=$_commit")
|
|
|
|
|
|
|
|
pkgver() {
|
|
|
|
cd json-c
|
|
|
|
local tag="$(git describe --tags --abbrev=0)"
|
|
|
|
local ver="$(git describe --tags)"
|
2022-04-16 03:33:45 +02:00
|
|
|
echo "${tag%-*}${ver#$tag}" | sed 's/^json-c-//;s/[^-]*-g/r&/;s/-/+/g'
|
2022-03-20 13:19:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
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() {
|
2023-08-17 17:25:08 +02:00
|
|
|
cd build
|
|
|
|
ctest --output-on-failure --stop-on-failure -j$(nproc)
|
|
|
|
|
2022-03-20 13:19:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
DESTDIR="$pkgdir" cmake --install build
|
|
|
|
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 json-c/COPYING
|
|
|
|
}
|
|
|
|
|
2023-08-17 17:25:08 +02:00
|
|
|
#---- arch license gpg-key & sha256sums ----
|
|
|
|
|
|
|
|
arch=(x86_64)
|
2022-03-20 13:19:37 +01:00
|
|
|
|
|
|
|
license=(MIT)
|
|
|
|
|
|
|
|
sha256sums=(SKIP)
|
2023-08-17 17:25:08 +02:00
|
|
|
|
|
|
|
## 2d75b90af733938b77b372e8a2884d4d96d25206b691646e655ca6042ad2e459 json-c-0.17-01-x86_64.pkg.tar.lz
|
|
|
|
|