summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2021-11-08 19:39:23 +0100
committerAndreas K. Hüttel <dilfridge@gentoo.org>2021-11-08 19:40:49 +0100
commitcf271e114941e4fc6b169ac69fdace5d05fb17f8 (patch)
tree75ca3502d2f53c45afbc0c03a5a6d12642afeaaf
parentsci-electronics/labone: Bump, work in progress (diff)
downloaddilfridge-cf271e114941e4fc6b169ac69fdace5d05fb17f8.tar.gz
dilfridge-cf271e114941e4fc6b169ac69fdace5d05fb17f8.tar.bz2
dilfridge-cf271e114941e4fc6b169ac69fdace5d05fb17f8.zip
sci-electronics/labone: Version bump
Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
-rwxr-xr-xsci-electronics/labone/files/hf2-data-server11
-rw-r--r--sci-electronics/labone/files/hf2-data-server.conf0
-rwxr-xr-xsci-electronics/labone/files/labone-data-server11
-rw-r--r--sci-electronics/labone/files/labone-data-server.conf0
-rw-r--r--sci-electronics/labone/labone-21.08.20515.ebuild80
5 files changed, 57 insertions, 45 deletions
diff --git a/sci-electronics/labone/files/hf2-data-server b/sci-electronics/labone/files/hf2-data-server
new file mode 100755
index 0000000..c9bc280
--- /dev/null
+++ b/sci-electronics/labone/files/hf2-data-server
@@ -0,0 +1,11 @@
+#!/sbin/openrc-run
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+pidfile="/run/hf2-data-server.pid"
+command="/opt/bin/ziServer"
+command_args=""
+
+depend() {
+ need network
+}
diff --git a/sci-electronics/labone/files/hf2-data-server.conf b/sci-electronics/labone/files/hf2-data-server.conf
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/sci-electronics/labone/files/hf2-data-server.conf
diff --git a/sci-electronics/labone/files/labone-data-server b/sci-electronics/labone/files/labone-data-server
new file mode 100755
index 0000000..cf56478
--- /dev/null
+++ b/sci-electronics/labone/files/labone-data-server
@@ -0,0 +1,11 @@
+#!/sbin/openrc-run
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+pidfile="/run/labone-data-server.pid"
+command="/opt/bin/ziDataServer"
+command_args=""
+
+depend() {
+ need network
+}
diff --git a/sci-electronics/labone/files/labone-data-server.conf b/sci-electronics/labone/files/labone-data-server.conf
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/sci-electronics/labone/files/labone-data-server.conf
diff --git a/sci-electronics/labone/labone-21.08.20515.ebuild b/sci-electronics/labone/labone-21.08.20515.ebuild
index aa88d0e..a2c1cd2 100644
--- a/sci-electronics/labone/labone-21.08.20515.ebuild
+++ b/sci-electronics/labone/labone-21.08.20515.ebuild
@@ -1,7 +1,9 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=8
+
+inherit systemd udev
DESCRIPTION="Platform independent instrument control for Zurich Instruments devices"
HOMEPAGE="https://www.zhinst.com/labone"
@@ -20,64 +22,52 @@ RDEPEND=""
S=${WORKDIR}/LabOneLinux64-${PV}
src_install() {
- local instPath=/opt/zi
- local instrDir="LabOne64-${PV}"
+ local application_directory=/opt/zi
+ local installation_directory="${application_directory}/LabOne64-${PV}"
if ! use minimal ; then
- dodir ${instPath}/${instrDir}
- for dir in API DataServer Documentation WebServer Firmware release_notes_20.07.txt ; do
- mv "$dir" "${D}${instPath}/${instrDir}/" || die
+ # the applications
+
+ dodir ${installation_directory}
+ for dir in API DataServer Firmware Documentation WebServer ; do
+ mv "$dir" "${D}${installation_directory}/" || die
done
- dosym ../..${instPath}/${instrDir}/DataServer/ziServer /opt/bin/ziServer
- dosym ../..${instPath}/${instrDir}/DataServer/ziDataServer /opt/bin/ziDataServer
+ cp "release_notes_$(ver_cut 1-2).txt" "${D}${installation_directory}/" || die
- echo "#!/bin/bash" > "${T}/startWebServer" || die
- echo "${instPath}/${instrDir}/WebServer/ziWebServer -r ${instPath}/${instrDir}/WebServer/html --ip 127.0.0.1 --server-port 8004" >> "${T}/startWebServer" || die
- chmod 755 "${T}/startWebServer" || die
- exeinto /opt/bin
- doexe "${T}/startWebServer"
- elog For security reasons the startWebServer script listens on the localhost interface only.
- else
+ dosym ../..${application_directory}/DataServer/ziServer /opt/bin/ziServer
+ dosym ../..${application_directory}/DataServer/ziDataServer /opt/bin/ziDataServer
+ dosym ../..${application_directory}/DataServer/ziWebServer /opt/bin/ziWebServer
- insinto "${instPath}/${instrDir}/API/C/lib"
- doins API/C/lib/*.so
- insinto "${instPath}/${instrDir}/API/C/include"
- doins API/C/include/*.h
+ # the services
- fi
+ # LabOne comes with systemd support.
- dosym "../..${instPath}/${instrDir}/API/C/include/ziAPI.h" "usr/include/ziAPI.h"
- dosym "../..${instPath}/${instrDir}/API/C/lib/libziAPI-linux64.so" "usr/$(get_libdir)/libziAPI-linux64.so"
+ local service
+ for service in labone-data-server hf2-data-server ; do
+ sed -e 's:/usr/local/bin/:/opt/bin/:g' -i Installer/systemd/${service}.service || die
+ systemd_dounit Installer/systemd/${service}.service
+ done
+ # For OpenRC we need to do our own thing...
- # environment
+ for service in labone-data-server hf2-data-server ; do
+ doinitd "${FILESDIR}/${service}"
+ doconfd "${FILESDIR}/${service}.conf"
+ done
- cat > "${T}/55-zhinst" <<ENTE
-HF2_DATA_SERVER_PORT=8005
-HF2_DATA_SERVER="/opt/bin/ziServer"
-HF2_DATA_SERVER_ARGS="--debug 7"
-LABONE_DATA_SERVER_PORT=8005
-LABONE_DATA_SERVER="/opt/bin/ziDataServer"
-LABONE_DATA_SERVER_ARGS="--debug 7"
-ENTE
+ else
- # the udev integration
+ insinto "${application_directory}/API/C/lib"
+ doins API/C/lib/*.so
+ insinto "${application_directory}/API/C/include"
+ doins API/C/include/*.h
- sed -e 's:/usr/bin/ziServer:/opt/bin/ziServer:g' -i Installer/udev/55-zhinst.rules || die
- insinto /lib/udev/rules.d
- doins Installer/udev/55-zhinst.rules
- exeinto /opt/bin
- doexe Installer/udev/ziService
+ fi
- # just to make sure
- dosym ../../opt/bin/ziService usr/bin/ziService
-}
+ dosym "../..${application_directory}/API/C/include/ziAPI.h" "usr/include/ziAPI.h"
+ dosym "../..${application_directory}/API/C/lib/libziAPI-linux64.so" "usr/$(get_libdir)/libziAPI-linux64.so"
-pkg_prerm() {
- if [[ -x /opt/bin/ziService ]]; then
- einfo "Stopping ziService for safe unmerge"
- /opt/bin/ziService stop
- fi
+ udev_dorules Installer/udev/55-zhinst.rules
}