upgpkg: maxima 5.46.0-9 (sbcl rebuild)
[arch-packages.git] / libportal / trunk / PKGBUILD
blobb175f0aa8cae2bf61608ffff1d50dda133722617
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 _commit=13df0b887a7eb7b0f9b14069561a41f62e813155  # tags/0.6
15 source=("git+https://github.com/flatpak/libportal#commit=$_commit")
16 sha256sums=('SKIP')
18 pkgver() {
19   cd libportal
20   git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
23 prepare() {
24   cd libportal
27 build() {
28   arch-meson libportal build
29   meson compile -C build
32 check() {
33   xvfb-run -s '-nolisten local' \
34     meson test -C build --print-errorlogs
37 _pick() {
38   local p="$1" f d; shift
39   for f; do
40     d="$srcdir/$p/${f#$pkgdir/}"
41     mkdir -p "$(dirname "$d")"
42     mv "$f" "$d"
43     rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
44   done
47 package_libportal() {
48   depends=(libg{lib,object,io}-2.0.so)
49   provides=(libportal.so)
51   meson install -C build --destdir "$pkgdir"
53   cd "$pkgdir"
55   _pick gtk3 usr/include/libportal-gtk3
56   _pick gtk3 usr/lib{,/pkgconfig}/libportal-gtk3.*
57   _pick gtk3 {usr/lib/girepository-1.0,usr/share/gir-1.0}/XdpGtk3-1.0.*
58   _pick gtk3 usr/share/vala/vapi/libportal-gtk3.*
60   _pick gtk4 usr/include/libportal-gtk4
61   _pick gtk4 usr/lib{,/pkgconfig}/libportal-gtk4.*
62   _pick gtk4 {usr/lib/girepository-1.0,usr/share/gir-1.0}/XdpGtk4-1.0.*
63   _pick gtk4 usr/share/vala/vapi/libportal-gtk4.*
65   _pick qt5 usr/include/libportal-qt5
66   _pick qt5 usr/lib{,/pkgconfig}/libportal-qt5.*
68   _pick docs usr/share/doc
71 package_libportal-gtk3() {
72   pkgdesc+=" - GTK 3 backend"
73   depends=(libportal lib{gdk,gtk}-3.so)
74   provides=(libportal-gtk3.so)
76   mv gtk3/* "$pkgdir"
79 package_libportal-gtk4() {
80   pkgdesc+=" - GTK 4 backend"
81   depends=(libportal libgtk-4.so)
82   provides=(libportal-gtk4.so)
84   mv gtk4/* "$pkgdir"
87 package_libportal-qt5() {
88   pkgdesc+=" - Qt 5 backend"
89   depends=(libportal qt5-base qt5-x11extras)
90   provides=(libportal-qt5.so)
92   mv qt5/* "$pkgdir"
95 package_libportal-docs() {
96   pkgdesc+=" - documentation"
98   mv docs/* "$pkgdir"
101 # vim:set sw=2 et: