summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 51c5b53c95ef16bff17df4d44ecb2016c914254c (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
# Contributor: Thorsten Töpper <atsutane-tu@freethoughts.de>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Juergen Hoetzel <juergen@archlinux.org>
# Contributor: Gregor Ibic <gregor.ibic@intelicom.si>
# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>

pkgname=dia-git
_pkgname=dia
pkgver=6311.80b4c096
pkgrel=1
pkgdesc="A GTK+ based diagram creation program (GIT VERSION)"
arch=('x86_64')
license=('GPL')
url="http://live.gnome.org/Dia"
depends=('libxslt' 'gtk2' 'freetype2' 'python2')
makedepends=('git' 'cmake' 'meson' 'intltool' 'dblatex' 'docbook-xsl')
optdepends=('python2')
provides=('dia')
conflicts=('dia')
options=('docs' '!emptydirs')
source=("git+https://gitlab.gnome.org/GNOME/dia.git")
md5sums=('SKIP')

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

prepare() {
  cd ${_pkgname}
  for file in ./plug-ins/python/gtkcons.py ./plug-ins/python/doxrev.py; do
      sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' "$file"
  done
}

build() {
  cd ${_pkgname}

  export PYTHON=/usr/bin/python2
  meson --prefix /usr --buildtype=plain . build
  ninja -j1 -C build
}

package() {
  cd ${_pkgname}
  DESTDIR="${pkgdir}" ninja -C build install
}