From fe129a8df9fecb094ede36c8207794bdd58282dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= Date: Tue, 23 May 2023 21:40:55 +0200 Subject: [PATCH] sci-electronics/labone: add 23.02.42414 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas K. Hüttel --- sci-electronics/labone/Manifest | 1 + .../labone/labone-23.02.42414.ebuild | 97 +++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 sci-electronics/labone/labone-23.02.42414.ebuild diff --git a/sci-electronics/labone/Manifest b/sci-electronics/labone/Manifest index 0c19990b3df3..3eca86897a17 100644 --- a/sci-electronics/labone/Manifest +++ b/sci-electronics/labone/Manifest @@ -1 +1,2 @@ DIST LabOneLinux64-21.08.20515.tar.gz 399058267 BLAKE2B 624c4dc4a01edb69f9b36a435744d10b3638c91c7ac0c1e9765cf913e605fe32d1935fa131d650f38a5b713df916d92b985ac5f6489b031bba9b6ec8a1370d4a SHA512 f229a885ea91cc518c4819ad76a928829eb1699603ba48fb745d4a99faca116b100831c17a48243922912c68de27b7938387677ffa2e996a122f36c33d0a205c +DIST LabOneLinux64-23.02.42414.tar.gz 509402101 BLAKE2B 3bd083830b6dd286ba58227fcfaaed9ec3f7c7ceae8c3eb6b92976bb6b13b9a55389a67da4c71897b4a38200b2e833b4f197e738fff17281c3d0f5c7b3f65226 SHA512 5b4dd91f37b2c3212e9c93e7492756e8534f23d85a12af33cae7ce8150fa182286f37e2d4f3ca7369cb13613b24146e1ba0bb5d889db37634e561b0f921be58a diff --git a/sci-electronics/labone/labone-23.02.42414.ebuild b/sci-electronics/labone/labone-23.02.42414.ebuild new file mode 100644 index 000000000000..cecf87806ce5 --- /dev/null +++ b/sci-electronics/labone/labone-23.02.42414.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit xdg desktop systemd udev + +DESCRIPTION="Platform independent instrument control for Zurich Instruments devices" +HOMEPAGE="https://www.zhinst.com/labone" + +# Seriously... +SRC_URI="https://pub-a579c9a7a5ee41a2ba57327584974c85.r2.dev/${PV}/LabOneLinux64-${PV}.tar.gz" + +LICENSE="zi-labone" +SLOT="0" +KEYWORDS="-* ~amd64" +RESTRICT="mirror bindist" +IUSE="minimal" + +QA_PREBUILT="*" + +RDEPEND="" + +S=${WORKDIR}/LabOneLinux64-${PV} + +src_install() { + local application_directory=/opt/zi + local installation_directory="${application_directory}/LabOne64-${PV}" + + if ! use minimal ; then + + # the applications + + dodir ${installation_directory} + for dir in API DataServer Firmware Documentation WebServer ; do + mv "$dir" "${D}${installation_directory}/" || die + done + + cp "release_notes_$(ver_cut 1-2).html" "${D}${installation_directory}/" || die + + dosym ../..${installation_directory}/DataServer/ziServer /opt/bin/ziServer + dosym ../..${installation_directory}/DataServer/ziDataServer /opt/bin/ziDataServer + + # the services + + # LabOne comes with systemd support. + + 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... + + for service in labone-data-server hf2-data-server ; do + doinitd "${FILESDIR}/${service}" + doconfd "${FILESDIR}/${service}.conf" + done + + echo "#!/bin/bash" > "${T}/startziWebServer" || die + echo "${installation_directory}/WebServer/ziWebServer -r ${installation_directory}/WebServer/html --ip 127.0.0.1 --server-port 8004 -a 1" '$@ &' >> "${T}/startziWebServer" || die + chmod 755 "${T}/startziWebServer" || die + exeinto /opt/bin + doexe "${T}/startziWebServer" + elog For security reasons the startziWebServer script listens on the localhost interface only. + + newicon "${D}${installation_directory}/WebServer/html/images/favicons/firefox_app_128x128.png" zi-labone.png + + make_desktop_entry /opt/bin/startziWebServer "ZI LabOne" zi-labone "Science;Physics;Engineering" + + keepdir /var/log/labone + fowners nobody /var/log/labone + else + + insinto "${installation_directory}/API/C/lib" + doins API/C/lib/*.so + insinto "${installation_directory}/API/C/include" + doins API/C/include/*.h + + fi + + dosym "../..${installation_directory}/API/C/include/ziAPI.h" "usr/include/ziAPI.h" + dosym "../..${installation_directory}/API/C/lib/libziAPI-linux64.so" "usr/$(get_libdir)/libziAPI-linux64.so" + + udev_dorules Installer/udev/55-zhinst.rules +} + +pkg_postinst() { + xdg_pkg_postinst + udev_reload +} + +pkg_postrm() { + xdg_pkg_postrm + udev_reload +}