summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b156406baab2e9c24e1d624358df535411f0f3d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Maintainer: James Morris <james at jwm hyphen art dot net>
# Contributor: André <andre-arch at delorus dot de>
pkgname=fittotcx-git
pkgver=r38.afc81ca
pkgrel=1
pkgdesc="Converts a Garmin FIT file into TCX format outputting the result to standard output."
arch=('any')
url="https://github.com/Tigge/FIT-to-TCX"
license=('MIT')
depends=('python-lxml' 'python-fitparse-git')
makedepends=('git' 'python-build' 'python-installer' 'python-poetry-core')
source=("${pkgname%-git}"::git+https://github.com/Tigge/FIT-to-TCX)
md5sums=('SKIP')

pkgver(){
  cd "$srcdir/${pkgname%-git}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build(){
  cd "$srcdir/${pkgname%-git}"
  python -m build --wheel --no-isolation
}

package(){
  cd "$srcdir/${pkgname%-git}"
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 LICENCE ${pkgdir}/usr/share/licenses/$pkgname/LICENSE
}