aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAstroFloyd <AstroFloyd@gmail.com>2018-04-30 16:22:56 +0200
committerAstroFloyd <AstroFloyd@gmail.com>2018-04-30 16:22:56 +0200
commitdace18a3c75d94f69dc520f542bdc4f3757f705e (patch)
treed81a16f85271c9b0c7f32ceddaf6793c02454785
parentAdd LabJack licence to repo. Update in LabJack package description (diff)
downloadAstroFloyd-dace18a3c75d94f69dc520f542bdc4f3757f705e.tar.gz
AstroFloyd-dace18a3c75d94f69dc520f542bdc4f3757f705e.tar.bz2
AstroFloyd-dace18a3c75d94f69dc520f542bdc4f3757f705e.zip
sci-electronics/labjack-ljm-64bit: Install in /usr/local/...; make symlinks to /usr/...
Package-Manager: Portage-2.3.24, Repoman-2.3.6
-rw-r--r--sci-electronics/labjack-ljm-64bit/ChangeLog5
-rw-r--r--sci-electronics/labjack-ljm-64bit/Manifest4
-rw-r--r--sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221.ebuild43
3 files changed, 41 insertions, 11 deletions
diff --git a/sci-electronics/labjack-ljm-64bit/ChangeLog b/sci-electronics/labjack-ljm-64bit/ChangeLog
index 468f1b5..e6b4097 100644
--- a/sci-electronics/labjack-ljm-64bit/ChangeLog
+++ b/sci-electronics/labjack-ljm-64bit/ChangeLog
@@ -1,3 +1,8 @@
+ 30 Apr 2018; AstroFloyd <AstroFloyd@gmail.com>
+ labjack-ljm-64bit-20171221.ebuild:
+ sci-electronics/labjack-ljm-64bit: Install in /usr/local/...; make symlinks to
+ /usr/...
+
*labjack-ljm-64bit-20171221 (30 Apr 2018)
30 Apr 2018; AstroFloyd <AstroFloyd@gmail.com>
diff --git a/sci-electronics/labjack-ljm-64bit/Manifest b/sci-electronics/labjack-ljm-64bit/Manifest
index 318d92a..2da5955 100644
--- a/sci-electronics/labjack-ljm-64bit/Manifest
+++ b/sci-electronics/labjack-ljm-64bit/Manifest
@@ -1,4 +1,4 @@
DIST labjack_ljm_software_2017_12_21_x86_64.tar.gz 69663743 BLAKE2B 2a654c72221eefa241fc3b877231177da7c6cec6d0396545daf297cb6cff0cbba132e9abb21509ca3c69432eb4ebc6fd36fd783202fb3fe129e191b3ab725af4 SHA512 a67bce9def668309eaf7298ef4b20d2337487f5badf1ca2fa9d4ad8b595d16e822133aea3df46c72528b151feafab0bcea172f6dcc4ff999300bdf3e5c6f7edf
-EBUILD labjack-ljm-64bit-20171221.ebuild 2759 BLAKE2B 6e7f0f3efa909bdcfc964abdd84494333d2ee691c61137bff1654c37872ce2c9f64cc6e9d6c909d95940cc9d5a490a7d5a44fd11acbf0e5ee3cdc7bac92b37da SHA512 d4f14abc4f4a0edbc9b3c22a9184e365588f128ecf099671a3d9e215004bc56262b6bc1ac283e0c8a8cfffeca51ee7b9f4812818a939358cc395e78c8c5ab97c
-MISC ChangeLog 211 BLAKE2B 5ee6142b8d4cf90e6b2752c3e57f11e0e353ceb66196964e7e7ab825da3ccda64d1b1e2248e6499678adf81af6c07fb80225cb435f380fa2a0f6d5f969bfff2e SHA512 05de297243c9616a59d389f06d5ff93dc786638fe4a29f598ad9a2837e8832663bd87d55152ec13a08736525f00bec3903b3bdad668aca7b20ddd4804f4c23ff
+EBUILD labjack-ljm-64bit-20171221.ebuild 4357 BLAKE2B 10fcd53ef1f5adeb99600af7a51c4d2bb963a405bf6b11a0224c9afdcdb05c2b081710c5430795a49e392efb9bfaf8a3b2e87f667af37e15f21c88fd3a28f2f5 SHA512 82b3fa06596e0ff007fb3f9bc0670a963c4fced4e526ebf6b0d2fe6e27d7ea0f8cf453dd4f80583344d33ff5e7f3631826d6f3816300ff04968bd062bbb82208
+MISC ChangeLog 390 BLAKE2B acf9422e7bd4d93275be4ff893e7dd6f1103b496b18484792851f27eab26d5790453f7f9518292f7649362847290c69d83963783d83adc53ef24af0f1e408102 SHA512 810effecd217f71f310e7cd8670e00f2bbea9770d26d5d8011b23883f8b690cd1221fb00d4e882fcd603e6e596909a3ba446a4d319cffece008d95f107ea51f5
MISC metadata.xml 329 BLAKE2B 8a3b4815e572375c40c64ef7c2266bf8823c3c2bd2b1cbd97e1f2c3daaaa6b101f28cf1569c3de1645795e73611ae408310ac94ff3de4b59458fd1062ccdaa82 SHA512 e5ac12d24d49db9203120c63cbc4e47ec61d43fed9168b03e0390cc9a934e0f819b5912257e77563d4d8ed26fea24fff8eb89b86b69949d029a22f5db74bdd41
diff --git a/sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221.ebuild b/sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221.ebuild
index 548cd97..7cdc9c0 100644
--- a/sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221.ebuild
+++ b/sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221.ebuild
@@ -23,8 +23,8 @@ src_prepare() {
# 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=/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
@@ -46,27 +46,52 @@ src_prepare() {
}
src_install() {
- mkdir -p "${D}/usr/bin" "${D}/usr/include" "${D}/usr/lib64" "${D}/usr/share" "${D}/opt" "${D}/lib/udev/rules.d"
+ # 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}"
- ./setup.sh ${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/share/LabJack
+ insinto usr/local/share/LabJack
doins -r labjack_ljm_examples
fi
# Do NOT install kipling if explicitly indicated:
- if ! use kipling; then
- rm -rf "${D}/opt/" "${D}/usr/bin/"
- fi
+ 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 "Please manually restart the device rules, e.g. using "
+ 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"