blob: c99622e86e6a6e601dbef1d74a8dcbfb7b3ac147 (
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# Maintainer: zoe < chp321 at gmail >
# Contributor: D. Can Celasun <dcelasun at gmail>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: Anton Bazhenov <anton.bazhenov at gmail>
# Contributor: Alexander Fehr <pizzapunk gmail com>
pkgname=pytrainer
pkgver=2.0.0rc1
pkgrel=2
pkgdesc='A tool to log your sport activities.'
arch=('any')
url='https://github.com/pytrainer/pytrainer/wiki'
license=('GPL')
depends=('python2-distribute' 'python2-lxml' 'python2-matplotlib' 'python2-sqlalchemy-migrate' 'pywebkitgtk' 'python2-sqlparse')
optdepends=('garmintools: "Garmin via garmintools" plugin'
'gdal: "Elevation correction" plugin'
'gpsbabel: "Garmin via GPSBabel 1.3.5" plugin'
'perl: garmin-fit plugin'
'zenity: garmintools and gpsbabel plugins')
source=("$pkgname-${pkgver}.tar.gz::https://github.com/$pkgname/$pkgname/archive/v${pkgver}.tar.gz"
$pkgname.sh
#pathfix.patch
)
md5sums=('1a29bd8749a7ce218e1959e918b60211'
'87bc8c7037f17f0be158853485ef713f'
#'c80aa188dce3a5675b15a703873bf3ad'
)
package() {
cd "$pkgname-$pkgver"
#patch -Np2 < "$srcdir/pathfix.patch"
sed -i 's/\/share\/pytrainer\//\/pytrainer\//' $srcdir/$pkgname-$pkgver/bin/$pkgname
sed -i 's/\/share\/locale/\/locale/' $srcdir/$pkgname-$pkgver/bin/$pkgname
# Fix python paths
find "$srcdir/" -name '*.py' -exec \
sed -ri 's@^#!\s*/usr/bin/(python|env python)$@#!/usr/bin/env python2@' {} +
# Install
export PYTHON="/usr/bin/env python2"
python2 setup.py install --prefix=/usr --root="$pkgdir"
# install launcher
mv "$pkgdir"/usr/{bin,share/$pkgname}/$pkgname
install -Dm755 "$srcdir/$pkgname.sh" "$pkgdir/usr/bin/$pkgname"
}
|