summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 32c916b9894dc3a2c26c99f5c08934ab023e4b48 (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: Andreas Bolka <a AT bolka DOT at>

pkgname=visidata-git
pkgver=2.10.1.g987fd75f
pkgrel=2
pkgdesc='A console spreadsheet tool for discovering and arranging data'
arch=('any')
url='http://visidata.org/'
license=('GPLv3')
depends=('python' 'python-importlib-metadata')
makedepends=('git' 'python-pip' 'python-setuptools' 'python-wheel')
optdepends=('python-dnslib: pcap support'
            'python-dpkt: pcap support'  # AUR
            'python-fonttools: ttf/otf support'
            'python-h5py: hdf5 support'
            'python-lxml: html/xml support'
            'python-mapbox-vector-tile: mbtiles support'  # AUR
            'python-namestand: graphviz support'  # AUR
            'python-openpyxl: xlsx support'
            'python-pandas: dta (Stata) support'
            'python-pdfminer: pdf support'
            'python-psycopg2: postgres support'
            'python-pyaml: yaml/yml support'
            'python-pypng: png support'
            'python-pyshp: shapefiles support'  # AUR
            'python-requests: http support'
            'python-tabulate: tabulate saver support'
            'python-vobject: vcf support'
            'python-wcwidth: tabulate saver with unicode support'
            'python-xlrd: xls support')
provides=('visidata')
conflicts=('visidata')
source=("$pkgname::git+https://github.com/saulpw/visidata")
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/$pkgname"
  local PYVER=$(python setup.py --version)
  local GITID=$(git rev-parse --short HEAD)
  echo "$PYVER.g$GITID"
}

package() {
  cd "$srcdir/$pkgname"
  pip3 install . --user --root="$pkgdir" --no-warn-script-location
  install -Dm644 LICENSE.gpl3 "$pkgdir/usr/share/licenses/${pkgname%-*}/LICENSE"
  install -Dm644 CHANGELOG.md "$pkgdir/usr/share/doc/${pkgname%-*}/CHANGELOG.md"
  cp -R docs/* "$pkgdir/usr/share/doc/${pkgname%-*}/"
}