Date: Sunday, March 12, 2023 @ 07:57:38
  Author: bgyorgy
Revision: 1419242

upgpkg: hidapi 0.13.1-2: Use cmake instead of deprecated autotools to build the 
package, mark libusb and systemd-libs as dependencies as these are really small 
libraries

Modified:
  hidapi/trunk/PKGBUILD

----------+
 PKGBUILD |   32 +++++++++-----------------------
 1 file changed, 9 insertions(+), 23 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2023-03-12 07:46:44 UTC (rev 1419241)
+++ PKGBUILD    2023-03-12 07:57:38 UTC (rev 1419242)
@@ -1,41 +1,27 @@
-# Maintainer: Sergej Pupykin <[email protected]>
-# Maintainer: Niels Martignène <[email protected]>
+# Contributor: Sergej Pupykin <[email protected]>
+# Contributor: Niels Martignène <[email protected]>
 # Contributor: Nicolas Avrutin <[email protected]>
 # Contributor: Emmanuel Gil Peyrot <[email protected]>
 
 pkgname=hidapi
 pkgver=0.13.1
-pkgrel=1
+pkgrel=2
 pkgdesc='Simple library for communicating with USB and Bluetooth HID devices'
 arch=(x86_64)
 url='https://github.com/libusb/hidapi'
 license=('GPL3' 'BSD' 'custom')
-makedepends=('systemd' 'systemd-libs' 'libusb')
-optdepends=('libusb: for the libusb backend -- hidapi-libusb.so'
-            'systemd-libs: for the hidraw backend -- hidapi-hidraw.so')
+depends=('libusb' 'systemd-libs')
+makedepends=('cmake')
 provides=('libhidapi-hidraw.so' 'libhidapi-libusb.so')
 
source=("https://github.com/libusb/${pkgname}/archive/${pkgname}-${pkgver}.tar.gz";)
 
sha512sums=('07b224b9b5146caf693e6d67514fed236436ed68f38a3ada98ebf8352dfaa4e175f576902affb4b79da1bb8c9b47a1ee0831a93c7d3d210e93faee24632f7d53')
 
-prepare() {
-  cd "${srcdir}/${pkgname}-${pkgname}-${pkgver}"
-
-  ./bootstrap
-}
 build() {
-  cd "${srcdir}/${pkgname}-${pkgname}-${pkgver}"
-
-  ./configure \
-    --prefix=/usr
-  make
+  cmake -B build -S ${pkgname}-${pkgname}-${pkgver} -DCMAKE_INSTALL_PREFIX=/usr
+  cmake --build build
 }
 
 package() {
-  cd "${srcdir}/${pkgname}-${pkgname}-${pkgver}"
-
-  make DESTDIR="${pkgdir}/" install
-
-  mkdir -p "${pkgdir}/usr/share/licenses/${pkgname}"
-  rm -f "${pkgdir}/usr/share/doc/hidapi/"LICENSE*
-  install -m0644 LICENSE.txt LICENSE-bsd.txt LICENSE-orig.txt 
"${pkgdir}/usr/share/licenses/${pkgname}/"
+  DESTDIR="${pkgdir}" cmake --install build
+  install -Dm0644 ${pkgname}-${pkgname}-${pkgver}/LICENSE*.txt -t 
"${pkgdir}/usr/share/licenses/${pkgname}/"
 }

Reply via email to