summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ad53c1f01d8c419a21df6af24204391e6fc44cd4 (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
# Maintainer: dreieck (https://aur.archlinux.org/account/dreieck)

_pkgname=marble-maps-tracestrack
pkgname="${_pkgname}-git"
epoch=0
pkgver=r2.20250522.780a1a7
pkgrel=1
pkgdesc="Maps served by Tracestrack Maps for KDE marble. API key required and asked for during build."
url="https://gitlab.com/dreieckli/marble-maps-tracestrack"
arch=('any')
license=(
  'LicenseRef-Public_Domain'
  'ODbL-1.0'
  'CC-BY-4.0'
)
groups=()
depends=(
  'marble-common'
)
makedepends=(
  'bash'
  'git'
)
optdepends=()
provides=(
  "${_pkgname}=${pkgver}"
  "marble-maps-tracestrack-base"
  "marble-maps-tracestrack-topo"
)
conflicts=(
  "${_pkgname}"
  "marble-maps-tracestrack-base"
  "marble-maps-tracestrack-topo"
)
replaces=()
options=('emptydirs')
source=(
  "${_pkgname}::git+https://gitlab.com/dreieckli/marble-maps-tracestrack.git"
)
sha256sums=(
  'SKIP'
)

pkgver() {
  cd "${srcdir}/${_pkgname}"

  _rev="$(git rev-list --count HEAD)"
  _date="$(git log -1 --date=format:"%Y%m%d" --format="%ad")"
  _hash="$(git rev-parse --short HEAD)"

  printf '%s' "r${_rev}.${_date}.${_hash}"
}

build() {
  cd "${srcdir}/${_pkgname}"
  ./build.sh
}

package() {
  cd "${srcdir}/${_pkgname}"

  mkdir -pv "${pkgdir}/usr/share/marble/data/maps/earth/"
  cp -rv build/tracestrack-* "${pkgdir}/usr/share/marble/data/maps/earth/"

  install -v -D -m644 "README.md" "${pkgdir}/usr/share/doc/${_pkgname}/README.md"
  install -v -D -m644 "COPYING.txt" "${pkgdir}/usr/share/licenses/${pkgname}/COPYING.TXT"
}