diff options
Diffstat (limited to 'community/hidapi/APKBUILD')
-rw-r--r-- | community/hidapi/APKBUILD | 60 |
1 files changed, 31 insertions, 29 deletions
diff --git a/community/hidapi/APKBUILD b/community/hidapi/APKBUILD index e06ae5c59c2..a6bc493d78d 100644 --- a/community/hidapi/APKBUILD +++ b/community/hidapi/APKBUILD @@ -1,45 +1,47 @@ # Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net> # Maintainer: Jakub Jirutka <jakub@jirutka.cz> pkgname=hidapi -pkgver=0.9.0 -pkgrel=3 +pkgver=0.14.0 +pkgrel=0 pkgdesc="Simple library for communicating with USB and Bluetooth HID devices" url="https://github.com/libusb/hidapi" arch="all" -license="custom" -options="!check" -makedepends="libusb-dev libtool eudev-dev linux-headers autoconf automake" -subpackages="$pkgname-dev $pkgname-doc" -source="$pkgname-$pkgver.tar.gz::https://github.com/libusb/$pkgname/archive/$pkgname-$pkgver.tar.gz - autoconf-270.patch +license="GPL-3.0-only OR BSD-3-Clause" +makedepends=" + cmake + eudev-dev + libusb-dev + linux-headers + samurai " -builddir="$srcdir/$pkgname-$pkgname-$pkgver" +subpackages="$pkgname-dev" +source="https://github.com/libusb/hidapi/archive/hidapi-$pkgver/hidapi-$pkgver.tar.gz" +options="!check" # No tests +builddir="$srcdir/hidapi-hidapi-$pkgver" -prepare() { - default_prepare - - ./bootstrap +build() { + _build build/static -DBUILD_SHARED_LIBS=OFF + _build build/shared -DBUILD_SHARED_LIBS=ON } -build() { - ./configure \ - --build=$CBUILD \ - --host=$CHOST \ - --prefix=/usr \ - --sysconfdir=/etc \ - --mandir=/usr/share/man \ - --localstatedir=/var \ - --enable-static - make +_build() { + local outdir=$1; shift + + cmake -B "$outdir" -G Ninja \ + -DCMAKE_BUILD_TYPE=MinSizeRel \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + "$@" + cmake --build "$outdir" } package() { - make DESTDIR="$pkgdir" install + DESTDIR="$pkgdir" cmake --install build/shared - mkdir -p "$pkgdir"/usr/share/licenses/$pkgname - mv "$pkgdir"/usr/share/doc/$pkgname/LICENSE* \ - "$pkgdir"/usr/share/licenses/$pkgname + DESTDIR=".tmp" cmake --install build/static + mv .tmp/usr/lib/*.a "$pkgdir"/usr/lib/ } -sha512sums="d9f28d394b78daece7d2dfb946e62349a56b388b3a06241585c6fad5a4e24dc914723de6c0f12a9e51cd23fb245f6b5ac9b3721319646d5ba5912bbe0a3f9a52 hidapi-0.9.0.tar.gz -5f419618389a527f41f869a16e78139e24460968590f646e781fad14d34ad9da17fc24247cd20664d6823467230a8c91747542f45f18c101c53816c1fd126842 autoconf-270.patch" +sha512sums=" +66a045144f90b41438898b82f0398e80223323ebfe6e4f197d2713696bb3ae60f36aea5a37a9999b34b12294783fd7e4c28c6e785462559cbe21276009da1eac hidapi-0.14.0.tar.gz +" |