mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-06-09 11:35:43 +02:00
53 lines
1.3 KiB
Text
53 lines
1.3 KiB
Text
# Contributor: Ariadne Conill <ariadne@dereferenced.org>
|
|
# Maintainer: omni <omni+alpine@hack.org>
|
|
pkgname=libubox
|
|
pkgver=2024.12.19
|
|
pkgrel=0
|
|
_owrtgit=3868f47c
|
|
pkgdesc="OpenWrt utility and data structures library"
|
|
url="https://git.openwrt.org/project/ustream-ssl.git"
|
|
arch="all"
|
|
license="ISC"
|
|
depends_dev="libubox json-c-dev"
|
|
makedepends="cmake samurai zstd $depends_dev"
|
|
subpackages="libblobmsg jshn $pkgname-static $pkgname-dev"
|
|
source="https://sources.openwrt.org/libubox-$pkgver~$_owrtgit.tar.zst"
|
|
builddir="$srcdir/libubox-$pkgver~$_owrtgit"
|
|
|
|
build() {
|
|
if [ "$CBUILD" != "$CHOST" ]; then
|
|
CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
|
|
fi
|
|
CFLAGS="$CFLAGS -fPIC -DPIC" cmake3.5 -B build -G Ninja \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
|
-DBUILD_SHARED_LIBS=True \
|
|
-DCMAKE_BUILD_TYPE=None \
|
|
-DBUILD_LUA=OFF \
|
|
-DBUILD_EXAMPLES=OFF \
|
|
$CMAKE_CROSSOPTS .
|
|
cmake --build build
|
|
}
|
|
|
|
jshn() {
|
|
amove usr/bin/jshn
|
|
amove usr/share/libubox/jshn.sh
|
|
}
|
|
|
|
libblobmsg() {
|
|
amove usr/lib/libblobmsg_json.so
|
|
amove usr/lib/libjson_script.so
|
|
}
|
|
|
|
check() {
|
|
cd build
|
|
ctest
|
|
}
|
|
|
|
package() {
|
|
DESTDIR="$pkgdir" cmake --install build
|
|
}
|
|
|
|
sha512sums="
|
|
bb555d20e9b1ea9de9812d074ab8e6f8e49e362ff72088603540e23f7acc05b43fd7ede494bd9180b50a45181330e32038df456f1902418099472180bfb7167b libubox-2024.12.19~3868f47c.tar.zst
|
|
"
|