mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-06-04 12:26:24 +02:00
52 lines
1.6 KiB
Text
52 lines
1.6 KiB
Text
# Contributor: Grigory Kirillov <txgk@bk.ru>
|
|
# Maintainer: Celeste <cielesti@protonmail.com>
|
|
maintainer="Celeste <cielesti@protonmail.com>"
|
|
pkgname=yyjson
|
|
pkgver=0.11.1
|
|
pkgrel=0
|
|
pkgdesc="High performance JSON library written in ANSI C"
|
|
url="https://github.com/ibireme/yyjson"
|
|
arch="all"
|
|
license="MIT"
|
|
makedepends="cmake samurai"
|
|
subpackages="$pkgname-static $pkgname-dev $pkgname-doc"
|
|
source="https://github.com/ibireme/yyjson/archive/$pkgver/yyjson-$pkgver.tar.gz"
|
|
|
|
build() {
|
|
cmake -B builddir -G Ninja \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
|
-DCMAKE_BUILD_TYPE=MinSizeRel \
|
|
-DBUILD_SHARED_LIBS=ON \
|
|
-DYYJSON_BUILD_TESTS="$(want_check && echo ON || echo OFF)" \
|
|
-DCMAKE_C_FLAGS="$CFLAGS -Wno-stringop-overflow" \
|
|
-DCMAKE_CXX_FLAGS="$CXXFLAGS -Wno-stringop-overflow"
|
|
cmake -B builddir-static -G Ninja \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
|
-DCMAKE_BUILD_TYPE=MinSizeRel \
|
|
-DCMAKE_C_FLAGS="$CFLAGS -Wno-stringop-overflow" \
|
|
-DCMAKE_CXX_FLAGS="$CXXFLAGS -Wno-stringop-overflow"
|
|
cmake --build builddir
|
|
cmake --build builddir-static
|
|
}
|
|
|
|
check() {
|
|
ctest --test-dir builddir
|
|
}
|
|
|
|
package() {
|
|
DESTDIR="$pkgdir" cmake --install builddir
|
|
DESTDIR="$pkgdir" cmake --install builddir-static
|
|
|
|
install -Dvm644 -t "$pkgdir"/usr/share/doc/$pkgname/ \
|
|
README.md \
|
|
doc/API.md \
|
|
doc/BuildAndTest.md \
|
|
doc/DataStructure.md
|
|
install -Dvm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
|
|
}
|
|
|
|
sha512sums="
|
|
26c93768e96080ca88e9c9acf6620ca26c54a7198bb7a5efe0294bf89102ab30e15f196597a79171b7e51f3dca1b5b0075136701007ecdc142293156031e21de yyjson-0.11.1.tar.gz
|
|
"
|