forked from flathub/com.bitwarden.desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcom.bitwarden.desktop.yaml
83 lines (80 loc) · 3.21 KB
/
com.bitwarden.desktop.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
app-id: com.bitwarden.desktop
runtime: org.freedesktop.Platform
runtime-version: '23.08'
sdk: org.freedesktop.Sdk
base: org.electronjs.Electron2.BaseApp
base-version: '23.08'
command: bitwarden
finish-args:
- --share=ipc
- --share=network
- --socket=wayland
- --socket=x11
- --device=dri
- --env=XDG_CURRENT_DESKTOP=Unity
- --env=XCURSOR_PATH=/run/host/user-share/icons:/run/host/share/icons
- --talk-name=org.kde.StatusNotifierWatcher
- --talk-name=org.freedesktop.Notifications
- --talk-name=org.freedesktop.secrets
- --talk-name=com.canonical.AppMenu.Registrar
- --system-talk-name=org.freedesktop.login1
- --filesystem=xdg-download
rename-desktop-file: bitwarden.desktop
rename-icon: bitwarden
modules:
- shared-modules/libsecret/libsecret.json
- name: bitwarden-desktop
buildsystem: simple
build-commands:
- ar -x Bitwarden*.deb
- rm -f Bitwarden*.deb
- tar -xf data.tar.xz
- rm -f control.tar.gz data.tar.xz debian-binary
- cp -r opt/* usr/* $FLATPAK_DEST
- rm -rf opt usr
- install bitwarden.sh $FLATPAK_DEST/bin/bitwarden
- install -D -m 644 -t $FLATPAK_DEST/share/metainfo $FLATPAK_ID.metainfo.xml
- desktop-file-edit --set-key=Exec --set-value="bitwarden %U" $FLATPAK_DEST/share/applications/bitwarden.desktop
- rm -rf "${FLATPAK_DEST}/share/icons/hicolor/1024x1024/"
# To allow separate locales
# https://searchfox.org/mozilla-central/rev/8a4f55bc09ffc5c25dcb4586c51ae4a9fee77b4c/taskcluster/docker/firefox-flatpak/runme.sh#131-133
- |
for lang in ${FLATPAK_DEST}/Bitwarden/locales/*.pak
do
locale="$(basename -s .pak $lang)"
install -Dm644 -t "${FLATPAK_DEST}/share/runtime/locale/${locale%%-*}/" "$lang"
ln -sf "${FLATPAK_DEST}/share/runtime/locale/${locale%%-*}/$(basename $lang)" "${FLATPAK_DEST}/Bitwarden/locales/$(basename $lang)"
done
sources:
- type: file
only-arches:
- x86_64
url: https://github.com/bitwarden/clients/releases/download/desktop-v2023.9.3/Bitwarden-2023.9.3-amd64.deb
sha256: 741c0893b2fc6b6ff00736c886a0c9ad40b6692305fb6ca41026143824388ee5
x-checker-data:
type: anitya
project-id: 179174
url-template: https://github.com/bitwarden/clients/releases/download/desktop-v$version/Bitwarden-$version-amd64.deb
is-main-source: true
- type: script
dest-filename: bitwarden.sh
commands:
- export TMPDIR="$XDG_RUNTIME_DIR/app/$FLATPAK_ID"
- exec zypak-wrapper /app/Bitwarden/bitwarden "$@"
- type: file
path: com.bitwarden.desktop.metainfo.xml
- name: bitwarden-cli
buildsystem: simple
build-commands:
- unzip bw-linux*.zip
- install -D -m 755 -t "${FLATPAK_DEST}/bin" bw
sources:
- type: file
only-arches:
- x86_64
url: https://github.com/bitwarden/clients/releases/download/cli-v2023.9.1/bw-linux-2023.9.1.zip
sha256: 3c035e1749f9acf2d29ac5e4c12acca1bd16416d150fe190109cb69345222c75
x-checker-data:
type: anitya
project-id: 229011
url-template: https://github.com/bitwarden/clients/releases/download/cli-v$version/bw-linux-$version.zip