json-c 0.17-1

This commit is contained in:
xhaa123 2024-10-15 23:41:55 +08:00
commit 1e2e8c4d38

34
PKGBUILD Normal file
View File

@ -0,0 +1,34 @@
# Maintainer: Future Linux Team <futurelinux@163.com>
pkgname=json-c
pkgver=0.17
pkgrel=1
pkgdesc="A JSON implementation in C"
arch=('x86_64')
url="https://github.com/json-c/json-c/wiki"
license=('MIT')
depends=('glibc')
makedepends=('cmake' 'ninja')
source=(https://s3.amazonaws.com/json-c_releases/releases/${pkgname}-${pkgver}.tar.gz)
sha256sums=(7550914d58fb63b2c3546f3ccfbe11f1c094147bd31a69dcd23714d7956159e6)
build() {
cd ${pkgname}-${pkgver}
CC=${CHOST}-gcc CXX=${CHOST}-g++ \
cmake -B build -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=/usr/lib64 \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_STATIC_LIBS=OFF \
-DCMAKE_SYSTEM_NAME=Linux \
-DCMAKE_HOST_SYSTEM_NAME=Linux
cmake --build build
}
package() {
cd ${pkgname}-${pkgver}
DESTDIR=${pkgdir} cmake --install build
}