lzdoom: new package at 3.88b
[kiss-trunc88.git] / flatpak / build.bak
blob04040c83bf0ed02c66b49525f7db4b72e44a0bca
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
8 # root). User namespaces are much better, should be used
9 # in place of libcap and are free.
10 sed 's/as_fn_error.*libcap/: "/g'        configure > _
11 mv -f _ configure
12 sed 's/as_fn_error.*capability\.h/: "/g' configure > _
13 mv -f _ configure
15 # Remove fuse2 dependency (used solely with root "system-helper"
16 # daemon for file transfer. Unneeded in our case and drops the
17 # old fuse version.
18 sed 's/as_fn_error.*fuse/: "/g' configure > _
19 mv -f _ configure
21 # Turn the fuse2 filesystem into a C program which does nothing.
22 # This is the easiest way to "turn off" revokefs as there's
23 # no official support for doing so.
24 cat <<EOF > revokefs/main.c
25 int main() { return 0; }
26 EOF
27 : > revokefs/writer.c
29 chmod +x configure
30 ./configure \
31     --prefix=/usr \
32     --sysconfdir=/etc \
33     --without-systemd \
34     --disable-system-helper \
35     --disable-nls \
36     --disable-seccomp \
37     --disable-sandboxed-triggers \
38     --disable-documentation \
39     --disable-introspection \
40     --with-priv-mode=none
42 make
43 make install
45 # Remove dbus/systemd/libraries (unneeded stuff).
46 # This is a dumb warning which appears only when /usr/share does.
47 # shellcheck disable=2115
49     rm -rf "$1/etc"
50     rm -rf "$1/usr/share"
51     rm -rf "$1/usr/lib"
52     rm -rf "$1/usr/include"
53     rm  -f "$1/usr/libexec/revokefs-fuse"