json-c/PKGBUILD

41 lines
1.3 KiB
Bash
Raw Permalink Normal View History

2024-10-15 23:43:10 +08:00
# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.
2024-10-15 23:41:55 +08:00
2024-10-15 23:43:10 +08:00
# Maintainer: Future Linux Team <future_linux@163.com>
2024-10-15 23:41:55 +08:00
pkgname=json-c
2024-11-03 22:14:49 +08:00
pkgver=0.18
2024-10-15 23:41:55 +08:00
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)
2024-11-03 22:14:49 +08:00
sha256sums=(876ab046479166b869afc6896d288183bbc0e5843f141200c677b3e8dfb11724)
2024-10-15 23:41:55 +08:00
build() {
2024-11-03 22:14:49 +08:00
cd ${pkgname}-${pkgver}
2024-10-15 23:41:55 +08:00
2024-11-03 22:14:49 +08:00
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 \
-DENABLE_THREADING=ON \
-DENABLE_RDRAND=OFF \
-DCMAKE_SYSTEM_NAME=Linux \
-DCMAKE_HOST_SYSTEM_NAME=Linux
2024-10-15 23:41:55 +08:00
2024-11-03 22:14:49 +08:00
cmake --build build
2024-10-15 23:41:55 +08:00
}
package() {
2024-11-03 22:14:49 +08:00
cd ${pkgname}-${pkgver}
2024-10-15 23:41:55 +08:00
2024-11-03 22:14:49 +08:00
DESTDIR=${pkgdir} cmake --install build
2024-10-15 23:41:55 +08:00
}