aports/community/can-utils/APKBUILD
Milan P. Stanić e604310c57 community/can-utils: upgrade to 2025.01
pick upstream patch to fix libj1939.h
2025-04-02 08:11:21 +00:00

39 lines
1.3 KiB
Text

# Contributor: Milan P. Stanić <mps@arvanta.net>
# Maintainer: Milan P. Stanić <mps@arvanta.net>
pkgname=can-utils
pkgver=2025.01
pkgrel=0
pkgdesc="SocketCAN userspace utilities and tools"
url="https://github.com/linux-can/can-utils"
arch="all"
license="GPL-2.0-only AND BSD-3-Clause"
options="!check" # package don't have tests
makedepends="cmake linux-headers samurai"
source="$pkgname-$pkgver.tar.gz::https://github.com/linux-can/can-utils/archive/v$pkgver.tar.gz
fix-libj1939.h.patch
"
build() {
if [ "$CBUILD" != "$CHOST" ]; then
CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
fi
cmake -B build -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=True \
-DCMAKE_BUILD_TYPE=MinSizeRel \
$CMAKE_CROSSOPTS
cmake --build build
}
package() {
DESTDIR="$pkgdir" cmake --install build
# not installed with cmake
install -Dm755 build/can-calc-bit-timing -t "$pkgdir"/usr/bin/
}
sha512sums="
bc5639c5d93af51cfb5920bc13efec2a660064d1809cb2cee9b234079d5288bc9db2bedf85fe841b8493f5554fbfbbe9f4bf5a88d8957f4a8ccdc3a1abf74153 can-utils-2025.01.tar.gz
585113ba5df75c046f3913ff22df8db6b056ee155a4e13b675ebf7d12e2144130f9d9f0230692548deb6466acc510019e9c85b17502cc40a9828e8717c8fbbf1 fix-libj1939.h.patch
"