#!/usr/bin/bash
# JOBoRun		: Jwm OpenBox Obarun RUNit
# Maintainer	: Joe Bo Run <joborun@disroot.org>
# PkgSource		: url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
# Website		: https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------

pkgname=usbutils
pkgver=015
pkgrel=01
pkgdesc="A collection of USB tools to query connected USB devices w/o systemd"
arch=(x86_64)
url="https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usbutils.git/"
depends=(glibc hwdata)
makedepends=(git libusb)
optdepends=('python: for lsusb.py usage'
            'coreutils: for lsusb.py usage')
#source=("https://www.kernel.org/pub/linux/utils/usb/usbutils/${pkgname}-${pkgver}.tar"{.xz,.sign})
source=("git+https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usbutils.git#commit=79b796f9")

prepare() {
  cd "$pkgname"
  autoreconf -fiv
}

build() {
  cd "$pkgname"
  ./configure --prefix=/usr \
              --datadir=/usr/share/hwdata \
	  --with-systemd=no
  make
}

package() {
  depends+=('libusb-1.0.so' 'libudev.so')
  cd "$pkgname"
  make DESTDIR="$pkgdir" install
  install -vDm 644 NEWS -t "${pkgdir}/usr/share/doc/${pkgname}/"
}

#---- license gpg-key sha256sums ----

license=('GPL2' 'GPL3')

validpgpkeys=('647F28654894E3BD457199BE38DBBDC86092693E') # Greg Kroah-Hartman <gregkh@linuxfoundation.org>

sha256sums=(SKIP)



