summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4dedb272b99c05b41c27158e625e09cd0b47e06e (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
# Contributor: Yauheni Kirylau <yawghen-gmail-dot-com>

_pkgname=libui
pkgname=${_pkgname}-git
pkgver=alpha4.1.r327.gfea45b2d
pkgrel=1
pkgdesc='A portable GUI library for C'
arch=('i686' 'x86_64')
url='https://github.com/andlabs/libui'
license=('MIT')
depends=('gtk3' 'libx11' 'libxcb' 'libffi')
makedepends=('make' 'gcc' 'cmake' 'meson' 'ninja')
provides=('libui')
conflicts=('libui')
source=("$pkgname"::'git+https://github.com/andlabs/libui.git')
md5sums=('SKIP')

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

build() {
  cd "$srcdir/$pkgname"
  mkdir -p build
  meson build
  ninja -C build
  cd build/meson-out
  ln -sf libui.so.0 libui.so
}

package() {
  cd $pkgname
  mkdir -p $pkgdir/usr/{lib,include}
  install build/meson-out/libui.so ${pkgdir}/usr/lib/
  install build/meson-out/libui.so.0 ${pkgdir}/usr/lib/
  install ui.h ${pkgdir}/usr/include/
  install ui_unix.h ${pkgdir}/usr/include/
}