diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2013-02-07 18:56:38 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2013-02-07 18:56:38 +0000 |
commit | a230d840ced59354441cdc01ea91b66221081665 (patch) | |
tree | 537211de07c1a704d334c849576ce8d8cb9c2b2d /sys-apps/hwids | |
parent | dev-python/pyamg: Version BUmp; move to new python eclasses (diff) | |
download | gentoo-2-a230d840ced59354441cdc01ea91b66221081665.tar.gz gentoo-2-a230d840ced59354441cdc01ea91b66221081665.tar.bz2 gentoo-2-a230d840ced59354441cdc01ea91b66221081665.zip |
Use --root switch in udevadm hwdb --update for an offset root support.
(Portage version: 2.2.0_alpha161/cvs/Linux x86_64, signed Manifest commit with key 4868F14D)
Diffstat (limited to 'sys-apps/hwids')
-rw-r--r-- | sys-apps/hwids/ChangeLog | 8 | ||||
-rw-r--r-- | sys-apps/hwids/hwids-20130131-r1.ebuild | 49 | ||||
-rw-r--r-- | sys-apps/hwids/hwids-99999999.ebuild | 10 |
3 files changed, 63 insertions, 4 deletions
diff --git a/sys-apps/hwids/ChangeLog b/sys-apps/hwids/ChangeLog index bb6a3fe1ec7d..054bcacb0c34 100644 --- a/sys-apps/hwids/ChangeLog +++ b/sys-apps/hwids/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-apps/hwids # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/hwids/ChangeLog,v 1.77 2013/01/31 16:04:01 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/hwids/ChangeLog,v 1.78 2013/02/07 18:56:38 ssuominen Exp $ + +*hwids-20130131-r1 (07 Feb 2013) + + 07 Feb 2013; Samuli Suominen <ssuominen@gentoo.org> + +hwids-20130131-r1.ebuild, hwids-99999999.ebuild: + Use --root switch in udevadm hwdb --update for an offset root support. *hwids-20130131 (31 Jan 2013) diff --git a/sys-apps/hwids/hwids-20130131-r1.ebuild b/sys-apps/hwids/hwids-20130131-r1.ebuild new file mode 100644 index 000000000000..a82a99695fe4 --- /dev/null +++ b/sys-apps/hwids/hwids-20130131-r1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/hwids/hwids-20130131-r1.ebuild,v 1.1 2013/02/07 18:56:38 ssuominen Exp $ + +EAPI=5 +inherit udev eutils + +DESCRIPTION="Hardware (PCI, USB, OUI, IAB) IDs databases" +HOMEPAGE="https://github.com/gentoo/hwids" +SRC_URI="https://github.com/gentoo/hwids/archive/${P}.tar.gz" + +LICENSE="|| ( GPL-2 BSD ) public-domain" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~x86-linux" +IUSE="+udev" + +DEPEND="udev? ( dev-lang/perl )" +RDEPEND="!<sys-apps/pciutils-3.1.9-r2 + !<sys-apps/usbutils-005-r1" + +S=${WORKDIR}/hwids-${P} + +src_compile() { + emake UDEV=$(usex udev) +} + +src_install() { + emake UDEV=$(usex udev) install \ + DOCDIR="${EPREFIX}/usr/share/doc/${PF}" \ + MISCDIR="${EPREFIX}/usr/share/misc" \ + HWDBDIR="${EPREFIX}$(udev_get_udevdir)/hwdb.d" \ + DESTDIR="${D}" +} + +pkg_postinst() { + # until udev introduces a way to compile the database at a given + # location, rather than just /, we can't do much on offset root. + if [[ ${ROOT} != "" ]] && [[ ${ROOT} != "/" ]]; then + return 0 + fi + + if use udev && [[ $(udevadm --help 2>&1) == *hwdb* ]]; then + if [[ $(udevadm hwdb --help 2>&1) == *root* ]]; then + udevadm hwdb --update --root="${ROOT%/}" + else + udevadm hwdb --update + fi + fi +} diff --git a/sys-apps/hwids/hwids-99999999.ebuild b/sys-apps/hwids/hwids-99999999.ebuild index a1b107c6eebc..24e07d317c14 100644 --- a/sys-apps/hwids/hwids-99999999.ebuild +++ b/sys-apps/hwids/hwids-99999999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 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.15 2013/01/08 21:45:50 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/hwids/hwids-99999999.ebuild,v 1.16 2013/02/07 18:56:38 ssuominen Exp $ EAPI=5 inherit udev eutils git-2 @@ -15,7 +15,7 @@ KEYWORDS="" IUSE="+udev" DEPEND="net-misc/curl - udev? ( dev-lang/perl !=sys-fs/udev-196 )" + udev? ( dev-lang/perl )" RDEPEND="!<sys-apps/pciutils-3.1.9-r2 !<sys-apps/usbutils-005-r1" @@ -43,6 +43,10 @@ pkg_postinst() { fi if use udev && [[ $(udevadm --help 2>&1) == *hwdb* ]]; then - udevadm hwdb --update + if [[ $(udevadm hwdb --help 2>&1) == *root* ]]; then + udevadm hwdb --update --root="${ROOT%/}" + else + udevadm hwdb --update + fi fi } |