summaryrefslogtreecommitdiff
path: root/dev-embedded/dfu-programmer
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-03-01 19:26:48 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-03-01 19:26:48 +0000
commit93d7658008fb431ae469d5b6356fd53390998561 (patch)
tree0ba7ce8abb6392056459995442ae0e9e706c9364 /dev-embedded/dfu-programmer
parentc172714c13cbad928c88d1a98d01eeaa157b3504 (diff)
gentoo auto-resync : 01:03:2023 - 19:26:48
Diffstat (limited to 'dev-embedded/dfu-programmer')
-rw-r--r--dev-embedded/dfu-programmer/Manifest1
-rw-r--r--dev-embedded/dfu-programmer/dfu-programmer-0.7.2-r2.ebuild59
2 files changed, 60 insertions, 0 deletions
diff --git a/dev-embedded/dfu-programmer/Manifest b/dev-embedded/dfu-programmer/Manifest
index 1364048ed112..ef4eb43224b2 100644
--- a/dev-embedded/dfu-programmer/Manifest
+++ b/dev-embedded/dfu-programmer/Manifest
@@ -1,3 +1,4 @@
DIST dfu-programmer-0.7.2.tar.gz 146613 BLAKE2B 85222185bdbfdb90c06ece2a284f6f6e15fe5118a1934948a0bca6364902743a86429ea13d5aabc2a948f6f2ce41177b6021ae85a8ad22b75a026507253380d8 SHA512 429b89192bb5a9653ad8678dfc182bfc30eb057d0d1f72fe88efdf85005d3ad557e0f572f4fad3346f1f1078cd273a289f4bba2663bb1f840e6bf724d5293db4
EBUILD dfu-programmer-0.7.2-r1.ebuild 1272 BLAKE2B e396e4aeeda24b974a914dd3bfd4fae76a727845246e17c5c2d0b630b353e384f2bffecd5424e761ba6828d9346b279184ef4c09963a66a55442508eb3fc183b SHA512 dfb3a40db708e16e4e80b10f1fd614f8e0be80ae40335493f2cd900b5f51f6e1ef1aca97803662773b23ebb8fa84d7862db4a67af3622f829a3ce7ec62f3015e
+EBUILD dfu-programmer-0.7.2-r2.ebuild 1357 BLAKE2B a0df8859861d9b59c0ead2cd2f7a5702f82f8cef9312379794b2fb78442a0911ea3220343b9c6236795921dc04481c550aeff7f2165e55b5ec1694100f67b623 SHA512 77bac6eff37ccdd38f7126f017768af75af7572a26d56d44d6c7f49e2de5c3d5c00486039f0fe7965ee24e2058b5f7c58761199b0590c042bb26a1b70a37fe77
MISC metadata.xml 336 BLAKE2B c6bd5e8fe7f2fb76d339c89d66edf9dcc29d1230bc5d3310fd9c52d8c6b94e5a50628a301148d41431de3ff73ac0129e1d670e394e688a8f34c5712afd574a1d SHA512 065afd5762bbcff0e406cf6767adb6cb5f34a73f3b96e3cb2ef2aab46b887bbcffc789bc9d9efd3e20f1a73039a1442647d109d1cc87c034241e1a068c2d35eb
diff --git a/dev-embedded/dfu-programmer/dfu-programmer-0.7.2-r2.ebuild b/dev-embedded/dfu-programmer/dfu-programmer-0.7.2-r2.ebuild
new file mode 100644
index 000000000000..226ed4cd05d2
--- /dev/null
+++ b/dev-embedded/dfu-programmer/dfu-programmer-0.7.2-r2.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs udev
+
+DESCRIPTION="A Device Firmware Update based USB programmer for Atmel chips"
+HOMEPAGE="https://dfu-programmer.github.io/ https://sourceforge.net/projects/dfu-programmer/"
+
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64"
+
+RDEPEND="
+ acct-group/plugdev
+ virtual/libusb:1
+ virtual/udev"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+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() {
+ udev_reload
+
+ elog "To update device firmware as user you must be in the plugdev group:"
+ elog
+ elog "usermod -aG plugdev <user>"
+}
+
+pkg_postrm() {
+ udev_reload
+}