archrelease: copy trunk to extra-x86_64
[arch-packages.git] / flatpak / repos / extra-x86_64 / PKGBUILD
blobb3095acc7a09bec61edb3cbcdefda92676e92690
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: BartÅ‚omiej Piotrowski <bpiotrowski@archlinux.org>
3 # Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
5 pkgbase=flatpak
6 pkgname=(flatpak flatpak-docs)
7 pkgver=1.15.4
8 pkgrel=1
9 epoch=1
10 pkgdesc="Linux application sandboxing and distribution framework (formerly xdg-app)"
11 url="https://flatpak.org"
12 arch=(x86_64)
13 license=(LGPL)
14 depends=(
15   appstream
16   bubblewrap
17   curl
18   dbus
19   fuse3
20   glib2
21   json-glib
22   libarchive
23   libmalcontent
24   libseccomp
25   libxau
26   ostree
27   polkit
28   python
29   systemd
30   xdg-dbus-proxy
32 makedepends=(
33   docbook-xsl
34   git
35   gobject-introspection
36   gtk-doc
37   meson
38   python-pyparsing
39   xmlto
41 checkdepends=(
42   socat
43   valgrind
45 _commit=e936e3100d406c50ba49f3ad6a0ecae455345ec0  # tags/1.15.4^0
46 source=(
47   "git+https://github.com/flatpak/flatpak#commit=$_commit"
48   git+https://gitlab.gnome.org/GNOME/libglnx.git
49   git+https://github.com/projectatomic/bubblewrap
50   git+https://github.com/flatpak/xdg-dbus-proxy
51   git+https://gitlab.gnome.org/alexl/variant-schema-compiler.git
52   https://dl.flathub.org/repo/flathub.flatpakrepo
53   0001-Set-size-of-file-info-for-symlinks-to-0.patch
54   0002-tests-Don-t-use-g_test_message-before-g_test_init.patch
55   fusermount3.diff
56   flatpak-bindir.sh
58 b2sums=('SKIP'
59         'SKIP'
60         'SKIP'
61         'SKIP'
62         'SKIP'
63         'c094461a28dab284c1d32cf470f38118a6cbce27acce633b81945fb859daef9bdec1261490f344221b5cacf4437f53934cb51173f7ad2f1d2e05001139e75c54'
64         'e143c7bb1179b3fb337b05b14e3a2506b5603d315739e38df99264f98c362113fa4cc92bb3442c47354a3d0d91fd3dc6a9d4f92c7991db725867550c3ec07ca8'
65         '16e3006819ae991f676426163e69656b4340b8ca83c615668120858ec8e0a100c73e34b84ff94e6a62c6b5e7c9b95cf27ac95b9a8b33e81d53cc031364c53db3'
66         '81010a49af57e6047ab57285e3f8430da3b2be8504bc5600502da9a3729e9f92bb086a314ca8a03bca446e8f203150e378f3443f7034d8d7ade9dad6f1b9db59'
67         '1c45caa65e2a1598f219977d5a81dcb8ea5d458880c43c40ba452b0c77cbbf41b36fa6911741f22c807d318e04e39e4fcc1455ed8d68faaba10162dae2570abc')
69 pkgver() {
70   cd flatpak
71   git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
74 prepare() {
75   cd flatpak
77   # Fix tests
78   git apply -3 ../0001-Set-size-of-file-info-for-symlinks-to-0.patch
79   git apply -3 ../0002-tests-Don-t-use-g_test_message-before-g_test_init.patch
81   # Support fuse3
82   # https://bugs.archlinux.org/task/75623
83   git apply -3 ../fusermount3.diff
85   git submodule init
86   git submodule set-url libglnx "$srcdir/libglnx"
87   git submodule set-url bubblewrap "$srcdir/bubblewrap"
88   git submodule set-url dbus-proxy "$srcdir/xdg-dbus-proxy"
89   git submodule set-url variant-schema-compiler "$srcdir/variant-schema-compiler"
90   git -c protocol.file.allow=always submodule update
93 build() {
94   local meson_options=(
95     -D dbus_config_dir=/usr/share/dbus-1/system.d
96     -D selinux_module=disabled
97     -D system_bubblewrap=bwrap
98     -D system_dbus_proxy=xdg-dbus-proxy
99   )
101   arch-meson flatpak build "${meson_options[@]}"
102   meson compile -C build
105 check() {
106   meson test -C build --print-errorlogs
109 _pick() {
110   local p="$1" f d; shift
111   for f; do
112     d="$srcdir/$p/${f#$pkgdir/}"
113     mkdir -p "$(dirname "$d")"
114     mv "$f" "$d"
115     rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
116   done
119 package_flatpak() {
120   depends+=(
121     libostree-1.so
122     xdg-desktop-portal
123   )
124   provides=(libflatpak.so)
126   meson install -C build --destdir "$pkgdir"
128   install -Dt "$pkgdir/etc/profile.d" -m644 flatpak-bindir.sh
129   install -Dt "$pkgdir/etc/flatpak/remotes.d" flathub.flatpakrepo
131   # Fixup mode to match polkit
132   install -d -o root -g 102 -m 750 "$pkgdir/usr/share/polkit-1/rules.d"
134   _pick docs "$pkgdir"/usr/share/{doc,gtk-doc}
137 package_flatpak-docs() {
138   pkgdesc+=" (documentation)"
139   depends=()
140   mv docs/* "$pkgdir"
143 # vim:set sw=2 sts=-1 et: