summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5a47d0e41df1cb1b6a343ee2960603d3d119d920 (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
# Maintainer: Sanpi <sanpi+aur@homecomputing.fr>
pkgname='qmapshack-hg'
pkgver=1.13.0.r50.55dee1ae0d55
pkgrel=1
pkgdesc='Plan your next outdoor trip'
arch=('x86_64')
url='https://bitbucket.org/maproom/qmapshack/'
license=('GPL3')
depends=('gdal' 'desktop-file-utils' 'quazip' 'qt5-webengine' 'routino>=3.1')
makedepends=('cmake' 'mercurial')
conflicts=('qmapshack')
provides=('qmapshack')
source=("$pkgname::hg+https://bitbucket.org/maproom/qmapshack")
sha256sums=('SKIP')

pkgver() {
    cd "$pkgname"

    hg log -r . --template '{latesttag}.r{latesttagdistance}.{node|short}' | sed 's/V //'
}

build() {
    cd "$pkgname"

    sed -i "s/set(VERSION_SUFFIX \"develop\")/set(VERSION_SUFFIX \"r${pkgver#*r}\")/" CMakeLists.txt
    [ ! -f cmake/Modules/FindPROJ4.cmake ] && patch --quiet -p1 < FindPROJ4.patch
    [ ! -f cmake/Modules/FindQuaZip5.cmake ] && patch --quiet -p1 < FindQuaZip5.patch
    cmake ./ -DCMAKE_INSTALL_PREFIX=/usr
    make
}

package() {
    cd "$pkgname"

    make DESTDIR="${pkgdir}" install
}