diff options
author | Johannes Huber <johu@gentoo.org> | 2017-10-08 17:37:08 +0200 |
---|---|---|
committer | Johannes Huber <johu@gentoo.org> | 2017-10-08 18:29:34 +0200 |
commit | fe0322cb6a1bdf7218be2e03ffa5d0288406486d (patch) | |
tree | dfaf189fc9f323728296b20e9daff5e0877ef930 /dev-embedded | |
parent | dev-python/html2text: version bump to 2017.10.4 (diff) | |
download | gentoo-fe0322cb6a1bdf7218be2e03ffa5d0288406486d.tar.gz gentoo-fe0322cb6a1bdf7218be2e03ffa5d0288406486d.tar.bz2 gentoo-fe0322cb6a1bdf7218be2e03ffa5d0288406486d.zip |
dev-embedded/dfu-programmer: Create plugdev group
Reported-by: Conrad Kostecki <ck+gentoo@bl4ckb0x.de>
Closes: https://bugs.gentoo.org/606518
Package-Manager: Portage-2.3.11, Repoman-2.3.3
Diffstat (limited to 'dev-embedded')
-rw-r--r-- | dev-embedded/dfu-programmer/dfu-programmer-0.7.2-r1.ebuild | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/dev-embedded/dfu-programmer/dfu-programmer-0.7.2-r1.ebuild b/dev-embedded/dfu-programmer/dfu-programmer-0.7.2-r1.ebuild new file mode 100644 index 000000000000..0a2e047d21c8 --- /dev/null +++ b/dev-embedded/dfu-programmer/dfu-programmer-0.7.2-r1.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit udev user + +DESCRIPTION="A Device Firmware Update based USB programmer for Atmel chips" +HOMEPAGE="http://dfu-programmer.sourceforge.net" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm" +IUSE="" + +RDEPEND="virtual/libusb:1 + virtual/udev" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +pkg_setup() { + enewgroup plugdev +} + +src_prepare() { + default + + # Upstream has fixed this in their configure already. + tc-export CPP PKG_CONFIG + sed -i \ + -e "/LIBUSB_1_0_CFLAGS=/s:=.*:='$(${PKG_CONFIG} --cflags libusb-1.0)':" \ + -e "/LIBUSB_1_0_LIBS=/s:=.*:='$(${PKG_CONFIG} --libs libusb-1.0)':" \ + configure || die +} + +src_install() { + default + + cat <<-EOF > 70-dfu-programmer.rules + # + # do not edit this file, it will be overwritten on update + # + EOF + printf 'SUBSYSTEM=="usb", ACTION=="add", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="%s", MODE="660", GROUP="plugdev", SYMLINK+="dfu-%%n"\n' \ + 2ff{a,b,9,7,4,3} >> 70-dfu-programmer.rules + + udev_dorules 70-dfu-programmer.rules +} + +pkg_postinst() { + elog "To update device firmware as user you must be in the plugdev group:" + elog + elog "usermod -aG plugdev <user>" +} |