aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerion Entrup <gerion.entrup@flump.de>2017-09-26 15:21:02 +0200
committerGerion Entrup <gerion.entrup@flump.de>2017-09-26 15:21:53 +0200
commitd2183b988bfb0595b3dde91726dcc3932bcc1ebd (patch)
treeec7c23e72e69faf0318fc670b6edd3760a6903fc /media-plugins
parentmedia-plugins/hyperion: X useflag (diff)
downloadgerislay-d2183b988bfb0595b3dde91726dcc3932bcc1ebd.tar.gz
gerislay-d2183b988bfb0595b3dde91726dcc3932bcc1ebd.tar.bz2
gerislay-d2183b988bfb0595b3dde91726dcc3932bcc1ebd.zip
media-plugins/hyperion: some improvements
Diffstat (limited to 'media-plugins')
-rw-r--r--media-plugins/hyperion/Manifest3
-rw-r--r--media-plugins/hyperion/files/hyperion.initd18
-rw-r--r--media-plugins/hyperion/hyperion-9999.ebuild28
3 files changed, 47 insertions, 2 deletions
diff --git a/media-plugins/hyperion/Manifest b/media-plugins/hyperion/Manifest
index fcb3c95..ca4b4fa 100644
--- a/media-plugins/hyperion/Manifest
+++ b/media-plugins/hyperion/Manifest
@@ -1 +1,2 @@
-EBUILD hyperion-9999.ebuild 1057 SHA256 0f5d517cdc839da1cb9d0ddfb768688c075b160241c5583e88d5df0af42a6aaa SHA512 07ddb6f2be9bb2f40ec3ec8be43eea7875eecd1fb19359ff757b23f3632e1c37359897570412837eee7b50be1514dbe0fbaeb2025b232599603ab2f35f7131a0 WHIRLPOOL 8d37cf8095ba5bcddee25c206c632066a3934527aa5e7f6ca135a79eb65ff8fe4a6683cc4ebdb455cc93385987436ac9617575baa8562d68215fec425f62a4e2
+AUX hyperion.initd 465 SHA256 905e03178876a8128786e83d92d257d4647d96bbd04635aff44722cad4c7b061 SHA512 df1a0c5c0bca4585be5014807f280cbf3cd22298ef6feebcb9fc01bdf7b207186510aad7987bc49e3b0cf3d18dce05829ae3b3d4fc2969e38682ce9ec5a86998 WHIRLPOOL d9d118aee9dfd4e732a2279d589bba96736c1f153dc0924a83cf37112869fb1d611b67e51d383b79904052ddab0c93ffff4d9a61751373777d26fd2fb6c68dc4
+EBUILD hyperion-9999.ebuild 1754 SHA256 23c50afa451cbb40fae578be7ab85e1532015a6e25c71ce5a07fdd3404699c5a SHA512 7b11593d19d1dbef37bdf40cae894dbacccb204392784778f44c1cda0b2120cf652707dd3d8a5401c4c1a5cede382d375b908e71fcb6c0bbdc579b17102134e3 WHIRLPOOL 761d1e922ae87b6698952b87966f2496e2879e8ea806928be84cdeebe951caebd0f99d492406348ebe6af3808c0d74f6f841f75c0678d3a3781008355b2eb6db
diff --git a/media-plugins/hyperion/files/hyperion.initd b/media-plugins/hyperion/files/hyperion.initd
new file mode 100644
index 0000000..63c92b9
--- /dev/null
+++ b/media-plugins/hyperion/files/hyperion.initd
@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+# Released under the 2-clause BSD license.
+
+description="Start and stop hyperiond"
+
+start()
+{
+ ebegin "Starting hyperiond"
+ start-stop-daemon --start -u hyperion --background --pidfile /var/run/hyperiond.pid --make-pidfile --exec /usr/bin/hyperiond /etc/hyperion/hyperion.config.json
+ eend $?
+}
+
+stop()
+{
+ ebegin "Stopping hyperiond"
+ start-stop-daemon --stop --pidfile /var/run/hyperiond.pid
+ eend $?
+}
diff --git a/media-plugins/hyperion/hyperion-9999.ebuild b/media-plugins/hyperion/hyperion-9999.ebuild
index 7bdb43d..e1a6078 100644
--- a/media-plugins/hyperion/hyperion-9999.ebuild
+++ b/media-plugins/hyperion/hyperion-9999.ebuild
@@ -3,7 +3,7 @@
EAPI=6
-inherit git-r3 cmake-utils
+inherit git-r3 cmake-utils systemd
DESCRIPTION="An opensource 'AmbiLight' implementation supported by many devices"
HOMEPAGE="https://hyperion-project.org/"
@@ -21,12 +21,23 @@ DEPEND="x11-libs/libXrender
virtual/libusb
dev-libs/icu
qt5? ( dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtnetwork:5
dev-qt/qtserialport:5 )
dev-lang/python
net-dns/avahi
dev-libs/protobuf"
RDEPEND="${DEPEND}"
+pkg_setup() {
+ HYPERION_HOME="/var/lib/hyperion"
+ ebegin "Creating hyperion user and group"
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 "${HYPERION_HOME}" ${PN}
+ eend $?
+}
+
src_configure() {
local mycmakeargs=(
-DENABLE_DISPMANX="$(usex dispmanx)"
@@ -44,3 +55,18 @@ src_configure() {
)
cmake-utils_src_configure
}
+
+src_install() {
+ cmake-utils_src_install
+
+ insinto /etc/hyperion
+ doins "${S}/config/hyperion.config.json.example"
+ ewarn "The config file is also creatable with the GUI program HyperCon."
+
+ newinitd "${FILESDIR}"/hyperion.initd hyperion
+
+ systemd_newunit "${S}/bin/service/hyperion.systemd.sh" hyperion.service
+}
+
+# https://github.com/hyperion-project/hyperion/blob/master/CompileHowto.txt
+# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=hyperion-git