aboutsummaryrefslogtreecommitdiffstats
path: root/community/can-utils/APKBUILD
blob: 7b88138a807f30ce72689b6567fe04ca16fd15ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Contributor: Milan P. Stanić <mps@arvanta.net>
# Maintainer: Milan P. Stanić <mps@arvanta.net>
pkgname=can-utils
pkgver=2021.08.0
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"
source="$pkgname-$pkgver.tar.gz::https://github.com/linux-can/can-utils/archive/v$pkgver.tar.gz"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build \
		-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
}

sha512sums="
367dc19fc653abda0cd6f843f51487f0c538d691542a1a7f5acb87a82b72efb0da5351568de87cd7d3894eaa53b7271e56d8cb66fa2f55079ed0bb1e015dcd99  can-utils-2021.08.0.tar.gz
"