166 lines
4.9 KiB
YAML
166 lines
4.9 KiB
YAML
# zen-browser snap, (c) Valentin HAUDIQUET
|
|
# inspired from https://github.com/canonical/firefox-snap
|
|
# GNU General Public License version 3
|
|
|
|
name: zen-browser
|
|
version: 1.15b
|
|
license: MPL-2.0
|
|
summary: Zen Browser - Welcome to a calmer internet
|
|
description: |
|
|
Zen is a firefox-based browser with the aim of pushing your productivity to a new level!
|
|
confinement: strict
|
|
grade: stable
|
|
base: core24
|
|
source-code: https://github.com/zen-browser/desktop
|
|
compression: lzo
|
|
|
|
apps:
|
|
zen-browser:
|
|
command: zen-browser.launcher
|
|
desktop: usr/share/applications/zen-browser.desktop
|
|
extensions: [gnome]
|
|
environment:
|
|
DICPATH: "$SNAP_COMMON/snap-hunspell"
|
|
GTK_USE_PORTAL: 1
|
|
HOME: "$SNAP_USER_COMMON"
|
|
PIPEWIRE_CONFIG_NAME: "$SNAP/usr/share/pipewire/pipewire.conf"
|
|
PIPEWIRE_MODULE_DIR: "$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/pipewire-0.3"
|
|
SPA_PLUGIN_DIR: "$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/spa-0.2"
|
|
SPEECHD_ADDRESS: "unix_socket:/run/user/$SNAP_UID/speech-dispatcher/speechd.sock"
|
|
LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libproxy
|
|
MOZ_APP_REMOTINGNAME: zen-browser_zen-browser
|
|
slots:
|
|
- mpris
|
|
- dbus-daemon
|
|
plugs:
|
|
- alsa
|
|
- audio-playback
|
|
- audio-record
|
|
- avahi-observe
|
|
- browser-sandbox
|
|
- camera
|
|
- cups-control
|
|
- gsettings
|
|
- hardware-observe
|
|
- home
|
|
- host-hunspell
|
|
- host-usr-share-hunspell
|
|
- joystick
|
|
- login-session-observe
|
|
- mount-observe
|
|
- network
|
|
- network-observe
|
|
- opengl
|
|
- pcscd
|
|
- removable-media
|
|
# - screen-inhibits-control
|
|
- system-packages-doc
|
|
- u2f-devices
|
|
- unity7
|
|
- upower-observe
|
|
|
|
platforms:
|
|
amd64:
|
|
|
|
plugs:
|
|
browser-sandbox:
|
|
interface: browser-support
|
|
allow-sandbox: true
|
|
dot-zen:
|
|
interface: personal-files
|
|
read: [$HOME/.zen]
|
|
etc-zen:
|
|
interface: system-files
|
|
read: [/etc/zen]
|
|
host-hunspell:
|
|
interface: mount-control
|
|
mount:
|
|
- what: /usr/share/hunspell
|
|
where: $SNAP_COMMON/host-hunspell
|
|
persistent: true
|
|
options: [ro, bind, noatime, noexec]
|
|
host-usr-share-hunspell:
|
|
interface: system-files
|
|
read:
|
|
- /var/lib/snapd/hostfs/usr/share/hunspell
|
|
|
|
layout:
|
|
/usr/share/libdrm:
|
|
bind: $SNAP/gnome-platform/usr/share/libdrm
|
|
/usr/share/alsa:
|
|
bind: $SNAP/usr/share/alsa
|
|
/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/opensc-pkcs11.so:
|
|
bind-file: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/opensc-pkcs11.so
|
|
|
|
parts:
|
|
# This is a temporary workaround to including the hunspell content
|
|
# snap, which would cause breakage in the Ubuntu desktop image build
|
|
# because of the Ubuntu policy. See:
|
|
# https://bugzilla.mozilla.org/show_bug.cgi?id=1792006
|
|
#
|
|
# The definition of this part is essentially a copy of the
|
|
# corresponding part in hunspell-dictionaries-1-7-2004 by
|
|
# Buo-ren, Lin.
|
|
hunspell:
|
|
plugin: nil
|
|
override-build: |
|
|
craftctl default
|
|
set -eu
|
|
apt download $(apt-cache search '^hunspell-.*$' |
|
|
awk '!/myspell|dbgsym|tools|transitional|dependency/{printf "%s ", $1}')
|
|
find . -name "*.deb" -exec dpkg-deb -x {} "$CRAFT_PART_INSTALL" \;
|
|
prime:
|
|
- usr/share/hunspell
|
|
|
|
zen-browser:
|
|
plugin: nil
|
|
after:
|
|
- launcher
|
|
- desktop
|
|
build-packages:
|
|
- curl
|
|
- tar
|
|
override-build: |
|
|
mkdir -p "$CRAFT_PART_INSTALL/usr/lib"
|
|
curl -L -O https://github.com/zen-browser/desktop/releases/download/$SNAPCRAFT_PROJECT_VERSION/zen.linux-x86_64.tar.xz
|
|
tar xf zen.linux-x86_64.tar.xz -C "$CRAFT_PART_INSTALL/usr/lib"
|
|
organize:
|
|
usr/lib/zen/browser/chrome/icons/default/default16.png: usr/share/icons/hicolor/16x16/apps/zen-browser.png
|
|
usr/lib/zen/browser/chrome/icons/default/default32.png: usr/share/icons/hicolor/32x32/apps/zen-browser.png
|
|
usr/lib/zen/browser/chrome/icons/default/default48.png: usr/share/icons/hicolor/48x48/apps/zen-browser.png
|
|
usr/lib/zen/browser/chrome/icons/default/default64.png: usr/share/icons/hicolor/64x64/apps/zen-browser.png
|
|
usr/lib/zen/browser/chrome/icons/default/default128.png: usr/share/icons/hicolor/128x128/apps/zen-browser.png
|
|
prime:
|
|
- usr/lib/zen
|
|
- usr/share/icons/*
|
|
- usr/lib/*/libproxy
|
|
- usr/lib/*/libpci.so.*
|
|
stage-packages:
|
|
- libproxy1v5
|
|
- glib-networking
|
|
- libpci3
|
|
|
|
desktop:
|
|
plugin: dump
|
|
source: .
|
|
organize:
|
|
zen-browser.desktop: usr/share/applications/zen-browser.desktop
|
|
|
|
launcher:
|
|
plugin: nil
|
|
override-prime: |
|
|
cp "$CRAFT_PROJECT_DIR/zen-browser.launcher" "$CRAFT_PRIME/"
|
|
chmod a+rwx "$CRAFT_PRIME/zen-browser.launcher"
|
|
|
|
slots:
|
|
dbus-daemon:
|
|
interface: dbus
|
|
bus: session
|
|
name: zen.desktop
|
|
|
|
hooks:
|
|
post-refresh:
|
|
plugs: [host-usr-share-hunspell]
|
|
install:
|
|
plugs: [host-usr-share-hunspell]
|