diff mbox

[2/2] gnu: Add dfu-util.

Message ID 1464535684-5751-2-git-send-email-h.goebel@crazy-compilers.com
State New
Headers show

Commit Message

Hartmut Goebel May 29, 2016, 3:28 p.m. UTC
* gnu/packages/flashing-tools.scm (dfu-util): New variable.
---
 gnu/packages/flashing-tools.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

Comments

Ludovic Courtès June 1, 2016, 8:24 p.m. UTC | #1
Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:

> * gnu/packages/flashing-tools.scm (dfu-util): New variable.

Applied with minor changes:

> +    (version "0.9")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri "http://dfu-util.sourceforge.net/releases/dfu-util-0.9.tar.gz")

Refer to ‘version’ here, and slightly reindented.

> +    (arguments
> +     '(#:phases
> +       (modify-phases %standard-phases
> +         (add-before 'configure 'autoconf
> +           (lambda _ (zero? (system* "autoreconf" "-vfi")))))))
> +    (inputs
> +     `(("libusb" ,libusb)))
> +    (native-inputs
> +     `(("autoconf" ,autoconf)
> +       ("automake" ,automake)

Autoconf, Automake, and the ‘autoconf’ phase are not needed, so I
removed them.

> +    (synopsis "Host (PC) side of the USB Device Firmware Upgrade (DFU) 1.0 and 1.1 protocol")

Slightly shortened this one.

Thank you!

Ludo’.
diff mbox

Patch

diff --git a/gnu/packages/flashing-tools.scm b/gnu/packages/flashing-tools.scm
index 1822934..58a137d 100644
--- a/gnu/packages/flashing-tools.scm
+++ b/gnu/packages/flashing-tools.scm
@@ -31,6 +31,7 @@ 
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages libftdi)
   #:use-module (gnu packages pciutils)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages admin))
 
 (define-public flashrom
@@ -180,3 +181,33 @@  You'll need to add the udev-rules to make the teensy update available
 for non-root users.")
     (home-page "https://www.pjrc.com/teensy/loader_cli.html")
     (license gpl3))))
+
+(define-public dfu-util
+  (package
+    (name "dfu-util")
+    (version "0.9")
+    (source
+     (origin
+       (method url-fetch)
+       (uri "http://dfu-util.sourceforge.net/releases/dfu-util-0.9.tar.gz")
+       (sha256 (base32 "0czq73m92ngf30asdzrfkzraag95hlrr74imbanqq25kdim8qhin"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'autoconf
+           (lambda _ (zero? (system* "autoreconf" "-vfi")))))))
+    (inputs
+     `(("libusb" ,libusb)))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("pkg-config" ,pkg-config)))
+    (synopsis "Host (PC) side of the USB Device Firmware Upgrade (DFU) 1.0 and 1.1 protocol")
+    (description "DFU (Universal Serial Bus Device Firmware Upgrade) protocol
+is intended to download and upload firmware to devices connected over USB. It
+ranges from small devices like micro-controller boards up to mobile phones.
+With dfu-util you are able to download firmware to your device or upload
+firmware from it.")
+    (home-page "http://dfu-util.sourceforge.net/")
+    (license gpl2+)))