Package Details: openambit 1:0.4-2

Git Clone URL: https://aur.archlinux.org/openambit.git (read-only, click to copy)
Package Base: openambit
Description: Open software for the Suunto Ambit(2)
Upstream URL: http://openambit.org/
Licenses: GPL3+
Conflicts: openambit-git
Submitter: fanningert
Maintainer: fanningert
Last Packager: fanningert
Votes: 3
Popularity: 0.087551
First Submitted: 2015-08-23 14:56
Last Updated: 2017-11-09 19:33

Required by (0)

Sources (1)

Latest Comments

twilk commented on 2019-11-12 17:07

@mr_fred: That's because the symlinks in /usr/lib aren't chained properly.

This patch for the AUR package solves the problem for me:

diff --git a/.SRCINFO b/.SRCINFO
index da820c5..dd02de3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,3 @@
-# Generated by mksrcinfo v8
-# Thu Nov  9 19:33:23 UTC 2017
 pkgbase = openambit
    pkgdesc = Open software for the Suunto Ambit(2)
    pkgver = 0.4
@@ -12,7 +10,7 @@ pkgbase = openambit
    makedepends = cmake
    makedepends = gcc
    makedepends = glibc
-   makedepends = qt4
+   makedepends = qt5-tools
    makedepends = qjson
    makedepends = zlib
    makedepends = libusb
@@ -20,7 +18,7 @@ pkgbase = openambit
    conflicts = openambit-git
    options = !strip
    options = !emptydirs
-   source = openambit::git+https://github.com/openambitproject/openambit.git#tag=0.4
+   source = openambit::git+https://github.com/openambitproject/openambit.git
    sha512sums = SKIP

 pkgname = openambit
diff --git a/PKGBUILD b/PKGBUILD
index 45ed100..be9fcf5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,29 +10,27 @@ url="http://openambit.org/"
 license=('GPL3+')
 #depends=('qt4' 'qjson' 'zlib' 'libusb' 'libpcap')
 optdepends=()
-makedepends=('cmake' 'gcc' 'glibc' 'qt4' 'qjson' 'zlib' 'libusb' 'libpcap')
+makedepends=('cmake' 'gcc' 'glibc' 'qt5-tools' 'qjson' 'zlib' 'libusb' 'libpcap')
 conflicts=('openambit-git')
 options=('!strip' '!emptydirs')

-source=("$pkgname::git+https://github.com/openambitproject/${pkgname}.git#tag=${pkgver}")
+source=("$pkgname::git+https://github.com/openambitproject/${pkgname}.git")

 sha512sums=('SKIP')

-prepare() {
-  msg2 "Prepare"
-}
-
 build() {
-  msg2 "Build"
   cd "${srcdir}/${pkgname}"
-  ./build.sh -DCMAKE_BUILD_TYPE=Debug
+  BUILD_EXTRAS=0 ./build.sh -DCMAKE_BUILD_TYPE=Debug
 }

 package() {
-  msg2 "Package"
   install -Dm0644 "${srcdir}/${pkgname}/libambit-build/libambit.so.0.4.0" "${pkgdir}/usr/lib/${pkgname}/libambit.so.0.4.0"
-  ln -s /usr/lib/${pkgname}/libambit.so.0.4.0 $pkgdir/usr/lib/libambit.so.0
-  ln -s /usr/lib/${pkgname}/libambit.so.0 $pkgdir/usr/lib/libambit.so
+  ln -s "${pkgname}/libambit.so.0.4.0" "$pkgdir/usr/lib/libambit.so.0"
+  ln -s libambit.so.0 "$pkgdir/usr/lib/libambit.so"
+
+  install -Dm0644 "${srcdir}/${pkgname}/movescount-build/libmovescount.so.0.3.0" "${pkgdir}/usr/lib/${pkgname}/libmovescount.so.0.3.0"
+  ln -s "${pkgname}/libmovescount.so.0.3.0" "$pkgdir/usr/lib/libmovescount.so.0"
+  ln -s libmovescount.so.0 "$pkgdir/usr/lib/libmovescount.so"

   install -Dm0755 "${srcdir}/${pkgname}/openambit-build/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
   #install -Dm0644 "${srcdir}/${pkgname}/src/openambit/deployment/99-suunto-ambit.rules" "${pkgdir}/usr/lib/udev/rules.d/99-suunto-ambit.rules"

(CC @fanningert)

mr_fred commented on 2019-09-02 15:14

The build appears to work correctly but when i attempt to open openambit i recieve the error

> openambit
openambit: error while loading shared libraries: libmovescount.so.0: cannot open shared object file: No such file or directory

twilk commented on 2019-05-11 20:41

The 0.4 release unfortunately doesn't build for me any more as cmake doesn't recognise qjson as being installed -- the package only installs Qt5-related files. Installing qt5-tools and qjson, and building master instead of 0.4 fixes this, though this is not a release and maybe better suited to the openambit-git package.

Here's my working PKGBUILD:

# Maintainer: Thomas Fanninger <thomas@fanninger.at>
# Contributor: Timo Wilken <timo dot 21 dot wilken plus aur at gmail dot com>

pkgname=openambit
pkgver=0.4-master
pkgrel=3
epoch=1
pkgdesc="Open software for the Suunto Ambit(2)"
arch=('i686' 'x86_64')
url="http://openambit.org/"
license=('GPL3+')
optdepends=()
makedepends=('cmake' 'gcc' 'glibc' 'qt5-tools' 'qjson' 'zlib' 'libusb' 'libpcap')
conflicts=('openambit-git')
options=('!strip' '!emptydirs')

source=("$pkgname::git+https://github.com/openambitproject/${pkgname}.git")

sha512sums=('SKIP')

build() {
  cd "${srcdir}/${pkgname}"
  ./build.sh -DCMAKE_BUILD_TYPE=Debug
}

package() {
  install -Dm0644 "${srcdir}/${pkgname}/libambit-build/libambit.so.0.4.0" "${pkgdir}/usr/lib/${pkgname}/libambit.so.0.4.0"
  ln -s "/usr/lib/${pkgname}/libambit.so.0.4.0" "$pkgdir/usr/lib/libambit.so.0"
  ln -s "/usr/lib/${pkgname}/libambit.so.0" "$pkgdir/usr/lib/libambit.so"

  # libmovescount split off after 0.4, it is now a separate library in the same repository
  install -Dm0644 "${srcdir}/${pkgname}/movescount-build/libmovescount.so.0.3.0" "${pkgdir}/usr/lib/${pkgname}/libmovescount.so.0.3.0"
  ln -s "/usr/lib/${pkgname}/libmovescount.so.0.3.0" "$pkgdir/usr/lib/libmovescount.so.0"
  ln -s "/usr/lib/${pkgname}/libmovescount.so.0" "$pkgdir/usr/lib/libmovescount.so"

  install -Dm0755 "${srcdir}/${pkgname}/openambit-build/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
  # apparently not present in master any more
  #install -Dm0644 "${srcdir}/${pkgname}/src/openambit/deployment/99-suunto-ambit.rules" "${pkgdir}/usr/lib/udev/rules.d/99-suunto-ambit.rules"

  install -Dm0644 "${srcdir}/${pkgname}/tools/movescountXmlDiff.pl" "${pkgdir}/usr/share/${pkgname}/movescountXmlDiff.pl"
  install -Dm0644 "${srcdir}/${pkgname}/tools/openambit2gpx.py" "${pkgdir}/usr/share/${pkgname}/openambit2gpx.py"
}