summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 30ac6523d1930a4e3bc66b3167d1801ce8a53569 (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
# Maintainer: Aetf <aetf@unlimitedcodeworks.xyz>
# Contributor: Lukas Jirkovsky <l.jirkovsky@gmail.com>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Pierre Schmitz <pierre@archlinux.de>
_pkgname=kgraphviewer
pkgname=kgraphviewer-git
pkgver=2.4.3a.r29.g9a80c71
pkgrel=1
pkgdesc='A Graphviz dot graph file viewer for KDE'
arch=(x86_64)
url='http://www.kde.org/applications/graphics/kgraphviewer/'
license=(GPL FDL)
conflicts=($_pkgname)
provides=($_pkgname)
depends=(qt5-base qt5-svg kcoreaddons kdoctools kparts kio kwidgetsaddons kiconthemes graphviz)
makedepends=(cmake extra-cmake-modules boost docbook-xsl)
source=('git://anongit.kde.org/kgraphviewer')
md5sums=('SKIP')

pkgver() {
  cd $_pkgname
  ( set -o pipefail
    git describe --long 2>/dev/null | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

build(){
  cd "$srcdir"

  mkdir -p build
  cd build
  cmake ../$_pkgname \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DLIB_INSTALL_DIR=lib
  make
}

package() {
  cd "$srcdir/build"

  make DESTDIR="$pkgdir" install
}