summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a95ee833313baae853de050e471f35b8e8f8d2c8 (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
# Maintainer: Shengyu Zhang <la@archlinuxcn.org>
# Contributor: Lubosz Sarnecki <lubosz@gmail.com>

_realname='graphene'
pkgname="$_realname-git"
pkgver=1.9.6.r1.g735918a
pkgrel=1
pkgdesc='A thin layer of graphic data types'
arch=('i686' 'x86_64')
url='https://github.com/ebassi/graphene/'
depends=('glib2')
makedepends=('git' 'gtk-doc' 'gobject-introspection' 'meson')
provides=("$_realname="$pkgver)
conflicts=("$_realname")
license=('MIT')
source=('git+https://github.com/ebassi/graphene.git')
md5sums=('SKIP')

subver() {
  PREFIX="m4_define(\[graphene_$1_version\], \["
  echo $(grep "$PREFIX" configure.ac | eval sed "'s/$PREFIX//'" | sed 's/\])//')
}

pkgver() {
  cd $_realname
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  arch-meson $_realname build -D gtk_doc=true
  ninja -C build
}

check() {
  meson test -C build
}

package() {
  DESTDIR="$pkgdir" meson install -C build
  install -Dt "$pkgdir/usr/share/licenses/$_realname" -m644 $_realname/LICENSE.txt
  rm -r "$pkgdir"/usr/{lib,share}/installed-tests
}