summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1bf932bd3b84a5316df6b875e24216b0a6340999 (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
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Maƫl Lavault <moimael@neuf.fr>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
# Maintainer: Samuel Mesa <samuelmesa@linuxmail.org>

pkgname=libkml-dev
_pkgname=libkml
pkgver=1062.878abd1
pkgrel=1
pkgdesc="A KML library written in C++ with bindings to other languages"
arch=('i686' 'x86_64')
url="https://github.com/libkml/libkml"
license=('BSD')
depends=('expat' 'uriparser')
optdepends=('swig: bindings for additional languages'
            'python2: python bindings')
makedepends=('cmake' 'swig')    
provides=('libkml')
conflicts=('libkml-dev')
source=("libkml::git+https://github.com/libkml/libkml.git")
sha256sums=('SKIP')

pkgver() {
  cd ${_pkgname}
  printf "%s.%s" $(git rev-list --count HEAD) $(git rev-parse --short HEAD)
}

prepare() {
  cd ${_pkgname}
  git checkout synced_upstream
}

build() {
  cd ${_pkgname}

  if [ -f CMakeCache.txt ]  
    then
    rm -rf CMakeCache.txt CMakeFiles
  fi  

  rm -rf build && mkdir build
  cd build

   cmake .. \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DWITH_SWIG=OFF \
    -DWITH_PYTHON=OFF \
    -DBUILD_EXAMPLES=OFF

  # Add --disable-python or --disable-java to configure flags if your
  # system doesn't have corresponding language.

  make clean
  make
}

package() {
  cd ${_pkgname}
  cd build

  make || return 1
  make DESTDIR=${pkgdir} install
}