OCaml 4.14.0 rebuild
[arch-packages.git] / libportal / trunk / PKGBUILD
blobeb9dce2a5b6d53fff719dea45d3207c60b661e60
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2  
3 pkgbase=libportal
4 pkgname=(libportal libportal-{gtk3,gtk4,qt5,docs})
5 pkgver=0.6
6 pkgrel=1
7 pkgdesc="GIO-style async APIs for most Flatpak portals"
8 url="https://github.com/flatpak/libportal"
9 arch=(x86_64)
10 license=(LGPL3)
11 makedepends=(git meson gi-docgen vala gobject-introspection gtk3 gtk4 qt5-base
12              qt5-x11extras gjs)
13 checkdepends=(xorg-server-xvfb)
14 options=(debug)
15 _commit=13df0b887a7eb7b0f9b14069561a41f62e813155  # tags/0.6
16 source=("git+https://github.com/flatpak/libportal#commit=$_commit")
17 sha256sums=('SKIP')
19 pkgver() {
20   cd libportal
21   git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
24 prepare() {
25   cd libportal
28 build() {
29   arch-meson libportal build
30   meson compile -C build
33 check() {
34   xvfb-run -s '-nolisten local' \
35     meson test -C build --print-errorlogs
38 _pick() {
39   local p="$1" f d; shift
40   for f; do
41     d="$srcdir/$p/${f#$pkgdir/}"
42     mkdir -p "$(dirname "$d")"
43     mv "$f" "$d"
44     rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
45   done
48 package_libportal() {
49   depends=(libg{lib,object,io}-2.0.so)
50   provides=(libportal.so)
52   meson install -C build --destdir "$pkgdir"
54   cd "$pkgdir"
56   _pick gtk3 usr/include/libportal-gtk3
57   _pick gtk3 usr/lib{,/pkgconfig}/libportal-gtk3.*
58   _pick gtk3 {usr/lib/girepository-1.0,usr/share/gir-1.0}/XdpGtk3-1.0.*
59   _pick gtk3 usr/share/vala/vapi/libportal-gtk3.*
61   _pick gtk4 usr/include/libportal-gtk4
62   _pick gtk4 usr/lib{,/pkgconfig}/libportal-gtk4.*
63   _pick gtk4 {usr/lib/girepository-1.0,usr/share/gir-1.0}/XdpGtk4-1.0.*
64   _pick gtk4 usr/share/vala/vapi/libportal-gtk4.*
66   _pick qt5 usr/include/libportal-qt5
67   _pick qt5 usr/lib{,/pkgconfig}/libportal-qt5.*
69   _pick docs usr/share/doc
72 package_libportal-gtk3() {
73   pkgdesc+=" - GTK 3 backend"
74   depends=(libportal lib{gdk,gtk}-3.so)
75   provides=(libportal-gtk3.so)
77   mv gtk3/* "$pkgdir"
80 package_libportal-gtk4() {
81   pkgdesc+=" - GTK 4 backend"
82   depends=(libportal libgtk-4.so)
83   provides=(libportal-gtk4.so)
85   mv gtk4/* "$pkgdir"
88 package_libportal-qt5() {
89   pkgdesc+=" - Qt 5 backend"
90   depends=(libportal qt5-base qt5-x11extras)
91   provides=(libportal-qt5.so)
93   mv qt5/* "$pkgdir"
96 package_libportal-docs() {
97   pkgdesc+=" - documentation"
99   mv docs/* "$pkgdir"
102 # vim:set sw=2 et: