flatpak: bump to 1.12.6, fix libexecdir
[kiss-trunc88.git] / flatpak / build
blob8de827de2b614ac18196bb1702096d5fe54f962a
1 #!/bin/sh -e
3 for patch in *.patch; do
4 patch -p1 < "$patch"
5 done
7 # Remove libcap dependency (used solely when bwrap is suid root).
8 # User namespaces are better - should be used in place of libcap and are free.
9 sed 's/as_fn_error.*libcap/: "/g' configure > _
10 mv -f _ configure
11 sed 's/as_fn_error.*capability\.h/: "/g' configure > _
12 mv -f _ configure
14 # Remove fuse2 dependency (used solely w/ root "system-helper" daemon for file transfer.
15 # Unneeded in our case and drops the old fuse version.
16 sed 's/as_fn_error.*fuse/: "/g' configure > _
17 mv -f _ configure
19 # Turn the fuse2 filesystem into a C program which does nothing.
20 # This is the easiest way to "turn off" revokefs as there's no official support for doing so.
21 cat <<EOF > revokefs/main.c
22 int main() { return 0; }
23 EOF
24 : > revokefs/writer.c
26 chmod +x configure
27 ./configure \
28 --prefix=/usr \
29 --sysconfdir=/etc \
30 --libexecdir=/usr/lib \
31 --without-systemd \
32 --disable-system-helper \
33 --disable-nls \
34 --disable-seccomp \
35 --disable-sandboxed-triggers \
36 --disable-documentation \
37 --disable-introspection \
38 --with-priv-mode=none
40 make
41 make install
43 # Remove dbus/systemd/libraries (unneeded stuff).
44 # This is a dumb warning which appears only when /usr/share does.
45 # shellcheck disable=2115
47 rm -rf "$1/etc"
48 rm -rf "$1/usr/share"
49 rm -rf "$1/usr/lib"
50 rm -rf "$1/usr/include"
51 rm -f "$1/usr/libexec/revokefs-fuse"