diff --git a/.github/workflows/guix.yml b/.github/workflows/guix.yml index 4d6962a..1e2e202 100644 --- a/.github/workflows/guix.yml +++ b/.github/workflows/guix.yml @@ -86,6 +86,8 @@ jobs: host: "x86_64-linux-gnu" - name: "x86_64-linux-gnu.no-tor-bundle" host: "x86_64-linux-gnu.no-tor-bundle" + - name: "x86_64-linux-gnu.flatpak" + host: "x86_64-linux-gnu.flatpak" - name: "aarch64-linux-gnu" host: "aarch64-linux-gnu" - name: "arm-linux-gnueabihf" diff --git a/contrib/depends/packages/qt.mk b/contrib/depends/packages/qt.mk index 4225555..b2d5504 100644 --- a/contrib/depends/packages/qt.mk +++ b/contrib/depends/packages/qt.mk @@ -30,6 +30,7 @@ $(package)_patches += windows_func_fix.patch $(package)_patches += WindowsToolchain.cmake $(package)_patches += revert_f99ee441.patch $(package)_patches += CVE-2023-34410-qtbase-6.5.diff +#$(package)_patches += fix-static-fontconfig-static-linking.patch $(package)_qttools_file_name=qttools-$($(package)_suffix) $(package)_qttools_sha256_hash=5744df9e84b2a86f7f932ffc00341c7d7209e741fd1c0679a32b855fcceb2329 @@ -72,7 +73,6 @@ $(package)_config_opts += -no-linuxfb #$(package)_config_opts += -no-libproxy # Needed $(package)_config_opts += -no-libudev $(package)_config_opts += -no-mtdev -$(package)_config_opts += -no-openssl # Needed $(package)_config_opts += -openssl-linked $(package)_config_opts += -no-openvg $(package)_config_opts += -no-reduce-relocations diff --git a/contrib/depends/patches/qt/fix-static-fontconfig-static-linking.patch b/contrib/depends/patches/qt/fix-static-fontconfig-static-linking.patch new file mode 100644 index 0000000..f84b1fd --- /dev/null +++ b/contrib/depends/patches/qt/fix-static-fontconfig-static-linking.patch @@ -0,0 +1,72 @@ +diff --git a/cmake/FindExpat.cmake b/cmake/FindExpat.cmake +new file mode 100644 +index 0000000000..cdba26e72e +--- /dev/null ++++ b/cmake/FindExpat.cmake +@@ -0,0 +1,9 @@ ++set(Expat_FOUND 0) ++ ++find_package(PkgConfig QUIET) ++ ++pkg_check_modules(EXPAT expat IMPORTED_TARGET) ++ ++if(TARGET PkgConfig::EXPAT) ++ set(Expat_FOUND 1) ++endif() +diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt +index b29be1a768..7446d7b1ae 100644 +--- a/src/gui/CMakeLists.txt ++++ b/src/gui/CMakeLists.txt +@@ -673,6 +673,14 @@ qt_internal_extend_target(Gui CONDITION QT_FEATURE_cssparser + text/qcssparser.cpp text/qcssparser_p.h + ) + ++qt_internal_extend_target(Gui CONDITION QT_FEATURE_fontconfig AND QT_FEATURE_freetype AND UNIX AND NOT APPLE ++ SOURCES ++ text/unix/qfontconfigdatabase.cpp text/unix/qfontconfigdatabase_p.h ++ text/unix/qfontenginemultifontconfig.cpp text/unix/qfontenginemultifontconfig_p.h ++ LIBRARIES ++ Fontconfig::Fontconfig ++) ++ + qt_internal_extend_target(Gui CONDITION QT_FEATURE_freetype + SOURCES + text/freetype/qfontengine_ft.cpp text/freetype/qfontengine_ft_p.h +@@ -681,17 +689,14 @@ qt_internal_extend_target(Gui CONDITION QT_FEATURE_freetype + WrapFreetype::WrapFreetype + ) + +-qt_internal_extend_target(Gui CONDITION UNIX AND NOT APPLE +- SOURCES +- text/unix/qgenericunixfontdatabase_p.h ++qt_internal_extend_target(Gui CONDITION QT_FEATURE_fontconfig AND UNIX AND NOT APPLE ++ LIBRARIES ++ PkgConfig::EXPAT + ) + +-qt_internal_extend_target(Gui CONDITION QT_FEATURE_fontconfig AND QT_FEATURE_freetype AND UNIX AND NOT APPLE ++qt_internal_extend_target(Gui CONDITION UNIX AND NOT APPLE + SOURCES +- text/unix/qfontconfigdatabase.cpp text/unix/qfontconfigdatabase_p.h +- text/unix/qfontenginemultifontconfig.cpp text/unix/qfontenginemultifontconfig_p.h +- LIBRARIES +- Fontconfig::Fontconfig ++ text/unix/qgenericunixfontdatabase_p.h + ) + + qt_internal_extend_target(Gui CONDITION APPLE AND NOT MACOS +diff --git a/src/gui/configure.cmake b/src/gui/configure.cmake +index d8319c120b..1ff24eebaf 100644 +--- a/src/gui/configure.cmake ++++ b/src/gui/configure.cmake +@@ -43,6 +43,7 @@ if(QT_FEATURE_system_zlib) + qt_add_qmake_lib_dependency(freetype zlib) + endif() + qt_find_package(Fontconfig PROVIDED_TARGETS Fontconfig::Fontconfig MODULE_NAME gui QMAKE_LIB fontconfig) ++qt_find_package(Expat PROVIDED_TARGETS PkgConfig::EXPAT MODULE_NAME gui QMAKE_LIB expat) + qt_add_qmake_lib_dependency(fontconfig freetype) + qt_find_package(gbm PROVIDED_TARGETS gbm::gbm MODULE_NAME gui QMAKE_LIB gbm) + qt_find_package(WrapSystemHarfbuzz 2.6.0 PROVIDED_TARGETS WrapSystemHarfbuzz::WrapSystemHarfbuzz MODULE_NAME gui QMAKE_LIB harfbuzz) +-- +2.41.0 + diff --git a/contrib/flatpak/.flatpakref b/contrib/flatpak/.flatpakref new file mode 100644 index 0000000..3085b3d --- /dev/null +++ b/contrib/flatpak/.flatpakref @@ -0,0 +1,8 @@ +[Flatpak Ref] +Name=org.featherwallet.Feather +Branch=stable +Title=Feather Wallet +Url=https://featherwalet.org/flatpak/ +RuntimeRepo=https://featherwalet.org/flatpak/org.featherwallet.Empty +IsRuntime=false +GPGKey=mQINBF/HogkBEAChsjCJUsZhDxOx5FrnRA3X5/mJd2xdKskLSPFtnYiQUtKvpRW6i/RVNMkTwFovzbXB6ucKJtY+OoEMu7xDhIkDWp//UlfHuP9AWAvqbhq6V5xVrZ419oQ7JNN4gwAI8+ZjcNq3IVFQQ9mZ3py9t1IUdgWtWM3P/SD7vWiPIjG0D3Bt3Ptl/mZjIFZZWUtFBItJLkiTpW0Ue4t98XMP6mvQiQ/LhP82OtSyCZ6agj4Wa3ve5KjApdEqamBGytx2kmN+AQFgMt66yOvr+97zzuEzI6mlWYORzOc1CFMsmPd6bu/dtQ4Z96T8PNI6i1Lv5VqvqC7RBErvD7hO36JZb8j+PnbE1YADTKrw0HmgpI6d3RLyVop3n6ZQri0+nZ+TH0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KkSeOu+4gOVguE9PgKr11lDlKOI38tR6xBXzidBe3cPdun6vQbd1Bdfdmx3JyFtlQo16kwwG2ZiVicXXugASBsrOFJa2/0lrtAPOnUWJsp2+1Ea6IzpRN8d1mNqr6ND+CLxBsWj16UXq34GW6vt/QM7N1Br4/6SuPtv8OmDGRkRH7h2pz5yMf5GOwQFqkgvOHt/x/sFPwk0GMgGn8aFr3vPH2YDg90mPn306Kv12e0JGkYVl4KqdL7u51gxT3z5C/4+hhPVGHSPkf+g0VY/eY136kuuAZjV3P36M6UaBeCyqeD7b3fJ5IJcLwD9NR0ustnn8IJ9zEwn+LY8kjRG8J3V57t2qAVGkMCiXnwFu3Vb+AYozOYi2ibu/N9QXV4dTHarw64HUtLu/HEtcYuzuM5nGOXYvWPz3pQBtlqsyrhIfeaywQ+O55h5/KBo8Ig== \ No newline at end of file diff --git a/contrib/flatpak/.flatpakrepo b/contrib/flatpak/.flatpakrepo new file mode 100644 index 0000000..d4b00b1 --- /dev/null +++ b/contrib/flatpak/.flatpakrepo @@ -0,0 +1,8 @@ +[Flatpak Repo] +Title=Feather Wallet +Url=https://featherwallet.org/flatpak +Homepage=https://featherwallet.org/ +Comment=Official Flatpak repository for Feather Wallet +Description=Official Flatpak repository for Feather Wallet +Icon=https://featherwallet.org/flatpak/icon.png +GPGKey=mQINBF/HogkBEAChsjCJUsZhDxOx5FrnRA3X5/mJd2xdKskLSPFtnYiQUtKvpRW6i/RVNMkTwFovzbXB6ucKJtY+OoEMu7xDhIkDWp//UlfHuP9AWAvqbhq6V5xVrZ419oQ7JNN4gwAI8+ZjcNq3IVFQQ9mZ3py9t1IUdgWtWM3P/SD7vWiPIjG0D3Bt3Ptl/mZjIFZZWUtFBItJLkiTpW0Ue4t98XMP6mvQiQ/LhP82OtSyCZ6agj4Wa3ve5KjApdEqamBGytx2kmN+AQFgMt66yOvr+97zzuEzI6mlWYORzOc1CFMsmPd6bu/dtQ4Z96T8PNI6i1Lv5VqvqC7RBErvD7hO36JZb8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Mq/ayJnmJPrDsKQBPalai01OsbC+h4BUysZf1n7eTRFDVaAKkSeOu+4gOVguE9PgKr11lDlKOI38tR6xBXzidBe3cPdun6vQbd1Bdfdmx3JyFtlQo16kwwG2ZiVicXXugASBsrOFJa2/0lrtAPOnUWJsp2+1Ea6IzpRN8d1mNqr6ND+CLxBsWj16UXq34GW6vt/QM7N1Br4/6SuPtv8OmDGRkRH7h2pz5yMf5GOwQFqkgvOHt/x/sFPwk0GMgGn8aFr3vPH2YDg90mPn306Kv12e0JGkYVl4KqdL7u51gxT3z5C/4+hhPVGHSPkf+g0VY/eY136kuuAZjV3P36M6UaBeCyqeD7b3fJ5IJcLwD9NR0ustnn8IJ9zEwn+LY8kjRG8J3V57t2qAVGkMCiXnwFu3Vb+AYozOYi2ibu/N9QXV4dTHarw64HUtLu/HEtcYuzuM5nGOXYvWPz3pQBtlqsyrhIfeaywQ+O55h5/KBo8Ig== \ No newline at end of file diff --git a/contrib/flatpak/flatpak.scm b/contrib/flatpak/flatpak.scm new file mode 100644 index 0000000..ce34e07 --- /dev/null +++ b/contrib/flatpak/flatpak.scm @@ -0,0 +1,118 @@ +(use-modules (gnu) + (gnu packages) + (gnu packages base) + (gnu packages bash) + (gnu packages certs) + (gnu packages check) + (gnu packages compression) + (gnu packages elf) + (gnu packages fonts) + (gnu packages fontutils) + (gnu packages gcc) + (gnu packages gettext) + (gnu packages glib) + (gnu packages libusb) + (gnu packages linux) + (gnu packages moreutils) + (gnu packages shells) + (gnu packages tls) + (gnu packages xorg) + (gnu packages xdisorg) + (guix build-system gnu) + (guix download) + ((guix licenses) #:prefix license:) + (guix packages) + (guix profiles) + (guix utils)) + +(define-public feather-binary + (package + (name "feather-binary") + (version (getenv "VERSION")) + (source (origin + (method url-fetch) + (uri (getenv "FILE")) + (sha256 (base32 (getenv "HASH"))))) + (build-system gnu-build-system) + (propagated-inputs + (list nss-certs + dbus + coreutils-minimal)) + (inputs (list fontconfig + (list gcc "lib") + libxkbcommon + libxcb + xcb-util-cursor + xcb-util-wm + xcb-util-image + xcb-util-keysyms + xcb-util-renderutil)) + (arguments + (list + #:strip-binaries? #f + #:phases + #~(modify-phases %standard-phases + (delete 'bootstrap) + (delete 'configure) + (delete 'build) + (delete 'check) + (delete 'validate-runpath) + (add-before 'install 'patchelff + (lambda* (#:key inputs outputs propagated-inputs #:allow-other-keys) + (let ((binary "feather") + (runpath '("gcc" + "dbus" + "fontconfig-minimal" + "libxkbcommon" + "libxcb" + "xcb-util-cursor" + "xcb-util-wm" + "xcb-util-image" + "xcb-util-keysyms" + "xcb-util-renderutil"))) + + (define* (maybe-make-rpath entries name) + (let ((entry (assoc-ref entries name))) + (if entry + (string-append entry "/lib") + #f))) + + (define* (make-rpath name) + (or + (maybe-make-rpath inputs name) + (maybe-make-rpath propagated-inputs name) + (error (format #f "`~a' not found among the inputs nor the outputs." name)))) + + (let ((rpath (string-join + (map make-rpath runpath) + ":"))) + (invoke "patchelf" "--set-rpath" rpath binary)) + + #t))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((target (string-append (assoc-ref outputs "out") "/bin/feather"))) + (mkdir-p (string-append (assoc-ref outputs "out") "/bin/")) + (copy-file "./feather" target))))))) + (native-inputs (list + patchelf + unzip)) + (home-page "https://featherwallet.org/") + (synopsis "A free, open-source Monero wallet") + (description + "Feather is a free, open-source Monero wallet for Linux, Tails, Windows and macOS.") + (license license:bsd-3))) + +(define utf8-locales + (make-glibc-utf8-locales + glibc + #:locales (list "en_US") + #:name "utf8-locales")) + +(packages->manifest + (append + (list feather-binary + strace + utf8-locales + font-wqy-zenhei + font-gnu-unifont))) \ No newline at end of file diff --git a/contrib/flatpak/make_flatpak.sh b/contrib/flatpak/make_flatpak.sh new file mode 100644 index 0000000..0fb4c0a --- /dev/null +++ b/contrib/flatpak/make_flatpak.sh @@ -0,0 +1,75 @@ +#!/usr/bin/env bash +set -ex + +APP_ID="org.featherwallet.Feather" + +get_store_path() { + find gnu/store -maxdepth 1 -type d -name "*$1*" | sort | head -n 1 +} + +cd /flatpak + +# Create build dir +mkdir build +cd build + +mkdir export +cp -a /feather/contrib/flatpak/share export +rm -rf export/share/app-info + +# Copy the metadata file +cp /feather/contrib/flatpak/metadata . + +mkdir files +cd files + +# Copy metadata +cp -a /feather/contrib/flatpak/share . +touch --no-dereference --date="@${SOURCE_DATE_EPOCH}" share/metainfo/${APP_ID}.metainfo.xml +gzip -c share/metainfo/${APP_ID}.metainfo.xml > share/app-info/xmls/${APP_ID}.xml.gz + +# Extract guix pack +tar xf /pack . + +# Get store paths +GUIX_BASH_STATIC=$(get_store_path "bash-static") +GUIX_COREUTILS=$(get_store_path "coreutils-minimal") +GUIX_GLIBC=$(get_store_path "glibc") +GUIX_PROFILE=$(get_store_path "profile") + +GLIBC_VERSION="${GUIX_GLIBC##*-}" + +# Patch ln +LN_PATH="${GUIX_COREUTILS}/bin/ln" + +chmod 655 "${LN_PATH}" + +patchelf --set-rpath "/app/${GUIX_GLIBC}/lib" "${LN_PATH}" +patchelf --set-interpreter "/app/${GUIX_GLIBC}/lib/ld-linux-x86-64.so.2" "${LN_PATH}" + +# Fonts +# fontconfig looks in /app/share/fonts +ln -s "/${GUIX_PROFILE}/share/fonts" share/fonts +ln -s "/${GUIX_PROFILE}/share/locale" share/locale +ln -s "/${GUIX_PROFILE}/share/dbus-1" share/dbus-1 +ln -s "/${GUIX_PROFILE}/share/xml" share/xml + +chmod 555 "${LN_PATH}" + +# create startup.sh +cat << EOF > startup.sh +#!/app/${GUIX_BASH_STATIC}/bin/bash +/app/${LN_PATH} -s /app/gnu /gnu +export PATH="/${GUIX_PROFILE}/bin" +mkdir -p /etc/ssl +# Qt expects certs to be here, see: qtbase/src/network/ssl/qsslsocket.cpp +ln -s /${GUIX_PROFILE}/etc/ssl/certs /etc/ssl/certs +mkdir -p /run/current-system/locale/${GLIBC_VERSION} +ln -s /${GUIX_PROFILE}/lib/locale/${GLIBC_VERSION}/en_US.UTF-8 /run/current-system/locale/${GLIBC_VERSION} +# Feather interpreter is set to /lib64/ld-linux-x86-64.so.2 +# Guix pack includes glibc twice if we add glibc to the inputs in flatpak.scm, so this is an alternative to patching +ln -s /${GUIX_GLIBC}/lib /lib64 +feather +EOF + +chmod 555 startup.sh \ No newline at end of file diff --git a/contrib/flatpak/make_runtime.sh b/contrib/flatpak/make_runtime.sh new file mode 100644 index 0000000..accf37e --- /dev/null +++ b/contrib/flatpak/make_runtime.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +set -ex + +mkdir empty +cd empty + +mkdir export files usr + +cat << EOF > metadata +[Runtime] +name=org.featherwallet.Empty +runtime=org.featherwallet.Empty/x86_64/empty +sdk=org.featherwallet.Empty/x86_64/empty +EOF \ No newline at end of file diff --git a/contrib/flatpak/metadata b/contrib/flatpak/metadata new file mode 100644 index 0000000..297a327 --- /dev/null +++ b/contrib/flatpak/metadata @@ -0,0 +1,11 @@ +[Application] +name=org.featherwallet.Feather +runtime=org.featherwallet.Empty/x86_64/stable +sdk=org.featherwallet.Empty/x86_64/stable +command=/app/startup.sh + +[Context] +shared=network;ipc; +sockets=x11;wayland; +devices=all; +filesystems=~/Monero:create; \ No newline at end of file diff --git a/contrib/flatpak/share/app-info/icons/flatpak/128x128/org.featherwallet.Feather.png b/contrib/flatpak/share/app-info/icons/flatpak/128x128/org.featherwallet.Feather.png new file mode 100644 index 0000000..3d9355a Binary files /dev/null and b/contrib/flatpak/share/app-info/icons/flatpak/128x128/org.featherwallet.Feather.png differ diff --git a/contrib/flatpak/share/app-info/icons/flatpak/256x256/org.featherwallet.Feather.png b/contrib/flatpak/share/app-info/icons/flatpak/256x256/org.featherwallet.Feather.png new file mode 100644 index 0000000..4c84674 Binary files /dev/null and b/contrib/flatpak/share/app-info/icons/flatpak/256x256/org.featherwallet.Feather.png differ diff --git a/contrib/flatpak/share/app-info/xmls/.gitkeep b/contrib/flatpak/share/app-info/xmls/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/contrib/flatpak/share/applications/org.featherwallet.Feather.desktop b/contrib/flatpak/share/applications/org.featherwallet.Feather.desktop new file mode 100644 index 0000000..f0af286 --- /dev/null +++ b/contrib/flatpak/share/applications/org.featherwallet.Feather.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Application +Name=Feather Wallet +GenericName=Monero Wallet +Comment=A free Monero desktop wallet +Icon=org.featherwallet.Feather +Exec=/app/startup.sh +Terminal=false +Categories=Network;Qt;Finance +StartupNotify=false +StartupWMClass=feather \ No newline at end of file diff --git a/contrib/flatpak/share/icons/hicolor/128x128/apps/org.featherwallet.Feather.png b/contrib/flatpak/share/icons/hicolor/128x128/apps/org.featherwallet.Feather.png new file mode 100644 index 0000000..3d9355a Binary files /dev/null and b/contrib/flatpak/share/icons/hicolor/128x128/apps/org.featherwallet.Feather.png differ diff --git a/contrib/flatpak/share/icons/hicolor/256x256/apps/org.featherwallet.Feather.png b/contrib/flatpak/share/icons/hicolor/256x256/apps/org.featherwallet.Feather.png new file mode 100644 index 0000000..4c84674 Binary files /dev/null and b/contrib/flatpak/share/icons/hicolor/256x256/apps/org.featherwallet.Feather.png differ diff --git a/contrib/flatpak/share/metainfo/org.featherwallet.Feather.metainfo.xml b/contrib/flatpak/share/metainfo/org.featherwallet.Feather.metainfo.xml new file mode 100644 index 0000000..90b72ea --- /dev/null +++ b/contrib/flatpak/share/metainfo/org.featherwallet.Feather.metainfo.xml @@ -0,0 +1,48 @@ + + + org.featherwallet.Feather + Feather + Monero desktop wallet + CC0-1.0 + BSD-3-Clause + + Network + Qt + Finance + Office + + +

Feather is a Monero wallet for desktop with the following features:

+ +
+ org.featherwallet.Feather.desktop + + + https://featherwallet.org/img/receive_light.png + + + https://featherwallet.org/ + https://github.com/feather-wallet/feather + https://docs.featherwallet.org/guides/donate + https://docs.featherwallet.org/guides/report-an-issue + https://docs.featherwallet.org + https://github.com/feather-wallet/feather +
\ No newline at end of file diff --git a/contrib/guix/guix-build b/contrib/guix/guix-build index c96cf22..f353b51 100755 --- a/contrib/guix/guix-build +++ b/contrib/guix/guix-build @@ -81,6 +81,7 @@ mkdir -p "$VERSION_BASE" # Default to building for all supported HOSTs (overridable by environment) export HOSTS="${HOSTS:-x86_64-linux-gnu aarch64-linux-gnu arm-linux-gnueabihf x86_64-linux-gnu.no-tor-bundle + x86_64-linux-gnu.flatpak riscv64-linux-gnu x86_64-w64-mingw32 x86_64-w64-mingw32.installer x86_64-apple-darwin arm64-apple-darwin}" @@ -316,6 +317,7 @@ for host in $HOSTS; do # Required for 'contrib/guix/manifest.scm' to output the right manifest # for the particular $HOST we're building for export HOST="${host_split[0]}" + export OPTIONS="${host_split[1]}" # shellcheck disable=SC2030 cat << EOF @@ -441,6 +443,31 @@ EOF DIST_ARCHIVE_BASE=/outdir-base/dist-archive \ OPTIONS="${host_split[1]}" \ bash -c "cd /feather && bash contrib/guix/libexec/build.sh" + + + case "$OPTIONS" in + flatpak) + export FILE="$(outdir_for_host "$host")/${DISTNAME}-flatpak.zip" + export HASH=$(guix hash "${FILE}") + export VERSION=${VERSION} + time-machine pack -S /opt/gnu/bin=bin --manifest="${PWD}/contrib/flatpak/flatpak.scm" + PACK=$(time-machine pack --manifest="${PWD}/contrib/flatpak/flatpak.scm") + time-machine environment --ad-hoc tar gzip findutils grep patchelf coreutils-minimal bash \ + --container \ + --pure \ + --no-cwd \ + --share="$PWD"=/feather \ + --share="$PACK"=/pack \ + --share="$(outdir_for_host "$host")"=/flatpak \ + --keep-failed \ + --fallback \ + --user="user" \ + ${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"} \ + ${ADDITIONAL_GUIX_COMMON_FLAGS} ${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS} \ + -- env SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:?unable to determine value}" \ + bash -c "cd /feather && bash contrib/flatpak/make_flatpak.sh" + ;; + esac ) done diff --git a/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh index 8294f8b..fb3562d 100755 --- a/contrib/guix/libexec/build.sh +++ b/contrib/guix/libexec/build.sh @@ -293,6 +293,9 @@ mkdir -p "$DISTSRC" CMAKEVARS+=" -DTOR_DIR=Off -DTOR_VERSION=Off" ANONDIST+="-a" ;; + flatpak) + CMAKEVARS+=" -DCHECK_UPDATES=Off -DSELF_CONTAINED=Off" + ;; esac ;; *gnueabihf) @@ -335,11 +338,13 @@ mkdir -p "$DISTSRC" case "$HOST" in *linux*) - bash contrib/AppImage/build-appimage.sh - APPIMAGENAME=${DISTNAME}${ANONDIST}${LINUX_ARCH}.AppImage - mv feather.AppImage "${APPIMAGENAME}" - cp "${APPIMAGENAME}" "${INSTALLPATH}/" - cp "${APPIMAGENAME}" "${OUTDIR}/" + if [ "$OPTIONS" != "flatpak" ]; then + bash contrib/AppImage/build-appimage.sh + APPIMAGENAME=${DISTNAME}${ANONDIST}${LINUX_ARCH}.AppImage + mv feather.AppImage "${APPIMAGENAME}" + cp "${APPIMAGENAME}" "${INSTALLPATH}/" + cp "${APPIMAGENAME}" "${OUTDIR}/" + fi ;; esac @@ -372,9 +377,6 @@ mkdir -p "$DISTSRC" cd installed case "$HOST" in - *linux*) - mv feather "${DISTNAME}" - ;; *darwin*) mv "feather.app" "Feather.app" ;; @@ -412,22 +414,32 @@ mkdir -p "$DISTSRC" esac ;; *linux*) - case "$OPTIONS" in - "") - find . -not -name "*.AppImage" -print0 \ - | xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}" - find . -not -name "*.AppImage" \ - | sort \ - | zip -X@ "${OUTDIR}/${DISTNAME}-linux${LINUX_ARCH}${ANONDIST}.zip" \ - || ( rm -f "${OUTDIR}/${DISTNAME}-linux${LINUX_ARCH}${ANONDIST}.zip" && exit 1 ) - ;; - esac - find . -name "*.AppImage" -print0 \ - | xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}" - find . -name "*.AppImage" \ - | sort \ - | zip -X@ "${OUTDIR}/${DISTNAME}-linux${LINUX_ARCH}-appimage${ANONDIST}.zip" \ - || ( rm -f "${OUTDIR}/${DISTNAME}-linux${LINUX_ARCH}-appimage${ANONDIST}.zip" && exit 1 ) + if [ "$OPTIONS" != "flatpak" ]; then + mv feather "${DISTNAME}" + case "$OPTIONS" in + "") + find . -not -name "*.AppImage" -print0 \ + | xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}" + find . -not -name "*.AppImage" \ + | sort \ + | zip -X@ "${OUTDIR}/${DISTNAME}-linux${LINUX_ARCH}${ANONDIST}.zip" \ + || ( rm -f "${OUTDIR}/${DISTNAME}-linux${LINUX_ARCH}${ANONDIST}.zip" && exit 1 ) + ;; + esac + find . -name "*.AppImage" -print0 \ + | xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}" + find . -name "*.AppImage" \ + | sort \ + | zip -X@ "${OUTDIR}/${DISTNAME}-linux${LINUX_ARCH}-appimage${ANONDIST}.zip" \ + || ( rm -f "${OUTDIR}/${DISTNAME}-linux${LINUX_ARCH}-appimage${ANONDIST}.zip" && exit 1 ) + else + find . -print0 \ + | xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}" + find . \ + | sort \ + | zip -X@ "${OUTDIR}/${DISTNAME}-flatpak.zip" \ + || ( rm -f "${OUTDIR}/${DISTNAME}-flatpak.zip" && exit 1 ) + fi ;; *darwin*) find . -print0 \ diff --git a/monero b/monero index bbebb16..3938ed0 160000 --- a/monero +++ b/monero @@ -1 +1 @@ -Subproject commit bbebb167879679703fd8f92970b336c25f4ee28c +Subproject commit 3938ed0534781105bd7c797f32c0c865df136fe6