1 # Copyright 2012-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
8 DESCRIPTION="Hardware (PCI, USB, OUI, IAB) IDs databases"
9 HOMEPAGE="https://github.com/gentoo/hwids"
10 if [[ ${PV} == "99999999" ]]; then
11 PYTHON_COMPAT=( python3_{6,7} )
12 inherit git-r3 python-any-r1
13 EGIT_REPO_URI="https://github.com/gentoo/hwids.git"
15 SRC_URI="https://github.com/gentoo/hwids/archive/${P}.tar.gz"
16 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux"
19 LICENSE="|| ( GPL-2 BSD ) public-domain"
21 IUSE="+net +pci +udev +usb"
25 udev? ( virtual/udev )
26 !<sys-apps/pciutils-3.1.9-r2
27 !<sys-apps/usbutils-005-r1
30 if [[ ${PV} == 99999999 ]]; then
33 udev? ( $(python_gen_any_dep 'dev-python/pyparsing[${PYTHON_USEDEP}]') )
37 has_version --host-root "dev-python/pyparsing[${PYTHON_USEDEP}]"
41 S=${WORKDIR}/hwids-${P}
49 if [[ ${PV} == 99999999 ]]; then
60 sed -i -e '/udevadm hwdb/d' Makefile || die
73 if [[ ${PV} == 99999999 ]] && use udev; then
82 DOCDIR="${EPREFIX}/usr/share/doc/${PF}" \
83 MISCDIR="${EPREFIX}/usr/share/misc" \
84 HWDBDIR="${EPREFIX}$(get_udevdir)/hwdb.d" \
90 udevadm hwdb --update --root="${ROOT%/}"