summaryrefslogtreecommitdiff
path: root/app-misc/blink1
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-misc/blink1
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-misc/blink1')
-rw-r--r--app-misc/blink1/Manifest3
-rw-r--r--app-misc/blink1/blink1-1.98.ebuild99
-rw-r--r--app-misc/blink1/metadata.xml14
3 files changed, 116 insertions, 0 deletions
diff --git a/app-misc/blink1/Manifest b/app-misc/blink1/Manifest
new file mode 100644
index 000000000000..61c4b9e37163
--- /dev/null
+++ b/app-misc/blink1/Manifest
@@ -0,0 +1,3 @@
+DIST blink1-1.98.tar.gz 29439933 BLAKE2B 5c775819c9401c04e1c9adeb3dcb1f524ed30b6493380368b063a6ef94af75ab30e8b7f43e1b195f17578a1625bc6118bd65c7402376560ab5ee00e80f0c5c04 SHA512 2057e3ccf149dbdaaea2d09dabaa95317125d65151dc79c675365f55e85a3d0988232fd5ff404bdcfd127ebc266495afa04fb1b3fd0e4ac931bb711b0bb63568
+EBUILD blink1-1.98.ebuild 2580 BLAKE2B a68e99cb39c1d183b2802dfce524e807db614d43c6ae22cb1b177b77657b016a5c0fa6c273ec4c6eafa4147c80278feba265dd85aa564f506fd7d915d1e2fd0c SHA512 5675d112620eed4d8647203c52671e0b24a87678c070858828375e84086a3f7959958ce144b921d94e79d28518885e71d159922592de980eb712ee75ade7d950
+MISC metadata.xml 579 BLAKE2B 1644cacb6985bbe68c7cdcdaaa5f602fdd79c63c8e3b54ad34b6d97e9c50415ff9d343ab60b9c91bade52b2f59b34e4b0488a091001cb36ba294e0a29ff1b90f SHA512 a848eee9c39a574515aa6a5b70f347960a4c117583e58e2a31b3c714fb91347061518f96b2c8f13cb9167afd9e5478a4c76717af10a5ad5fc084a82fc47a9f7e
diff --git a/app-misc/blink1/blink1-1.98.ebuild b/app-misc/blink1/blink1-1.98.ebuild
new file mode 100644
index 000000000000..db7709ef64d0
--- /dev/null
+++ b/app-misc/blink1/blink1-1.98.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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="https://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..3b8c7475c606
--- /dev/null
+++ b/app-misc/blink1/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <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>
+