1 # Maintainer: David Runge <dvzrv@archlinux.org>
6 pkgdesc="C/C++ libraries for Bluetooth Low Energy nRF5 SoftDevice serialization"
8 url="https://github.com/NordicSemiconductor/pc-ble-driver"
10 depends=(gcc-libs glibc)
11 makedepends=(asio catch2 cmake fmt git spdlog systemd)
13 libnrf-ble-driver-sd_api_v2.so
14 libnrf-ble-driver-sd_api_v3.so
15 libnrf-ble-driver-sd_api_v5.so
16 libnrf-ble-driver-sd_api_v6.so
20 $pkgname-$pkgver.tar.gz::https://github.com/NordicSemiconductor/$pkgname/archive/refs/tags/v$pkgver.tar.gz
21 $pkgname-4.1.4-gcc_11.2.patch::https://github.com/NordicSemiconductor/pc-ble-driver/commit/37258e65bdbcd0b4369ae448faf650dd181816ec.patch
23 sha256sums=('a883c4913510822da938b782362b6ec77b807e46d23ef838765217e05a3090ec'
24 '7588865671b302946be3ed4bc9b4e56820214b026dd823c4c650323bff0e246a')
25 b2sums=('7e31b05aaffaef4936f4794b527016dc3d550c8ce8fa6b1c89b8d73a71388aa38d8e30a4a44c1c6174587bd74de8c9028e4280a528f017c57b6f4e0be36bdd1b'
26 '81e82f4257399d303f71595da9b66185a8669387d8fbb85cfc00bc97a2d8c2d9c3132633be29babcae752bd901a30ab2b48f08d200492878f2dbcdad31a7a2c0')
29 # add missing include for thread
30 patch -Np1 -d $pkgname-$pkgver -i ../$pkgname-4.1.4-gcc_11.2.patch
31 # set project version properly, as it is used by all sorts of downstream projects
32 sed -e "s/0.0.0/$pkgver/g" -i $pkgname-$pkgver/CMakeLists.txt
36 cmake -B build -S $pkgname-$pkgver \
37 -DCMAKE_BUILD_TYPE='None' \
38 -DCMAKE_INSTALL_PREFIX='/usr' \
44 ctest --test-dir build --output-on-failure
48 depends+=(libfmt.so libspdlog.so libudev.so)
50 DESTDIR="$pkgdir" cmake --install build
51 install -vDm 644 $pkgname-$pkgver/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"