joe102 [1] filed an orphan request for withings-sync [2]:

pkgname=withings-sync
pkgver=v4.2.2.r0.g427ae3c
pkgrel=1
pkgdesc="A tool for synchronisation of Withings (ex. Nokia Health
Body) to Garmin Connect and Trainer Road."
arch=(any)
url="https://github.com/jaroslawhartman/withings-sync";
license=(MIT)
depends=(
        python-garth
        python-lxml
        python-requests
        python-dotenv
        python-setuptools
)
makedepends=("python")
source=("$pkgname::git+https://github.com/jaroslawhartman/withings-
sync.git"
        "${pkgname}.service"
        "${pkgname}.timer"
        "${pkgname}.conf.example")

pkgver() {
    cd $pkgname
    git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

sha256sums=('SKIP'
'36b14f20346ed8f6c422ae528da2121b8426a279665b9191c3adc5f0f47bc387'
'fa0bbd87d27b8041591ab93c32c3cb7fb578bf3547184a017fd8d831a6345ddb'
'02132928a64560742db74e1813aed6a7f2b7a9ed9bc9f43b6fcf20c2e0afa6c7')
build() {
    cd $pkgname
    python setup.py build
}

package() {
  cd $pkgname
  python setup.py install --root="$pkgdir" --optimize=1 --skip-build

  install -Dm644 "${srcdir}/${pkgname}.service"
"${pkgdir}/usr/lib/systemd/user/${pkgname}.service"
  install -Dm644 "${srcdir}/${pkgname}.timer"
"${pkgdir}/usr/lib/systemd/user/${pkgname}.timer"
  install -Dm600 "${srcdir}/${pkgname}.conf.example"
"${pkgdir}/etc/${pkgname}/${pkgname}.conf.example"
  install -Dm644 LICENSE
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

  echo "1.) Initially run withings-sync from the cli for the <user> to
enable the access to withings"
  echo "2.) Copy Conf file to home directory and update with
Garmin/Trainer Road Username & P/W"
  echo "3.) Edit the service file to point to the conf file location"
  echo "       $systemctl --user edit --full withings-sync.service"
  echo "4.) Enable the timer: $systemctl --user enable --now withings-
sync.timer"
}

[1] https://aur.archlinux.org/account/joe102/
[2] https://aur.archlinux.org/pkgbase/withings-sync/

Reply via email to