summaryrefslogtreecommitdiff
path: root/community/dfu-util
diff options
context:
space:
mode:
Diffstat (limited to 'community/dfu-util')
-rw-r--r--community/dfu-util/PKGBUILD31
-rw-r--r--community/dfu-util/dfu-util.install11
-rw-r--r--community/dfu-util/stm32dfu.udev.rules10
3 files changed, 52 insertions, 0 deletions
diff --git a/community/dfu-util/PKGBUILD b/community/dfu-util/PKGBUILD
new file mode 100644
index 000000000..6124f0ce2
--- /dev/null
+++ b/community/dfu-util/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 106057 2014-02-21 18:49:28Z anatolik $
+# Maintainer: Anatol Pomozov <anatol.pomozov@gmail.com>
+# Contributor: Øyvind 'Mr.Elendig' Heggstad <mrelendig@har-ikkje.net>
+# Contributor: Fabrizio Antonangeli <fabrizio.antonangeli@gmail.com>
+
+pkgname=dfu-util
+pkgver=0.7
+pkgrel=3
+pkgdesc='Tool intended to download and upload firmware using DFU protocol to devices connected over USB'
+url='http://dfu-util.gnumonks.org'
+license=(GPL2)
+arch=(i686 x86_64)
+depends=(libusb)
+install=dfu-util.install
+source=(stm32dfu.udev.rules
+ http://dfu-util.gnumonks.org/releases/$pkgname-$pkgver.tar.gz)
+sha256sums=('64d4314f354d965e3dc0fd439dc497d5d0a41bf649da1869df40f93718e5a6fe'
+ 'f52a2a5489fbf9f3204a6ada05e0b47ee322e19d81c712e0c58a332d80ec3eab')
+
+build() {
+ cd $pkgname-$pkgver
+ ./autogen.sh
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+ install -Dm644 "$srcdir"/stm32dfu.udev.rules "$pkgdir"/etc/udev/rules.d/48-stm32dfu.rules
+}
diff --git a/community/dfu-util/dfu-util.install b/community/dfu-util/dfu-util.install
new file mode 100644
index 000000000..38cc149a9
--- /dev/null
+++ b/community/dfu-util/dfu-util.install
@@ -0,0 +1,11 @@
+post_install() {
+ udevadm control --reload-rules
+}
+
+post_upgrade() {
+ udevadm control --reload-rules
+}
+
+post_remove() {
+ udevadm control --reload-rules
+}
diff --git a/community/dfu-util/stm32dfu.udev.rules b/community/dfu-util/stm32dfu.udev.rules
new file mode 100644
index 000000000..138ddc425
--- /dev/null
+++ b/community/dfu-util/stm32dfu.udev.rules
@@ -0,0 +1,10 @@
+# stm32 boards, with onboard DFU support
+
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", \
+ MODE:="0666", \
+ SYMLINK+="stm32_dfu"
+
+# If you share your linux system with other users, or just don't like the
+# idea of write permission for everybody, you can replace MODE:="0666" with
+# OWNER:="yourusername" to create the device owned by you, or with
+# GROUP:="somegroupname" and mange access using standard unix groups.