summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-misc/blink1')
-rw-r--r--app-misc/blink1/Manifest1
-rw-r--r--app-misc/blink1/blink1-1.98.ebuild100
-rw-r--r--app-misc/blink1/metadata.xml16
3 files changed, 117 insertions, 0 deletions
diff --git a/app-misc/blink1/Manifest b/app-misc/blink1/Manifest
new file mode 100644
index 000000000000..55f3cb0855af
--- /dev/null
+++ b/app-misc/blink1/Manifest
@@ -0,0 +1 @@
+DIST blink1-1.98.tar.gz 29439933 SHA256 2bbf8848c3c656ab8fb01035fd31103a321fbee20164691cf67e3706c4b50b16 SHA512 2057e3ccf149dbdaaea2d09dabaa95317125d65151dc79c675365f55e85a3d0988232fd5ff404bdcfd127ebc266495afa04fb1b3fd0e4ac931bb711b0bb63568 WHIRLPOOL 24872d94ce246e3f64b096462496ead02b14ed2dd19e6ca1fc1b6f03e5c12069e18cde9e5ace5c4ed49ee7d7a35a3d61542a06019242a43d953ab0a2a820f7c2
diff --git a/app-misc/blink1/blink1-1.98.ebuild b/app-misc/blink1/blink1-1.98.ebuild
new file mode 100644
index 000000000000..7d6e17ac3115
--- /dev/null
+++ b/app-misc/blink1/blink1-1.98.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit linux-info
+
+DESCRIPTION="blink(1) USB RGB LED status light control suite"
+HOMEPAGE="https://blink1.thingm.com/"
+
+## github release tarball
+MY_PV=${PV/_rc/rc}
+MY_P="${PN}-${MY_PV}"
+SRC_URI="https://github.com/todbot/blink1/archive/v${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
+
+## selfmade tarball
+#MY_PVR=${PVR/_rc/rc}
+#MY_P="${PN}-${MY_PVR}"
+#SRC_URI="http://dev.gentoo.org/~wschlich/src/${CATEGORY}/${PN}/${MY_P}.tar.gz"
+
+## github commit tarball
+#MY_GIT_COMMIT="1e9c012bd79cb99a53a22980fbaa6f97801e7c03"
+#MY_P="todbot-${PN}-${MY_GIT_COMMIT:0:7}"
+#SRC_URI="https://github.com/todbot/${PN}/tarball/${MY_GIT_COMMIT} -> ${PF}.tar.gz"
+
+S="${WORKDIR}/${MY_P}"
+
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+LICENSE="CC-BY-SA-3.0"
+IUSE="doc examples +tool mini-tool server"
+
+RDEPEND="dev-libs/hidapi
+ virtual/libusb:1
+ virtual/libudev
+ sys-apps/attr
+ sys-libs/libcap"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+pkg_setup() {
+ ## check for USB HID kernel support
+ linux-info_pkg_setup
+ CONFIG_CHECK="USB_HID"
+ check_extra_config
+ ## check for acceptable USE flag settings
+ if ! ( use tool || use mini-tool || use server ); then
+ eerror "At least one of the following USE flags must be enabled:"
+ eerror "tool, mini-tool, server"
+ die "unacceptable USE flag settings"
+ fi
+}
+
+src_compile() {
+ if use tool; then
+ pushd commandline &>/dev/null
+ # USBLIB_TYPE=HIDAPI
+ # USBLIB_TYPE=HIDAPI_HIDRAW
+ # USBLIB_TYPE=HIDDATA
+ emake OS=linux USBLIB_TYPE=HIDAPI blink1-tool || die "emake blink1-tool failed"
+ popd &>/dev/null
+ fi
+ if use mini-tool; then
+ pushd commandline/blink1-mini-tool &>/dev/null
+ emake OS=linux blink1-mini-tool || die "emake blink1-mini-tool failed"
+ popd &>/dev/null
+ fi
+ if use server; then
+ pushd commandline &>/dev/null
+ emake OS=linux blink1-tiny-server || die "emake blink1-tiny-server failed"
+ popd &>/dev/null
+ fi
+}
+
+src_install() {
+ if use doc; then
+ dodoc docs/README.md
+ fi
+ if use tool; then
+ if use doc; then
+ dodoc docs/{blink1-tool.md,blink1-tool-tips.md,blink1-hid-commands.md,blink1-mk2-tricks.md}
+ fi
+ if use examples; then
+ insinto /usr/share/doc/"${PF}"/examples
+ doins commandline/scripts/{README.md,blink1-*.sh}
+ docompress -x /usr/share/doc/"${PF}"/examples
+ fi
+ dobin commandline/blink1-tool
+ fi
+ if use mini-tool; then
+ dobin commandline/blink1-mini-tool/blink1-mini-tool
+ fi
+ if use server; then
+ if use doc; then
+ dodoc docs/{app-url-api.md,app-url-api-examples.md}
+ fi
+ dobin commandline/blink1-tiny-server
+ fi
+}
diff --git a/app-misc/blink1/metadata.xml b/app-misc/blink1/metadata.xml
new file mode 100644
index 000000000000..0e55ab8d1425
--- /dev/null
+++ b/app-misc/blink1/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>wschlich@gentoo.org</email>
+ <name>Wolfram Schlich</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">todbot/blink1</remote-id>
+ </upstream>
+ <use>
+ <flag name="tool">Build and install command-line tool blink1-tool</flag>
+ <flag name="mini-tool">Build and install command-line mini-tool blink1-mini-tool (normally used for embedded devices)</flag>
+ <flag name="server">Build and install REST API server (currently hard-coded to TCP port 8080)</flag>
+ </use>
+</pkgmetadata>