]> Nutra Git (v2) - gamesguru/feather.git/commitdiff
flatpak: remove unneeded store items
authortobtoht <tob@featherwallet.org>
Thu, 29 Jun 2023 14:12:04 +0000 (16:12 +0200)
committertobtoht <tob@featherwallet.org>
Thu, 29 Jun 2023 15:56:06 +0000 (17:56 +0200)
contrib/flatpak/make_flatpak.sh

index ee691c876daa2b95667d73c72139a8e939d248bd..c0a8f1a0661d5ac5000cc73fd6aa12be1086118c 100644 (file)
@@ -44,7 +44,19 @@ LN_GUIX_STORE="$(get_store_path "ln-guix-store")/bin/ln-guix-store"
 
 # Patch Feather binary
 patchelf --set-interpreter "/${GUIX_GLIBC}/lib/ld-linux-x86-64.so.2" feather
-patchelf --set-rpath "/${GUIX_GLIBC}/lib:/${GUIX_FONTCONFIG}/lib:/${GUIX_GCC}/lib" feather
+patchelf --set-rpath "/${GUIX_GLIBC}/lib:/${GUIX_FONTCONFIG}/lib:\$ORIGIN/lib" feather
+
+# Copy dynamically linked libraries
+mkdir lib
+cp "${GUIX_GCC}/lib/libgcc_s.so.1" lib/
+
+# Remove unneeded store items
+chmod -R 755 .
+rm -rf "$(get_store_path "bash-static")"
+rm -rf "$(get_store_path "bash-minimal")"
+rm -rf "$(get_store_path "gcc")"
+rm -rf "$(get_store_path "font-dejavu")"
+rm -rf "$(get_store_path "util-linux")"
 
 # Fonts
 # fontconfig looks in /app/share/fonts
@@ -58,4 +70,6 @@ ln -s "/${GUIX_PROFILE}/share/xml" share/xml
 ln -s "/${GUIX_PROFILE}" profile
 
 # Setup startup symlink
-ln -s "/app/${LN_GUIX_STORE}" startup
\ No newline at end of file
+ln -s "/app/${LN_GUIX_STORE}" startup
+
+chmod -R 555 .
\ No newline at end of file