# Maintainer: PktSurf <smlinux@pktsurf.in>
app=usbutils
version=012
build=1sml
homepage="https://github.com/gregkh/usbutils"
download="https://github.com/gregkh/usbutils/archive/refs/tags/v$version.tar.gz"
desc="USB utilities for displaying detailed info about USB buses and devices in the system"
requires="python3 libusb"

prepbuilddir() {
  mkandenterbuilddir
  rm -rf $app-$version

  tar xf $srcdir/$app-$version.tar.?z*
  cd $app-$version
  fixbuilddirpermissions
}

build() {
  ./configure \
    --prefix="" \
    --sysconfdir=/etc \
    --sbindir=/bin \
    --datadir=/share/hwdata

  make
  make install DESTDIR=$pkg

  cp usbreset $pkg/bin/

  cp LICENSES/* $pkgdocs/

  mkfinalpkg
}

sha512sums="
a995d0a70814b1e87fbeee4261b9a8541eeaa3bb3de75810399f7daa63ef94dc75e8c9af2fbb551dbcdf641497778a88e1b0f54fbc6a9f925cc8c95f9eabcab7  usbutils-012.tar.lz
"
