This commit is contained in:
Ghislain Antony Vaillant 2020-04-18 11:36:17 +02:00
parent 3cf52e66e2
commit d3c7b69598
7 changed files with 24076 additions and 28 deletions

View file

@ -0,0 +1,10 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=Bitwarden
Comment=A secure and free password manager for all of your devices.
Exec=start-bitwarden
Icon=com.bitwarden.desktop
Terminal=False
StartupWMClass=Bitwarden
Categories=Utility;

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright 2018-2019 Flathub maintainers -->
<component type="desktop">
<!-- Copyright 2018-2020 Flathub maintainers -->
<component type="desktop-application">
<id>com.bitwarden.desktop</id>
<launchable type="desktop-id">com.bitwarden.desktop.desktop</launchable>
<metadata_license>CC0-1.0</metadata_license>
@ -40,6 +40,7 @@
contribute to the Bitwarden codebase.
</p>
</description>
<launchable type="desktop-id">com.bitwarden.desktop.desktop</launchable>
<categories>
<category>Utility</category>
</categories>

View file

@ -4,7 +4,9 @@ runtime-version: '19.08'
sdk: org.freedesktop.Sdk
base: org.electronjs.Electron2.BaseApp
base-version: '19.08'
command: bitwarden
sdk-extensions:
- org.freedesktop.Sdk.Extension.node10
command: start-bitwarden
separate-locales: false
finish-args:
- --share=ipc
@ -15,33 +17,47 @@ finish-args:
- --talk-name=org.freedesktop.Notifications
- --talk-name=org.freedesktop.secrets
- --filesystem=xdg-download
rename-desktop-file: bitwarden.desktop
rename-icon: bitwarden
modules:
- shared-modules/libsecret/libsecret.json
- name: Bitwarden
sources:
- type: file
only-arches:
- x86_64
url: https://github.com/bitwarden/desktop/releases/download/v1.17.2/Bitwarden-1.17.2-amd64.deb
sha256: fd47d445315ed2ee26d7bcb02857d7ee09961e038fdbe915b6d7373d24cff46c
- 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.appdata.xml
- name: node
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.appdata.xml'
- 'desktop-file-edit --set-key=Exec --set-value="bitwarden %U" $FLATPAK_DEST/share/applications/bitwarden.desktop'
- /usr/lib/sdk/node10/install-sdk.sh
- name: bitwarden
buildsystem: simple
build-options:
append-path: /usr/lib/sdk/node10/bin
env:
ELECTRON_BUILDER_CACHE: /run/build/bitwarden/flatpak-node/npm-cache
ELECTRON_CACHE: /run/build/bitwarden/flatpak-node/electron-cache
electron_config_cache: /run/build/bitwarden/flatpak-node/electron-cache
npm_config_cache: /run/build/bitwarden/flatpak-node/npm-cache
npm_config_nodedir: /usr/lib/sdk/node10
build-commands:
- npm install --offline
- npm run dist:dir --offline
- mv dist/*-unpacked /app/bitwarden
- install -D -m 755 start-bitwarden.sh $FLATPAK_DEST/bin/start-bitwarden
- install -D -m 644 -t $FLATPAK_DEST/share/metainfo $FLATPAK_ID.metainfo.xml
sources:
- type: git
url: https://github.com/bitwarden/desktop
commit: ecdd97a499442e6dab139811706656d056f4ca65
- type: patch
path: no-prebuild-renderer.patch
- type: file
path: webfonts.css
dest: src/css
- type: archive
path: webfonts.zip
dest: src/css/webfonts
- generated-sources.json
- type: script
commands:
- export TMPDIR=$XDG_RUNTIME_DIR/app/$FLATPAK_ID
- exec zypak-wrapper /app/bitwarden/bitwarden "$@"
dest-filename: start-bitwarden.sh
- type: file
path: com.bitwarden.desktop.metainfo.xml

23917
generated-sources.json Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,24 @@
From 3eec5ce9f388c31608f0532839f677a3cca09983 Mon Sep 17 00:00:00 2001
From: Ghislain Antony Vaillant <ghisvail@gmail.com>
Date: Wed, 13 May 2020 18:30:40 +0200
Subject: [PATCH] No prebuild renderer
diff --git a/package.json b/package.json
index d73b185..831dc25 100644
--- a/package.json
+++ b/package.json
@@ -30,8 +30,8 @@
"lint:fix": "tslint src/**/*.ts --fix",
"build": "concurrently -n Main,Rend -c yellow,cyan \"npm run build:main\" \"npm run build:renderer\"",
"build:main": "webpack --config webpack.main.js",
- "build:renderer": "gulp prebuild:renderer && webpack --config webpack.renderer.js",
- "build:renderer:watch": "gulp prebuild:renderer && webpack --config webpack.renderer.js --watch",
+ "build:renderer": "webpack --config webpack.renderer.js",
+ "build:renderer:watch": "webpack --config webpack.renderer.js --watch",
"electron": "npm run build:main && concurrently -k -n Main,Rend -c yellow,cyan \"electron --inspect=5858 ./build --watch\" \"npm run build:renderer:watch\"",
"clean:dist": "rimraf ./dist/*",
"clean:l10n": "git push origin --delete l10n_master",
--
2.20.1

80
webfonts.css Normal file
View file

@ -0,0 +1,80 @@
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 300;
src: url(webfonts/Open_Sans-italic-300.woff) format('woff');
unicode-range: U+0-10FFFF;
}
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 400;
src: url(webfonts/Open_Sans-italic-400.woff) format('woff');
unicode-range: U+0-10FFFF;
}
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 600;
src: url(webfonts/Open_Sans-italic-600.woff) format('woff');
unicode-range: U+0-10FFFF;
}
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 700;
src: url(webfonts/Open_Sans-italic-700.woff) format('woff');
unicode-range: U+0-10FFFF;
}
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 800;
src: url(webfonts/Open_Sans-italic-800.woff) format('woff');
unicode-range: U+0-10FFFF;
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: url(webfonts/Open_Sans-normal-300.woff) format('woff');
unicode-range: U+0-10FFFF;
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: url(webfonts/Open_Sans-normal-400.woff) format('woff');
unicode-range: U+0-10FFFF;
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 600;
src: url(webfonts/Open_Sans-normal-600.woff) format('woff');
unicode-range: U+0-10FFFF;
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: url(webfonts/Open_Sans-normal-700.woff) format('woff');
unicode-range: U+0-10FFFF;
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 800;
src: url(webfonts/Open_Sans-normal-800.woff) format('woff');
unicode-range: U+0-10FFFF;
}

BIN
webfonts.zip Normal file

Binary file not shown.