summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0d27a6031ddace1995883441d7b236e7f4ef4bad (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
# Maintainer: Nikolay Korotkiy <sikmir@gmail.com>
_orgname=irdvo
_pkgname=gpxtools
_branch=master
pkgname=${_pkgname}-git
pkgver=r43.f7d289a
pkgrel=1
pkgdesc='A collection of command line tools for using GPX files'
arch=(x86_64)
url='https://notabug.org/irdvo/gpxtools'
license=('GPL3')
depends=('exiv2')
makedepends=('cmake' 'git')
provides=("${pkgname//-git}=${pkgver}")
conflicts=(${pkgname//-git})
source=("${_pkgname}-${_branch}::git+https://notabug.org/${_orgname}/${_pkgname}.git#branch=${_branch}")
sha256sums=('SKIP')

pkgver() {
  cd ${_pkgname}-${_branch}

  count="$(git rev-list --count HEAD)"
  head="$(git rev-parse --short HEAD)"

  printf "r%s.%s" "${count}" "${head}"
}

build() {
  cd ${_pkgname}-${_branch}

  rm -rf build
  mkdir -p build
  cd build

  cmake ..
  cmake --build .
}

package() {
  cd ${_pkgname}-${_branch}

  install -Dm755 build/gpx* -t ${pkgdir}/usr/bin
}