aboutsummaryrefslogtreecommitdiffstats
path: root/community/hidapi/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/hidapi/APKBUILD')
-rw-r--r--community/hidapi/APKBUILD26
1 files changed, 19 insertions, 7 deletions
diff --git a/community/hidapi/APKBUILD b/community/hidapi/APKBUILD
index b3ae4ed207c..a6bc493d78d 100644
--- a/community/hidapi/APKBUILD
+++ b/community/hidapi/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=hidapi
-pkgver=0.11.0
+pkgver=0.14.0
pkgrel=0
pkgdesc="Simple library for communicating with USB and Bluetooth HID devices"
url="https://github.com/libusb/hidapi"
@@ -12,6 +12,7 @@ makedepends="
eudev-dev
libusb-dev
linux-headers
+ samurai
"
subpackages="$pkgname-dev"
source="https://github.com/libusb/hidapi/archive/hidapi-$pkgver/hidapi-$pkgver.tar.gz"
@@ -19,17 +20,28 @@ options="!check" # No tests
builddir="$srcdir/hidapi-hidapi-$pkgver"
build() {
- cmake -B build \
- -DCMAKE_BUILD_TYPE=None \
+ _build build/static -DBUILD_SHARED_LIBS=OFF
+ _build build/shared -DBUILD_SHARED_LIBS=ON
+}
+
+_build() {
+ local outdir=$1; shift
+
+ cmake -B "$outdir" -G Ninja \
+ -DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_INSTALL_LIBDIR=lib
- cmake --build build
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ "$@"
+ cmake --build "$outdir"
}
package() {
- DESTDIR="$pkgdir" cmake --install build
+ DESTDIR="$pkgdir" cmake --install build/shared
+
+ DESTDIR=".tmp" cmake --install build/static
+ mv .tmp/usr/lib/*.a "$pkgdir"/usr/lib/
}
sha512sums="
-0de4abc963600d159ce231416c468b9e81a8361e4d2c2202988d6eb2e58a923700e9b9be639fbddc6bc14625131848409e2e88dbc4b34a1f8a726c8fa4692d92 hidapi-0.11.0.tar.gz
+66a045144f90b41438898b82f0398e80223323ebfe6e4f197d2713696bb3ae60f36aea5a37a9999b34b12294783fd7e4c28c6e785462559cbe21276009da1eac hidapi-0.14.0.tar.gz
"