diff options
author | Mike Frysinger <vapier@gentoo.org> | 2014-06-06 18:20:05 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2014-06-06 18:20:05 +0000 |
commit | 18a40a78f6948b47007d42c01e3a75b00f68d646 (patch) | |
tree | 330438f2a573039f39575470825cd1134dfb2ab2 /sys-apps | |
parent | Version bump to 4.83 RC2 (diff) | |
download | gentoo-2-18a40a78f6948b47007d42c01e3a75b00f68d646.tar.gz gentoo-2-18a40a78f6948b47007d42c01e3a75b00f68d646.tar.bz2 gentoo-2-18a40a78f6948b47007d42c01e3a75b00f68d646.zip |
Add USE flags to control the install of the net/pci/usb databases. Unify the live & release ebuilds.
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/hwids/ChangeLog | 9 | ||||
-rw-r--r-- | sys-apps/hwids/hwids-20140602-r1.ebuild | 65 | ||||
-rw-r--r-- | sys-apps/hwids/hwids-99999999.ebuild | 34 | ||||
-rw-r--r-- | sys-apps/hwids/metadata.xml | 6 |
4 files changed, 104 insertions, 10 deletions
diff --git a/sys-apps/hwids/ChangeLog b/sys-apps/hwids/ChangeLog index d39ca4f16805..35359f12e4d4 100644 --- a/sys-apps/hwids/ChangeLog +++ b/sys-apps/hwids/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-apps/hwids # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/hwids/ChangeLog,v 1.143 2014/06/02 11:58:34 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/hwids/ChangeLog,v 1.144 2014/06/06 18:20:05 vapier Exp $ + +*hwids-20140602-r1 (06 Jun 2014) + + 06 Jun 2014; Mike Frysinger <vapier@gentoo.org> +hwids-20140602-r1.ebuild, + hwids-99999999.ebuild, metadata.xml: + Add USE flags to control the install of the net/pci/usb databases. Unify the + live & release ebuilds. *hwids-20140602 (02 Jun 2014) diff --git a/sys-apps/hwids/hwids-20140602-r1.ebuild b/sys-apps/hwids/hwids-20140602-r1.ebuild new file mode 100644 index 000000000000..c0aa23125fb4 --- /dev/null +++ b/sys-apps/hwids/hwids-20140602-r1.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/hwids/hwids-20140602-r1.ebuild,v 1.1 2014/06/06 18:20:05 vapier Exp $ + +EAPI=5 +inherit udev eutils + +DESCRIPTION="Hardware (PCI, USB, OUI, IAB) IDs databases" +HOMEPAGE="https://github.com/gentoo/hwids" +if [[ ${PV} == "99999999" ]]; then + EGIT_REPO_URI="${HOMEPAGE}.git" + inherit git-2 +else + SRC_URI="${HOMEPAGE}/archive/${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux" +fi + +LICENSE="|| ( GPL-2 BSD ) public-domain" +SLOT="0" +IUSE="+net +pci +udev +usb" + +DEPEND="udev? ( + dev-lang/perl + >=virtual/udev-206 +)" +[[ ${PV} == "99999999" ]] && DEPEND+=" udev? ( net-misc/curl )" +RDEPEND="!<sys-apps/pciutils-3.1.9-r2 + !<sys-apps/usbutils-005-r1" + +S=${WORKDIR}/hwids-${P} + +src_prepare() { + [[ ${PV} == "99999999" ]] && emake fetch + + sed -i -e '/udevadm hwdb/d' Makefile || die +} + +_emake() { + emake \ + NET=$(usex net) \ + PCI=$(usex pci) \ + UDEV=$(usex udev) \ + USB=$(usex usb) \ + "$@" +} + +src_compile() { + _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%/}" + # http://cgit.freedesktop.org/systemd/systemd/commit/?id=1fab57c209035f7e66198343074e9cee06718bda + [ "${ROOT:-/}" = "/" ] && udevadm control --reload + fi +} diff --git a/sys-apps/hwids/hwids-99999999.ebuild b/sys-apps/hwids/hwids-99999999.ebuild index 384c73fed68e..1422b47df182 100644 --- a/sys-apps/hwids/hwids-99999999.ebuild +++ b/sys-apps/hwids/hwids-99999999.ebuild @@ -1,39 +1,55 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/hwids/hwids-99999999.ebuild,v 1.24 2014/05/30 14:41:46 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/hwids/hwids-99999999.ebuild,v 1.25 2014/06/06 18:20:05 vapier Exp $ EAPI=5 -inherit udev eutils git-2 +inherit udev eutils DESCRIPTION="Hardware (PCI, USB, OUI, IAB) IDs databases" HOMEPAGE="https://github.com/gentoo/hwids" -EGIT_REPO_URI="${HOMEPAGE}.git" +if [[ ${PV} == "99999999" ]]; then + EGIT_REPO_URI="${HOMEPAGE}.git" + inherit git-2 +else + SRC_URI="${HOMEPAGE}/archive/${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux" +fi LICENSE="|| ( GPL-2 BSD ) public-domain" SLOT="0" -KEYWORDS="" -IUSE="+udev" +IUSE="+net +pci +udev +usb" DEPEND="udev? ( - net-misc/curl dev-lang/perl >=virtual/udev-206 )" +[[ ${PV} == "99999999" ]] && DEPEND+=" udev? ( net-misc/curl )" RDEPEND="!<sys-apps/pciutils-3.1.9-r2 !<sys-apps/usbutils-005-r1" +S=${WORKDIR}/hwids-${P} + src_prepare() { - emake fetch + [[ ${PV} == "99999999" ]] && emake fetch sed -i -e '/udevadm hwdb/d' Makefile || die } +_emake() { + emake \ + NET=$(usex net) \ + PCI=$(usex pci) \ + UDEV=$(usex udev) \ + USB=$(usex usb) \ + "$@" +} + src_compile() { - emake UDEV=$(usex udev) + _emake } src_install() { - emake UDEV=$(usex udev) install \ + _emake install \ DOCDIR="${EPREFIX}/usr/share/doc/${PF}" \ MISCDIR="${EPREFIX}/usr/share/misc" \ HWDBDIR="${EPREFIX}$(get_udevdir)/hwdb.d" \ diff --git a/sys-apps/hwids/metadata.xml b/sys-apps/hwids/metadata.xml index 9247431b594c..a5b844194621 100644 --- a/sys-apps/hwids/metadata.xml +++ b/sys-apps/hwids/metadata.xml @@ -8,4 +8,10 @@ <maintainer> <email>gregkh@gentoo.org</email> </maintainer> +<use> + <flag name='net'>Install the oui.txt and iab.txt databases</flag> + <flag name='pci'>Install the pci.ids database</flag> + <flag name='usb'>Install the usb.ids database</flag> + <flag name='udev'>Install hwdb.d rules for udev</flag> +</use> </pkgmetadata> |