Skip to contentSkip to conversation

uhubctl: add recipe

PATCH In review Richard Leitner 1 participant 2 messages May 22, 2018 – May 29, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 uhubctl: add recipe

Add recipe for uhubctl v2.0.0, an utility to control USB power per-port on "smart" USB hubs.

---
Changes v2:
+ applied suggestions by Khem Raj:
- replace version fix patch with sed line
- remove redundant ${S} assignment
- remove redundant FILES assignmet

---
 meta-oe/recipes-support/uhubctl/uhubctl_2.0.0.bb | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 meta-oe/recipes-support/uhubctl/uhubctl_2.0.0.bb
meta-oe/recipes-support/uhubctl/uhubctl_2.0.0.bb new file +21 -0
new file mode 100644
index 000000000..6306ddb55
@@ -0,0 +1,21 @@
+SUMMARY = "USB hub per-port power control"
+HOMEPAGE = "https://github.com/mvp/uhubctl"
+BUGTRACKER = "https://github.com/mvp/uhubctl/issues"
+DEPENDS = "libusb1"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "https://github.com/mvp/${PN}/archive/v${PV}.tar.gz"
+SRC_URI[md5sum] = "5c711911d766d76813333c3812277574"
+SRC_URI[sha256sum] = "4c31278b2c03e5be5a696c3088bc86cf2557a70e00f697799c163aba18e3c40e"
+
+# uhubctl gets its program version from "git describe". As we use the source
+# archive do reduce download size replace the call with our hardcoded version.
+do_configure_append() {
+    sed -i "s/^\(GIT_VERSION :=\).*$/\1 ${PV}/g" ${S}/Makefile
+}
+
+do_install () {
+    oe_runmake install DESTDIR=${D}
+}
Signature · 1 line
2.11.0
#1 lore raw

Ping

Quoted 33 lines · Richard Leitner

Add recipe for uhubctl v2.0.0, an utility to control USB power per-port on "smart" USB hubs.

---
Changes v2:
+ applied suggestions by Khem Raj:
- replace version fix patch with sed line
- remove redundant ${S} assignment
- remove redundant FILES assignmet

---
 meta-oe/recipes-support/uhubctl/uhubctl_2.0.0.bb | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 meta-oe/recipes-support/uhubctl/uhubctl_2.0.0.bb
meta-oe/recipes-support/uhubctl/uhubctl_2.0.0.bb new file +11 -0
new file mode 100644
index 000000000..6306ddb55
@@ -0,0 +1,21 @@
+SUMMARY = "USB hub per-port power control"
+HOMEPAGE = "https://github.com/mvp/uhubctl"
+BUGTRACKER = "https://github.com/mvp/uhubctl/issues"
+DEPENDS = "libusb1"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "https://github.com/mvp/${PN}/archive/v${PV}.tar.gz"
+SRC_URI[md5sum] = "5c711911d766d76813333c3812277574"
+SRC_URI[sha256sum] = "4c31278b2c03e5be5a696c3088bc86cf2557a70e00f697799c163aba18e3c40e"

meta-oe/recipes-support/uhubctl/uhubctl_2.0.0.bb line 21

Quoted 10 lines
meta-oe/recipes-support/uhubctl/uhubctl_2.0.0.bb new file +10 -0
+
+# uhubctl gets its program version from "git describe". As we use the source
+# archive do reduce download size replace the call with our hardcoded version.
+do_configure_append() {
+    sed -i "s/^\(GIT_VERSION :=\).*$/\1 ${PV}/g" ${S}/Makefile
+}
+
+do_install () {
+    oe_runmake install DESTDIR=${D}
+}

Any comments/feedback?