# Contributor: Síle Ekaterin Liszka <sheila@vulpine.house>
# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house>
pkgname=hwdata
pkgver=0.385
pkgrel=0
pkgdesc="Databases of hardware identification and configuration data"
url="https://github.com/vcrhonek/hwdata"
arch="noarch"
options="!check"  # running tests creates dependency loop
license="GPL-2.0-only"
depends=""
checkdepends="pciutils python3"
makedepends=""
subpackages=""
source="hwdata-$pkgver.tar.gz::https://github.com/vcrhonek/hwdata/archive/refs/tags/v$pkgver.tar.gz"
replaces="hwids hwids-net hwids-pci hwids-udev hwids-usb"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	ln -s /usr/bin/python3 python
	PATH="$PATH:." make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="713274b6e938383bb27fa20dcc9f77a73b462366f6ae33eaa6f7d2e089a69f0d9c03b90a59c1302fdffa642da953435f1f13e3eb21b6521c2cf304c701aa83a6  hwdata-0.385.tar.gz"