aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAstroFloyd <AstroFloyd@gmail.com>2022-01-10 18:48:22 +0100
committerAstroFloyd <AstroFloyd@gmail.com>2022-01-10 18:48:22 +0100
commit1d5a16af59b6dba741423a51b44507707409c03f (patch)
treebf18293bab51b2bb15f2ff4477d8e3c95cf12f28
parentsys-cluster/opencoarrays: version bump to v2.9.2. (diff)
downloadAstroFloyd-1d5a16af59b6dba741423a51b44507707409c03f.tar.gz
AstroFloyd-1d5a16af59b6dba741423a51b44507707409c03f.tar.bz2
AstroFloyd-1d5a16af59b6dba741423a51b44507707409c03f.zip
sci-electronics/labjack-ljm-64bit: revision bump to v20171221-r3.
Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: AstroFloyd <AstroFloyd@gmail.com>
-rw-r--r--sci-electronics/labjack-ljm-64bit/ChangeLog7
-rw-r--r--sci-electronics/labjack-ljm-64bit/Manifest6
-rw-r--r--sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221-r1.ebuild138
-rw-r--r--sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221-r3.ebuild (renamed from sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221-r2.ebuild)57
-rw-r--r--sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221.ebuild114
5 files changed, 30 insertions, 292 deletions
diff --git a/sci-electronics/labjack-ljm-64bit/ChangeLog b/sci-electronics/labjack-ljm-64bit/ChangeLog
index 7ccc421..6d1852e 100644
--- a/sci-electronics/labjack-ljm-64bit/ChangeLog
+++ b/sci-electronics/labjack-ljm-64bit/ChangeLog
@@ -1,3 +1,10 @@
+*labjack-ljm-64bit-20171221-r3 (10 Jan 2022)
+
+ 10 Jan 2022; AstroFloyd <AstroFloyd@gmail.com>
+ +labjack-ljm-64bit-20171221-r3.ebuild, -labjack-ljm-64bit-20171221-r1.ebuild,
+ -labjack-ljm-64bit-20171221-r2.ebuild, -labjack-ljm-64bit-20171221.ebuild:
+ sci-electronics/labjack-ljm-64bit: revision bump to v20171221-r3.
+
*labjack-ljm-64bit-20171221-r2 (09 Dec 2020)
09 Dec 2020; AstroFloyd <AstroFloyd@gmail.com>
diff --git a/sci-electronics/labjack-ljm-64bit/Manifest b/sci-electronics/labjack-ljm-64bit/Manifest
index 71a0f75..d09e3da 100644
--- a/sci-electronics/labjack-ljm-64bit/Manifest
+++ b/sci-electronics/labjack-ljm-64bit/Manifest
@@ -1,6 +1,4 @@
DIST labjack_ljm_software_2017_12_21_x86_64.tar.gz 69663743 BLAKE2B 2a654c72221eefa241fc3b877231177da7c6cec6d0396545daf297cb6cff0cbba132e9abb21509ca3c69432eb4ebc6fd36fd783202fb3fe129e191b3ab725af4 SHA512 a67bce9def668309eaf7298ef4b20d2337487f5badf1ca2fa9d4ad8b595d16e822133aea3df46c72528b151feafab0bcea172f6dcc4ff999300bdf3e5c6f7edf
-EBUILD labjack-ljm-64bit-20171221-r1.ebuild 5970 BLAKE2B 375933e58eaad9ed47737e87f63c75443941dfdd0932a4973bf9649f54c926915ebc169b91ac8ceffebbbbe1b60d5630ca31f509ad81c58ca9e661e44bfa1bcb SHA512 0856f66d1dda8b64579dcb35db575297f2359ee6e1037e56ec5a14f971a5348e353e661ba2d07e73e5197de2968c517ef72f539e4acd1615777cccac3fa3f8c6
-EBUILD labjack-ljm-64bit-20171221-r2.ebuild 6005 BLAKE2B 72139bc53aa08ba478b11616b31b18b228c9ecef430898efe62d43e36344bed2d72e6d33f8f4818e14009a275f9cebd1989defd07588aae9885d1fb90192715a SHA512 0481d7f4da19476903b525820c0343c05e720d78408ef99ddf89f7c2479d66c6cf7a459a4760fb5c07dd6810090af0ece9550ece9d1fdecd3f99da76a7b0ab43
-EBUILD labjack-ljm-64bit-20171221.ebuild 4772 BLAKE2B eaa207487f106454eaff054a53aa4010e1c0039289e47969f80b87b387c8fa9dbad768eed9f27eb15435d48d161b492e496089f8d3392cf42afc730d1af9d611 SHA512 173e766ff2484ec1fe4d088adb1c82f92c8d65f5d9e4b170391f75709c2160fa594a30d268c5c491c54adab344bdeeee42bafd30b7136ac27282d534143a2a41
-MISC ChangeLog 998 BLAKE2B d37f53280393c5a23e1fc70b1c711004e717e313cce85fb774f8dda9831930112d7414c78cc9da3b8c3cbfd0c5274b97f9445d51a72c74ed4c760184471c1fb5 SHA512 bfe49faac25b13f69e401318dfa04ba8eefbce7a188f5e653306b2ca078511e2dedd35095850b78122f59ac2a6fad99e6c94844810d2c9356c86b30faed3b1a5
+EBUILD labjack-ljm-64bit-20171221-r3.ebuild 5705 BLAKE2B 141c82b57b4acad8d94104c23fb74de24fecddc840a45944cd8ec589c84ca0a4e06c29a3126286db2a48e072790bc05441dc6a6bef52b8692d05fb1d8d76cbae SHA512 bcdf73c22697f83d95127566f1c05d9bc1d8c28427c52cc6d716c1208933bd8fe53170d99d5a0178b14345f43a71f18ffacca891676ef195beaceff2503a45c1
+MISC ChangeLog 1319 BLAKE2B 9c32eb0e2b3baac2cee7023ffd456fa55b8cb3a1772d88534238fe0a9fb19202276925fe80faaf622da8ddd30a2c58b1e1daf424e4b446e1e546597d16ed9d85 SHA512 a089a0fa7c24d7bfad31ea3922a4a8fe7f38a1cb7b61f6fc0708da08705bfd1904cec17387061999835c3ecc324e35541db19d971cdc06e1336ad1cc96406db3
MISC metadata.xml 329 BLAKE2B 8a3b4815e572375c40c64ef7c2266bf8823c3c2bd2b1cbd97e1f2c3daaaa6b101f28cf1569c3de1645795e73611ae408310ac94ff3de4b59458fd1062ccdaa82 SHA512 e5ac12d24d49db9203120c63cbc4e47ec61d43fed9168b03e0390cc9a934e0f819b5912257e77563d4d8ed26fea24fff8eb89b86b69949d029a22f5db74bdd41
diff --git a/sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221-r1.ebuild b/sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221-r1.ebuild
deleted file mode 100644
index 54eb650..0000000
--- a/sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221-r1.ebuild
+++ /dev/null
@@ -1,138 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-DESCRIPTION="LabJackM driver + C library and Kipling for LabJack T4, T7, and Digit (64-bit)"
-HOMEPAGE="https://labjack.com/support/software/installers/ljm"
-SRC_URI="https://labjack.com/sites/default/files/software/labjack_ljm_software_2017_12_21_x86_64.tar.gz"
-
-LICENSE="LabJack Boost-1.0 LGPL-2.1 MIT"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="examples +kipling"
-
-DEPEND="app-arch/unmakeself"
-RDEPEND="${DEPEND}"
-
-S="${WORKDIR}/labjack_ljm_software_2017_12_21_x86_64"
-
-src_prepare() {
- # Unpack selfextracting tarball:
- unmakeself labjack_ljm_installer.run
-
- # Fix destination directories:
- sed -i \
- -e "s:_DESTINATION=/usr/local/lib:_DESTINATION=${D}usr/lib64:" \
- -e "s:_DESTINATION=/usr/local/:_DESTINATION=${D}usr/:" \
- -e "s:_DESTINATION=/opt:_DESTINATION=${D}opt:" \
- -e "s:/lib/udev/rules.d:${D}lib/udev/rules.d:" \
- setup.sh
-
- # Don't clean up. Print messages in success() in pkg_info():
- sed -i 's:go rm -rf "./labjack_ljm_software":echo "The package was installed succesfully"; exit 0 # \&:' setup.sh
-
- # The library path is added to /etc/ld.so.conf and ldconfig is run, but since we use the default dir (/usr/lib64/), this isn't necessary:
- sed -i 's:^setup_ldconfig$:# setup_ldconfig:' setup.sh
-
- # Cannot restart device rules at this stage:
- sed -i 's:^restart_device_rules$:# restart_device_rules:' setup.sh
-
- # Remove path from symbolic links in the same directory:
- sed -i \
- -e 's:ln -s -f ${LIB_DESTINATION}/${LJM_REALNAME} ${LIB_DESTINATION}/${LJM_SONAME}:ln -s -f ${LJM_REALNAME} ${LIB_DESTINATION}/${LJM_SONAME}:' \
- -e 's:ln -s -f ${LIB_DESTINATION}/${LJM_SONAME} ${LIB_DESTINATION}/${LJM_LINKERNAME}:ln -s -f ${LJM_SONAME} ${LIB_DESTINATION}/${LJM_LINKERNAME}:' \
- setup.sh
-
- # Portage now refuses world-writable files and directories. This should be reported at the end:
- # sed -i \
- # -e 's| --mode=777 | --mode=755 |' \
- # -e 's|chmod 777 |chmod 755 |' \
- # -e 's| chmod 666 | chmod 644 |' \
- # -e 's|chmod a+rw |chmod 644 |' \
- # setup.sh
-
-}
-
-src_install() {
- ## Note: installing in /usr/bin, /usr/lib, /usr/include and /usr/share doesn't work, since the /usr/local/... is hardcoded in some of the binaries...
- mkdir -p "${D}/usr/bin" "${D}/usr/include" "${D}/usr/lib64" "${D}/usr/share" "${D}/opt" "${D}/lib/udev/rules.d"
-
- VERSION=`head -n 100 labjack_ljm_installer.run | grep scriptargs= | sed -e 's/scriptargs=//' -e 's/"//g'` # v2017_12_21_x86_64 has LJM library v1.17.0
- elog "${P} contains LJM library ${VERSION}"
- elog "Running LabJack setup script..."
- ./setup.sh ${VERSION} || die
- elog "Exiting LabJack setup script..."
-
- # Remove symlink to non-existing target:
- rm -f "${D}/opt/labjack_kipling/node_modules/.bin/ncp"
-
- # Install header files for examples to /usr/include, so that they can be used elsewhere:
- insinto usr/include
- doins labjack_ljm_examples/LabJackMModbusMap.h labjack_ljm_examples/examples/LJM_Utilities.h labjack_ljm_examples/examples/stream/LJM_StreamUtilities.h
- chmod a-x "${D}usr/include/LabJackM.h" # Fix permissions
-
- # Install examples if desired:
- if use examples; then
- elog "Copying examples..."
- insinto usr/share/LabJack
- doins -r labjack_ljm_examples
- fi
-
- # Do NOT install kipling if explicitly indicated witg the -kipling USE flag:
- use kipling || rm -rf "${D}/opt/" "${D}/usr/bin/"
-
- # Create symlinks from /usr/... to /usr/local/... so that things actually work:
- mkdir -p "${D}/usr/local/bin" "${D}/usr/local/include" "${D}/usr/local/lib64" "${D}/usr/local/share"
- MAJOR_VERSION=`echo ${VERSION} | sed 's:^\(.*\)\..*\..*$:\1:'`
- use kipling && dosym ../../bin/labjack_kipling usr/local/bin/labjack_kipling
-
- dosym ../../lib64/libLabJackM.so usr/local/lib64/libLabJackM.so
- dosym ../../lib64/libLabJackM.so.${MAJOR_VERSION} usr/local/lib64/libLabJackM.so.${MAJOR_VERSION}
- dosym ../../lib64/libLabJackM.so.${VERSION} usr/local/lib64/libLabJackM.so.${VERSION}
-
- dosym ../../include/LabJackM.h usr/local/include/LabJackM.h
- dosym ../../include/LabJackMModbusMap.h usr/local/include/LabJackMModbusMap.h
- dosym ../../include/LJM_StreamUtilities.h usr/local/include/LJM_StreamUtilities.h
- dosym ../../include/LJM_Utilities.h usr/local/include/LJM_Utilities.h
-
- dosym ../../share/LabJack usr/local/share/LabJack
-}
-
-pkg_postinst() {
- elog
- elog "You may have to manually restart the device rules, e.g. using "
- elog " 'udevadm control --reload' or restart your computer."
- elog
- elog "If you have any LabJack devices connected, please disconnect and"
- elog " reconnect them afterwards for device rule changes to take effect"
- elog " (or use 'udevadm trigger')."
- elog
- elog "Note that (user) settings will be saved in the world writable"
- elog " directory /usr/share/LabJack/"
- elog
- # elog "labjack-ljm expects to be installed in /usr/local/, rather than /usr/."
- # elog "Hence, you need to set the following symlinks in order for the package to work:"
- # elog
- # elog "ln -s ../../lib64/libLabJackM.so /usr/local/lib64/libLabJackM.so"
- # elog "ln -s ../../lib64/libLabJackM.so.${MAJOR_VERSION} /usr/local/lib64/libLabJackM.so.${MAJOR_VERSION}"
- # elog "ln -s ../../lib64/libLabJackM.so.${VERSION} /usr/local/lib64/libLabJackM.so.${VERSION}"
- # elog
- # elog "ln -s ../../include/LabJackM.h /usr/local/include/LabJackM.h"
- # elog "ln -s ../../include/LabJackMModbusMap.h /usr/local/include/LabJackMModbusMap.h"
- # elog "ln -s ../../include/LJM_StreamUtilities.h /usr/local/include/LJM_StreamUtilities.h"
- # elog "ln -s ../../include/LJM_Utilities.h /usr/local/include/LJM_Utilities.h"
- # elog
- # elog "ln -s ../../share/LabJack /usr/local/share/LabJack"
- # elog
-}
-
-# pkg_prerm() {
-# elog "Removing /usr/share/LabJack symlink to avoid searching all installed packages for files installed via above symlink(s)..."
-# rm -f /usr/local/share/LabJack
-# }
-#
-# pkg_postrm() {
-# elog "Removing /usr/share/LabJack/ so that no settings remain"
-# rm -rf /usr/share/LabJack
-# }
diff --git a/sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221-r2.ebuild b/sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221-r3.ebuild
index 1ef804b..f0b0489 100644
--- a/sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221-r2.ebuild
+++ b/sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221-r3.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=8
DESCRIPTION="LabJackM driver + C library and Kipling for LabJack T4, T7, and Digit (64-bit)"
HOMEPAGE="https://labjack.com/support/software/installers/ljm"
@@ -20,15 +20,17 @@ RDEPEND="${DEPEND}"
S="${WORKDIR}/labjack_ljm_software_2017_12_21_x86_64"
src_prepare() {
+ eapply_user
+
# Unpack selfextracting tarball:
unmakeself labjack_ljm_installer.run
# Fix destination directories:
sed -i \
- -e "s:_DESTINATION=/usr/local/lib:_DESTINATION=${D}usr/lib64:" \
- -e "s:_DESTINATION=/usr/local/:_DESTINATION=${D}usr/:" \
- -e "s:_DESTINATION=/opt:_DESTINATION=${D}opt:" \
- -e "s:/lib/udev/rules.d:${D}lib/udev/rules.d:" \
+ -e "s:_DESTINATION=/usr/local/lib:_DESTINATION=${PORTAGE_BUILDDIR}/image/usr/lib64:" \
+ -e "s:_DESTINATION=/usr/local/:_DESTINATION=${PORTAGE_BUILDDIR}/image/usr/:" \
+ -e "s:_DESTINATION=/opt:_DESTINATION=${PORTAGE_BUILDDIR}/image/opt:" \
+ -e "s:/lib/udev/rules.d:${PORTAGE_BUILDDIR}/image/lib/udev/rules.d:" \
setup.sh
# Don't clean up. Print messages in success() in pkg_info():
@@ -58,7 +60,7 @@ src_prepare() {
src_install() {
## Note: installing in /usr/bin, /usr/lib, /usr/include and /usr/share doesn't work, since the /usr/local/... is hardcoded in some of the binaries...
- mkdir -p "${D}/usr/bin" "${D}/usr/include" "${D}/usr/lib64" "${D}/usr/share" "${D}/opt" "${D}/lib/udev/rules.d"
+ mkdir -p "${PORTAGE_BUILDDIR}/image/usr/bin" "${PORTAGE_BUILDDIR}/image/usr/include" "${PORTAGE_BUILDDIR}/image/usr/lib64" "${PORTAGE_BUILDDIR}/image/usr/share" "${PORTAGE_BUILDDIR}/image/opt" "${PORTAGE_BUILDDIR}/image/lib/udev/rules.d"
VERSION=`head -n 100 labjack_ljm_installer.run | grep scriptargs= | sed -e 's/scriptargs=//' -e 's/"//g'` # v2017_12_21_x86_64 has LJM library v1.17.0
elog "${P} contains LJM library ${VERSION}"
@@ -67,12 +69,12 @@ src_install() {
elog "Exiting LabJack setup script..."
# Remove symlink to non-existing target:
- rm -f "${D}/opt/labjack_kipling/node_modules/.bin/ncp"
+ rm -f "${PORTAGE_BUILDDIR}/image/opt/labjack_kipling/node_modules/.bin/ncp"
# Install header files for examples to /usr/include, so that they can be used elsewhere:
insinto usr/include
doins labjack_ljm_examples/LabJackMModbusMap.h labjack_ljm_examples/examples/LJM_Utilities.h labjack_ljm_examples/examples/stream/LJM_StreamUtilities.h
- chmod a-x "${D}usr/include/LabJackM.h" # Fix permissions
+ chmod a-x "${PORTAGE_BUILDDIR}/image/usr/include/LabJackM.h" # Fix permissions
# Install examples if desired:
if use examples; then
@@ -81,11 +83,11 @@ src_install() {
doins -r labjack_ljm_examples
fi
- # Do NOT install kipling if explicitly indicated witg the -kipling USE flag:
- use kipling || rm -rf "${D}/opt/" "${D}/usr/bin/"
+ # Do NOT install kipling if explicitly indicated with the -kipling USE flag:
+ use kipling || rm -rf "${PORTAGE_BUILDDIR}/image/opt/" "${PORTAGE_BUILDDIR}/image/usr/bin/"
# Create symlinks from /usr/... to /usr/local/... so that things actually work:
- mkdir -p "${D}/usr/local/bin" "${D}/usr/local/include" "${D}/usr/local/lib64" "${D}/usr/local/share"
+ mkdir -p "${PORTAGE_BUILDDIR}/image/usr/local/bin" "${PORTAGE_BUILDDIR}/image/usr/local/include" "${PORTAGE_BUILDDIR}/image/usr/local/lib64" "${PORTAGE_BUILDDIR}/image/usr/local/share"
MAJOR_VERSION=`echo ${VERSION} | sed 's:^\(.*\)\..*\..*$:\1:'`
use kipling && dosym ../../bin/labjack_kipling usr/local/bin/labjack_kipling
@@ -99,6 +101,10 @@ src_install() {
dosym ../../include/LJM_Utilities.h usr/local/include/LJM_Utilities.h
dosym ../../share/LabJack usr/local/share/LabJack
+
+ # Does not seem to work:
+ strip --strip-unneeded -R .comment -R .GCC.command.line -R .note.gnu.gold-version \
+ "${PORTAGE_BUILDDIR}/image/opt/labjack_kipling/Kipling" "${PORTAGE_BUILDDIR}/image/opt/labjack_kipling/core" "${PORTAGE_BUILDDIR}/image/usr/lib64/libLabJackM.so.${VERSION}"
}
pkg_postinst() {
@@ -113,28 +119,7 @@ pkg_postinst() {
elog "Note that (user) settings will be saved in the world writable"
elog " directory /usr/share/LabJack/"
elog
- # elog "labjack-ljm expects to be installed in /usr/local/, rather than /usr/."
- # elog "Hence, you need to set the following symlinks in order for the package to work:"
- # elog
- # elog "ln -s ../../lib64/libLabJackM.so /usr/local/lib64/libLabJackM.so"
- # elog "ln -s ../../lib64/libLabJackM.so.${MAJOR_VERSION} /usr/local/lib64/libLabJackM.so.${MAJOR_VERSION}"
- # elog "ln -s ../../lib64/libLabJackM.so.${VERSION} /usr/local/lib64/libLabJackM.so.${VERSION}"
- # elog
- # elog "ln -s ../../include/LabJackM.h /usr/local/include/LabJackM.h"
- # elog "ln -s ../../include/LabJackMModbusMap.h /usr/local/include/LabJackMModbusMap.h"
- # elog "ln -s ../../include/LJM_StreamUtilities.h /usr/local/include/LJM_StreamUtilities.h"
- # elog "ln -s ../../include/LJM_Utilities.h /usr/local/include/LJM_Utilities.h"
- # elog
- # elog "ln -s ../../share/LabJack /usr/local/share/LabJack"
- # elog
+ elog "labjack-ljm expects to be installed in /usr/local/, rather than /usr/."
+ elog "This has been hard-coded in some of the binaries, and moving files will"
+ elog " result in a defunct package."
}
-
-# pkg_prerm() {
-# elog "Removing /usr/share/LabJack symlink to avoid searching all installed packages for files installed via above symlink(s)..."
-# rm -f /usr/local/share/LabJack
-# }
-#
-# pkg_postrm() {
-# elog "Removing /usr/share/LabJack/ so that no settings remain"
-# rm -rf /usr/share/LabJack
-# }
diff --git a/sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221.ebuild b/sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221.ebuild
deleted file mode 100644
index 6bf2222..0000000
--- a/sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221.ebuild
+++ /dev/null
@@ -1,114 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-DESCRIPTION="LabJackM driver + C library and Kipling for LabJack T4, T7, and Digit (64-bit)"
-HOMEPAGE="https://labjack.com/support/software/installers/ljm"
-SRC_URI="https://labjack.com/sites/default/files/software/labjack_ljm_software_2017_12_21_x86_64.tar.gz"
-
-LICENSE="LabJack Boost-1.0 LGPL-2.1 MIT"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="examples +kipling"
-
-DEPEND="app-arch/unmakeself"
-RDEPEND="${DEPEND}"
-
-S="${WORKDIR}/labjack_ljm_software_2017_12_21_x86_64"
-
-src_prepare() {
- # Unpack selfextracting tarball:
- unmakeself labjack_ljm_installer.run
-
- # Fix destination directories:
- sed -i \
- -e "s:_DESTINATION=/usr/local/lib:_DESTINATION=${D}usr/local/lib64:" \
- -e "s:_DESTINATION=/usr/local/:_DESTINATION=${D}usr/local/:" \
- -e "s:_DESTINATION=/opt:_DESTINATION=${D}opt:" \
- -e "s:/lib/udev/rules.d:${D}lib/udev/rules.d:" \
- setup.sh
-
- # Don't clean up. Print messages in success() in pkg_info():
- sed -i 's:go rm -rf "./labjack_ljm_software":echo "The packages was installed succesfully"; exit 0 # \&:' setup.sh
-
- # The library path is added to /etc/ld.so.conf and ldconfig is run, but since we use the default dir (/usr/lib64/), this isn't necessary:
- sed -i 's:^setup_ldconfig$:# setup_ldconfig:' setup.sh
-
- # Cannot restart device rules at this stage:
- sed -i 's:^restart_device_rules$:# restart_device_rules:' setup.sh
-
- # Remove path from symbolic links in the same directory:
- sed -i \
- -e 's:ln -s -f ${LIB_DESTINATION}/${LJM_REALNAME} ${LIB_DESTINATION}/${LJM_SONAME}:ln -s -f ${LJM_REALNAME} ${LIB_DESTINATION}/${LJM_SONAME}:' \
- -e 's:ln -s -f ${LIB_DESTINATION}/${LJM_SONAME} ${LIB_DESTINATION}/${LJM_LINKERNAME}:ln -s -f ${LJM_SONAME} ${LIB_DESTINATION}/${LJM_LINKERNAME}:' \
- setup.sh
-}
-
-src_install() {
- # Note: installing in /usr/bin, /usr/lib, /usr/include and /usr/share doesn't work, since the /usr/local/... is hardcoded in some of the binaries...
- mkdir -p "${D}/usr/local/bin" "${D}/usr/local/include" "${D}/usr/local/lib64" "${D}/usr/local/share" "${D}/opt" "${D}/lib/udev/rules.d"
-
- VERSION=`head -n 100 labjack_ljm_installer.run | grep scriptargs= | sed -e 's/scriptargs=//' -e 's/"//g'` # v2017_12_21_x86_64 has LJM library v1.17.0
- elog "${P} contains LJM library ${VERSION}"
- elog "Running LabJack setup script..."
- ./setup.sh ${VERSION} || die
- elog "Exiting LabJack setup script..."
-
- # Remove symlink to non-existing target:
- rm -f "${D}/opt/labjack_kipling/node_modules/.bin/ncp"
-
- # Install header files for examples to /usr/local/include, so that they can be used elsewhere:
- insinto usr/local/include
- doins labjack_ljm_examples/LabJackMModbusMap.h labjack_ljm_examples/examples/LJM_Utilities.h labjack_ljm_examples/examples/stream/LJM_StreamUtilities.h
- chmod a-x "${D}usr/local/include/LabJackM.h" # Fix permissions
-
- # Install examples if desired:
- if use examples; then
- insinto usr/local/share/LabJack
- doins -r labjack_ljm_examples
- fi
-
- # Do NOT install kipling if explicitly indicated:
- use kipling || rm -rf "${D}/opt/" "${D}/usr/local/bin/"
-
- # Create symlinks from /usr/local/... to /usr/... so that the user can find stuff:
- mkdir -p "${D}/usr/bin" "${D}/usr/include" "${D}/usr/lib64" "${D}/usr/share"
- MAJOR_VERSION=`echo ${VERSION} | sed 's:^\(.*\)\..*\..*$:\1:'`
- use kipling && dosym ../local/bin/labjack_kipling usr/bin/labjack_kipling
-
- dosym ../local/lib64/libLabJackM.so usr/lib64/libLabJackM.so
- dosym ../local/lib64/libLabJackM.so.${MAJOR_VERSION} usr/lib64/libLabJackM.so.${MAJOR_VERSION}
- dosym ../local/lib64/libLabJackM.so.${VERSION} usr/lib64/libLabJackM.so.${VERSION}
-
- dosym ../local/include/LabJackM.h usr/include/LabJackM.h
- dosym ../local/include/LabJackMModbusMap.h usr/include/LabJackMModbusMap.h
- dosym ../local/include/LJM_StreamUtilities.h usr/include/LJM_StreamUtilities.h
- dosym ../local/include/LJM_Utilities.h usr/include/LJM_Utilities.h
-
- dosym ../local/share/LabJack usr/share/LabJack
-}
-
-pkg_postinst() {
- elog
- elog "You may have to manually restart the device rules, e.g. using "
- elog " 'udevadm control --reload' or restart your computer."
- elog
- elog "If you have any LabJack devices connected, please disconnect and"
- elog " reconnect them afterwards for device rule changes to take effect"
- elog " (or use 'udevadm trigger')."
- elog
- elog "Note that (user) settings will be saved in the world writable"
- elog " directory /usr/local/share/LabJack/"
- elog
-}
-
-pkg_prerm() {
- elog "Removing /usr/share/LabJack symlink to avoid searching all installed packages for files installed via above symlink(s)..."
- rm -f /usr/share/LabJack
-}
-
-pkg_postrm() {
- elog "Removing /usr/local/share/LabJack/ so that no settings remain"
- rm -rf /usr/local/share/LabJack
-}