diff options
author | Mike Gilbert <floppym@gentoo.org> | 2021-06-13 10:38:51 -0400 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2021-06-13 10:38:51 -0400 |
commit | 6674bb3bc38dcfe002d73ee05164a429c4b7a6af (patch) | |
tree | c4bb96e9ac08b35e1576833e83527acd75444816 /sys-apps | |
parent | dev-perl/HTML-HTMLDoc: Version bump 0.21 (diff) | |
download | gentoo-6674bb3bc38dcfe002d73ee05164a429c4b7a6af.tar.gz gentoo-6674bb3bc38dcfe002d73ee05164a429c4b7a6af.tar.bz2 gentoo-6674bb3bc38dcfe002d73ee05164a429c4b7a6af.zip |
sys-apps/hwids: add 20210613
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/hwids/Manifest | 1 | ||||
-rw-r--r-- | sys-apps/hwids/hwids-20210613.ebuild | 89 |
2 files changed, 90 insertions, 0 deletions
diff --git a/sys-apps/hwids/Manifest b/sys-apps/hwids/Manifest index 327277fd93bc..6f926343135e 100644 --- a/sys-apps/hwids/Manifest +++ b/sys-apps/hwids/Manifest @@ -1 +1,2 @@ DIST hwids-20201207.tar.gz 3749352 BLAKE2B a968e6daf5686c4f73d9d900fbe80a5b3844c006102ed8801f88e378dc43c1bb66aaeced42bc2703a9c8ad624a1a7167bba485b1bf0c0d0e6043920e015c9177 SHA512 ec638edd1bbf00bd66e9baa50e3b9c9a5004a96a359e6bea306f1509c69bb3c7ede3569174007ab8bde11d49300da452b06be96136cde6bd2d84a76cff9251c2 +DIST hwids-20210613.tar.gz 3867741 BLAKE2B 64c4b0a83058a2052f7b132241008a3cc75452e93a9a57a9159c357c23fd09ee256abc2b94e700b5d8e8bd4e231ae12932d2c2f32fb03853207739cb3387047d SHA512 4568f6b8c0ca80ec772bd2785d4dc169d1d13a721472a15399158d9a7f31abbe414c5c8cfdf1a3b81cce4e33742a4b6e005e97e3e907643d0afdc8e953624fea diff --git a/sys-apps/hwids/hwids-20210613.ebuild b/sys-apps/hwids/hwids-20210613.ebuild new file mode 100644 index 000000000000..6f60de83bdb6 --- /dev/null +++ b/sys-apps/hwids/hwids-20210613.ebuild @@ -0,0 +1,89 @@ +# Copyright 2012-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit udev + +DESCRIPTION="Hardware (PCI, USB, OUI, IAB) IDs databases" +HOMEPAGE="https://github.com/gentoo/hwids" +if [[ ${PV} == 99999999 ]]; then + PYTHON_COMPAT=( python3_{6..9} ) + inherit git-r3 python-any-r1 + EGIT_REPO_URI="https://github.com/gentoo/hwids.git" +else + SRC_URI="https://github.com/gentoo/hwids/archive/${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +fi + +LICENSE="|| ( GPL-2 BSD ) public-domain" +SLOT="0" +IUSE="+net +pci +udev +usb" + +RDEPEND=" + udev? ( virtual/udev ) +" + +if [[ ${PV} == 99999999 ]]; then + BDEPEND=" + net-misc/curl + udev? ( $(python_gen_any_dep 'dev-python/pyparsing[${PYTHON_USEDEP}]') ) + " + python_check_deps() { + if use udev; then + has_version -b "dev-python/pyparsing[${PYTHON_USEDEP}]" + fi + } +else + S=${WORKDIR}/hwids-${P} +fi + +pkg_setup() { + : +} + +src_unpack() { + if [[ ${PV} == 99999999 ]]; then + git-r3_src_unpack + cd "${S}" || die + emake fetch + else + default + fi +} + +src_prepare() { + default + sed -i -e '/udevadm hwdb/d' Makefile || die +} + +_emake() { + emake \ + NET=$(usex net) \ + PCI=$(usex pci) \ + UDEV=$(usex udev) \ + USB=$(usex usb) \ + "$@" +} + +src_compile() { + if [[ ${PV} == 99999999 ]] && use udev; then + python_setup + _emake udev-hwdb + fi + _emake +} + +src_install() { + _emake install \ + DOCDIR="${EPREFIX}/usr/share/doc/${PF}" \ + MISCDIR="${EPREFIX}/usr/share/misc" \ + HWDBDIR="${EPREFIX}$(get_udevdir)/hwdb.d" \ + DESTDIR="${D}" +} + +pkg_postinst() { + if use udev; then + udevadm hwdb --update --root="${ROOT}" + fi +} |