summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 46bf63decc17f9e15acd8cc16d1bd00e9f481dc4 (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
# Maintainer: Christoph Haag <christoph.haag@collabora.com>
 
_realname='libinputsynth'
pkgname="$_realname-git"
pkgver=0.13.0.58.699426a
pkgrel=1
pkgdesc='Synthesize desktop input for X11 and Wayland'
arch=('i686' 'x86_64')
url='https://gitlab.freedesktop.org/xrdesktop/libinputsynth'
depends=('glib2')
provides=("$_realname="$pkgver)
conflicts=("$_realname")
makedepends=('meson' 'git' 'xdotool')
license=('MIT')
options=('debug' '!strip')
 
source=('git+https://gitlab.freedesktop.org/xrdesktop/libinputsynth.git')

md5sums=('SKIP')

ver() {
  PREFIX="project('libinputsynth', 'c', version: '"
  echo $(grep "$PREFIX" meson.build | sed -e "s/${PREFIX}//" | sed "s/',//")
}

pkgver() {
  cd $_realname
  hash=$(git log --pretty=format:'%h' -n 1)
  revision=$(git rev-list --count HEAD)
  echo $(ver).$revision.$hash
}

build() {
  cd $_realname
  rm -rf build
  meson build --prefix=/usr/ --libdir=lib
  ninja -C build
}

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