summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9d7aed34db3cb12683c2f6350795386571eabc94 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Maintainer: Vain <aurmaint1 on host: uninformativ dot de>
pkgname=asciiworld-git
pkgver=20.01
pkgrel=2
pkgdesc="ASCII world map and tools"
arch=('i686' 'x86_64')
url="https://uninformativ.de/git/asciiworld"
license=('MIT')
depends=('gd' 'shapelib')
makedepends=('git')
optdepends=('curl: Retrieving various data'
            'python: Additional tools, e.g. satellite tracking'
            'python-geographiclib: Geographic calculations, used by tools'
            'python-pyephem: Calculating satellite positions'
            'python-pygeoip: Reading GeoIP databases'
            'geoip-database-extra: An actual GeoIP database'
            'ncurses: For tput')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('git+https://uninformativ.de/git/asciiworld.git')
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/${pkgname%-git}"
  git describe --always | sed 's|-|.|g; s|v||'
}

build() {
  cd "$srcdir/${pkgname%-git}"
  make DEFAULT_MAP=/usr/share/"${pkgname%-git}"/ne_110m_land.shp
}

package() {
  cd "$srcdir/${pkgname%-git}"

  # Core program
  install -Dm755 asciiworld "$pkgdir"/usr/bin/asciiworld

  # Map data
  for i in ne_110m_land.sh{p,x}
  do
    install -Dm644 "$i" "$pkgdir/usr/share/${pkgname%-git}/$i"
  done

  # Satellite tracking suite
  for i in asciiworld{-sat-get,-sat-calc,-sat-track}
  do
    install -Dm755 "$i" "$pkgdir"/usr/bin/"$i"
  done

  # TCP monitor
  for i in asciiworld{-ip-geo,-tcp-monitor}
  do
    install -Dm755 "$i" "$pkgdir"/usr/bin/"$i"
  done

  # Generic helpers
  for i in asciiworld-waypoints
  do
    install -Dm755 "$i" "$pkgdir"/usr/bin/"$i"
  done

  # Documents
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/${pkgname%-git}/LICENSE"
  install -Dm644 README "$pkgdir/usr/share/doc/${pkgname%-git}/README"
  install -Dm644 README-tools.md \
    "$pkgdir/usr/share/doc/${pkgname%-git}/README-tools.md"
}