upgpkg: sbcl 2.3.1-1
[arch-packages.git] / flatpak / trunk / PKGBUILD
blob69d1668016594ac1d14e5eb96070c92ecace3ddd
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.2
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=a98bbbe2ce7e5f370064e56411722a662f385ac1  # tags/1.15.2^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   fusermount3.diff
54   flatpak-bindir.sh
56 b2sums=('SKIP'
57         'SKIP'
58         'SKIP'
59         'SKIP'
60         'SKIP'
61         'c094461a28dab284c1d32cf470f38118a6cbce27acce633b81945fb859daef9bdec1261490f344221b5cacf4437f53934cb51173f7ad2f1d2e05001139e75c54'
62         '50746b629bdfc8de0a437c18883460e1ce31767bc723f1eaae564d05ce84f6a9255177fafb5d84eae8135c6dd1cd2422742bc680a2aa24081708d4a6e9b76dfc'
63         '1c45caa65e2a1598f219977d5a81dcb8ea5d458880c43c40ba452b0c77cbbf41b36fa6911741f22c807d318e04e39e4fcc1455ed8d68faaba10162dae2570abc')
65 pkgver() {
66   cd flatpak
67   git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
70 prepare() {
71   cd flatpak
73   # Support fuse3
74   # https://bugs.archlinux.org/task/75623
75   git apply -3 ../fusermount3.diff
77   git submodule init
78   git submodule set-url libglnx "$srcdir/libglnx"
79   git submodule set-url bubblewrap "$srcdir/bubblewrap"
80   git submodule set-url dbus-proxy "$srcdir/xdg-dbus-proxy"
81   git submodule set-url variant-schema-compiler "$srcdir/variant-schema-compiler"
82   git -c protocol.file.allow=always submodule update
85 build() {
86   local meson_options=(
87     -D dbus_config_dir=/usr/share/dbus-1/system.d
88     -D selinux_module=disabled
89     -D system_bubblewrap=bwrap
90     -D system_dbus_proxy=xdg-dbus-proxy
91   )
93   arch-meson flatpak build "${meson_options[@]}"
94   meson compile -C build
97 check() {
98   meson test -C build --print-errorlogs
101 _pick() {
102   local p="$1" f d; shift
103   for f; do
104     d="$srcdir/$p/${f#$pkgdir/}"
105     mkdir -p "$(dirname "$d")"
106     mv "$f" "$d"
107     rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
108   done
111 package_flatpak() {
112   depends+=(
113     libostree-1.so
114     xdg-desktop-portal
115   )
116   provides=(libflatpak.so)
118   meson install -C build --destdir "$pkgdir"
120   install -Dt "$pkgdir/etc/profile.d" -m644 flatpak-bindir.sh
121   install -Dt "$pkgdir/etc/flatpak/remotes.d" flathub.flatpakrepo
123   # Fixup mode to match polkit
124   install -d -o root -g 102 -m 750 "$pkgdir/usr/share/polkit-1/rules.d"
126   _pick docs "$pkgdir"/usr/share/{doc,gtk-doc}
129 package_flatpak-docs() {
130   pkgdesc+=" (documentation)"
131   depends=()
132   mv docs/* "$pkgdir"
135 # vim:set sw=2 sts=-1 et: