From dd53bade7b3438df83e254f88f800ce699ce6dae Mon Sep 17 00:00:00 2001 From: Bert van der Weerd Date: Sat, 29 Oct 2022 18:05:47 +0200 Subject: [PATCH] switch to main branch --- lw-linux-base/Makefile | 1 + lw-linux-base/assets/flatpak/artifacts.mk | 30 +++- .../io.gitlab.librewolf-community.json | 135 ++++++++++++++++++ lw-linux-base/assets/flatpak/setup-debian.sh | 9 ++ version | 2 +- 5 files changed, 171 insertions(+), 6 deletions(-) create mode 100644 lw-linux-base/assets/flatpak/io.gitlab.librewolf-community.json create mode 100755 lw-linux-base/assets/flatpak/setup-debian.sh diff --git a/lw-linux-base/Makefile b/lw-linux-base/Makefile index db645bc..db1228a 100644 --- a/lw-linux-base/Makefile +++ b/lw-linux-base/Makefile @@ -7,6 +7,7 @@ full_version:=$(version)-$(source_release)$(shell [ $(release) -gt 1 ] && echo " mozbuild=~/.mozbuild assets=assets/linux-base + ifeq ($(target_type),) target_type:=flatpak endif diff --git a/lw-linux-base/assets/flatpak/artifacts.mk b/lw-linux-base/assets/flatpak/artifacts.mk index d5912e6..816cb9c 100644 --- a/lw-linux-base/assets/flatpak/artifacts.mk +++ b/lw-linux-base/assets/flatpak/artifacts.mk @@ -4,11 +4,31 @@ version:=$(shell cat version) release:=$(shell cat release) source_release:=$(shell cat source_release) full_version:=$(version)-$(source_release)$(shell [ $(release) -gt 1 ] && echo "-$(release)") -mozbuild=~/.mozbuild -incoming_artifact=firefox-$(full_version).en-US.win64.zip -setupname=librewolf-$(full_version).en-US.win64-setup.exe -zipname=librewolf-$(full_version).en-US.win64-portable.zip +ifeq ($(target_type),) +target_type:=flatpak +endif + +ifeq ($(arch),) +arch:=x86_64 +endif + +binary_tarball:=librewolf-$(full_version).en-US.linux-$(arch).tar.bz2 + +flatpak_repo=librewolf-$(full_version).$(arch).flatpak-repo +flatpak_bundle=LibreWolf-$(full_version).$(arch).flatpak +flatpak_build_folder=work artifacts : - @echo "assets/flatpak/artifacts.mk: Starting artifacts build." + @echo "assets/flatpak/artifacts.mk: Starting artifacts build for version $(full_version) for $(arch)." + rm -rf work + +# ideally, we wanna do this somewhere else + sudo ./assets/flatpak/setup-debian.sh + rm -rf assets/flatpak/shared-modules + ( cd assets/flatpak && git clone "https://github.com/flathub/shared-modules.git" && cd shared-modules && git checkout fd4d38328ccb078b88ad4a891807e593ae8de806) + + flatpak-builder --disable-rofiles-fuse --repo="$(flatpak_repo)" "$(flatpak_build_folder)" assets/flatpak/io.gitlab.librewolf-community.json + rm -rf assets/flatpak/shared-modules + + flatpak build-bundle $(flatpak_repo) $(flatpak_bundle) io.gitlab.librewolf-community master diff --git a/lw-linux-base/assets/flatpak/io.gitlab.librewolf-community.json b/lw-linux-base/assets/flatpak/io.gitlab.librewolf-community.json new file mode 100644 index 0000000..5082a85 --- /dev/null +++ b/lw-linux-base/assets/flatpak/io.gitlab.librewolf-community.json @@ -0,0 +1,135 @@ +{ + "app-id": "io.gitlab.librewolf-community", + "runtime": "org.freedesktop.Platform", + "runtime-version": "21.08", + "sdk": "org.freedesktop.Sdk", + "add-extensions": { + "org.freedesktop.Platform.ffmpeg-full": { + "directory": "lib/ffmpeg", + "version": "21.08", + "add-ld-path": "." + } + }, + "command": "librewolf", + "finish-args": [ + "--share=ipc", + "--share=network", + "--socket=wayland", + "--socket=fallback-x11", + "--socket=pcsc", + "--socket=pulseaudio", + "--socket=cups", + "--env=GTK_PATH=/app/lib/gtkmodules", + "--persist=.librewolf", + "--filesystem=xdg-download:rw", + "--filesystem=xdg-run/pipewire-0", + "--device=dri", + "--talk-name=org.freedesktop.FileManager1", + "--system-talk-name=org.freedesktop.NetworkManager", + "--talk-name=org.a11y.Bus", + "--talk-name=org.gnome.SessionManager", + "--talk-name=org.freedesktop.ScreenSaver", + "--talk-name=org.gtk.vfs.*", + "--talk-name=org.freedesktop.Notifications", + "--env=MOZ_ENABLE_WAYLAND=1", + "--env=MOZ_USE_XINPUT2=1", + "--own-name=io.gitlab.librewolf.*", + "--own-name=org.mpris.MediaPlayer2.firefox.*", + "--share=network" + ], + "modules": [ + "shared-modules/dbus-glib/dbus-glib-0.110.json", + { + "name": "librewolf", + "buildsystem": "simple", + "build-commands": [ + "mkdir -p /app/lib", + "mv librewolf.tar.bz2 /app/lib/librewolf", + "install -D -m644 /app/lib/librewolf/browser/chrome/icons/default/default128.png /app/share/icons/hicolor/128x128/apps/io.gitlab.librewolf-community.png", + "install -D -m644 /app/lib/librewolf/browser/chrome/icons/default/default128.png /app/usr/share/icons/hicolor/128x128/apps/io.gitlab.librewolf-community.png", + "install -D -m644 /app/lib/librewolf/io.gitlab.librewolf-community.appdata.xml -t /app/share/metainfo", + "install -D -m644 io.gitlab.librewolf-community.desktop -t /app/share/applications", + "install -D -m755 librewolf.sh /app/bin/librewolf", + "install -d /app/lib/ffmpeg" + ], + "sources": [ + { + "type": "archive", + "url": "https://www.dropbox.com/s/09dcce6xjj37c6x/librewolf-106.0.1-1.en-US.linux-x86_64.tar.bz2", + "sha256":"b844c0dafacb7d77d1131cc63912a651752d271d5500c4af84a7bd25835518d0", + "dest": "librewolf.tar.bz2", + "strip-components": 0, + "only-arches": [ + "x86_64" + ] + }, + { + "type": "file", + "path": "io.gitlab.librewolf-community.desktop" + }, + { + "type": "file", + "path": "librewolf.sh" + } + ] + }, + { + "name": "gtk-cups-backend", + "buildsystem": "meson", + "make-args": [ + "modules/printbackends/libprintbackend-cups.so" + ], + "no-make-install": true, + "post-install": [ + "install -Dm 755 modules/printbackends/libprintbackend-cups.so -t /app/lib/gtkmodules/3.0.0/printbackends/" + ], + "sources": [ + { + "type": "archive", + "url": "https://download.gnome.org/core/41/41.0/sources/gtk%2B-3.24.30.tar.xz", + "sha256": "ba75bfff320ad1f4cfbee92ba813ec336322cc3c660d406aad014b07087a3ba9" + }, + { + "type": "patch", + "path": "gtk3-werror.patch" + } + ] + }, + { + "name": "gtk-settings", + "buildsystem": "simple", + "build-commands": [ + "install -Dm 644 gtk-settings.ini /app/etc/xdg/gtk-3.0/settings.ini" + ], + "sources": [ + { + "type": "file", + "path": "gtk-settings.ini" + } + ] + }, + { + "name": "libnotify", + "buildsystem": "meson", + "config-opts": [ + "-Dtests=false", + "-Dintrospection=disabled", + "-Dman=false", + "-Dgtk_doc=false", + "-Ddocbook_docs=disabled" + ], + "sources": [ + { + "sha256": "d033e6d4d6ccbf46a436c31628a4b661b36dca1f5d4174fe0173e274f4e62557", + "type": "archive", + "url": "https://download.gnome.org/sources/libnotify/0.8/libnotify-0.8.1.tar.xz", + "x-checker-data": { + "project-id": 13149, + "type": "anitya", + "url-template": "https://download.gnome.org/sources/libnotify/$major.$minor/libnotify-$version.tar.xz" + } + } + ] + } + ] +} diff --git a/lw-linux-base/assets/flatpak/setup-debian.sh b/lw-linux-base/assets/flatpak/setup-debian.sh new file mode 100755 index 0000000..f02fc3c --- /dev/null +++ b/lw-linux-base/assets/flatpak/setup-debian.sh @@ -0,0 +1,9 @@ +set -e + +flathub_repo="flathub https://flathub.org/repo/flathub.flatpakrepo" +flathub_packages_to_install="org.freedesktop.Platform//21.08 org.freedesktop.Sdk//21.08" + +apt update && apt install -y software-properties-common bzip2 flatpak flatpak-builder + +flatpak remote-add --if-not-exists $flathub_repo; +flatpak install -y flathub $flathub_packages_to_install; diff --git a/version b/version index ed09958..ba0a842 100644 --- a/version +++ b/version @@ -1 +1 @@ -106.0.1 +106.0.2