archrelease: copy trunk to extra-x86_64
[arch-packages.git] / libadwaita / trunk / PKGBUILD
blob75a7b66aafb14591e90572dd537b04a8a777708f
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
3 pkgbase=libadwaita
4 pkgname=(libadwaita libadwaita-docs libadwaita-demos)
5 pkgver=1.3.2
6 pkgrel=1
7 epoch=1
8 pkgdesc="Building blocks for modern adaptive GNOME applications"
9 url="https://gnome.pages.gitlab.gnome.org/libadwaita/"
10 arch=(x86_64)
11 license=(LGPL)
12 depends=(gtk4)
13 makedepends=(
14   gi-docgen
15   git
16   gobject-introspection
17   meson
18   sassc
19   vala
21 checkdepends=(weston)
22 _commit=dfaf404704a6e4a15d9881fc39ec8a607cd47701  # tags/1.3.2^0
23 source=("git+https://gitlab.gnome.org/GNOME/libadwaita.git#commit=$_commit")
24 b2sums=('SKIP')
26 pkgver() {
27   cd $pkgname
28   git describe --tags | sed -r 's/\.([a-z])/\1/;s/[^-]*-g/r&/;s/-/+/g'
31 prepare() {
32   cd $pkgname
35 build() {
36   arch-meson $pkgname build -D gtk_doc=true
37   meson compile -C build
40 check() (
41   export XDG_RUNTIME_DIR="$PWD/runtime-dir" WAYLAND_DISPLAY=wayland-5
43   mkdir -p -m 700 "$XDG_RUNTIME_DIR"
44   weston --backend=headless-backend.so --socket=$WAYLAND_DISPLAY --idle-time=0 &
45   _w=$!
47   trap "kill $_w; wait" EXIT
49   meson test -C build --print-errorlogs
52 _pick() {
53   local p="$1" f d; shift
54   for f; do
55     d="$srcdir/$p/${f#$pkgdir/}"
56     mkdir -p "$(dirname "$d")"
57     mv "$f" "$d"
58     rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
59   done
62 package_libadwaita() {
63   depends+=(libgtk-4.so)
64   provides+=(libadwaita-1.so)
66   meson install -C build --destdir "$pkgdir"
68   cd "$pkgdir"
70   _pick docs usr/share/doc
72   _pick demo usr/bin/adwaita-1-demo
73   _pick demo usr/share/applications/org.gnome.Adwaita1.Demo.desktop
74   _pick demo usr/share/icons/hicolor/*/apps/org.gnome.Adwaita1.Demo[-.]*
75   _pick demo usr/share/metainfo/org.gnome.Adwaita1.Demo.metainfo.xml
78 package_libadwaita-docs() {
79   pkgdesc+=" (documentation)"
80   depends=()
81   mv docs/* "$pkgdir"
84 package_libadwaita-demos() {
85   pkgdesc+=" (demo applications)"
86   depends=(libadwaita)
87   mv demo/* "$pkgdir"
90 # vim:set sw=2 sts=-1 et: