Update flatpak
This commit is contained in:
parent
e687ceb3fd
commit
ca7505328b
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,4 +1,6 @@
|
||||
.vscode
|
||||
goldwarden
|
||||
__pycache__
|
||||
.flatpak-builder
|
||||
.flatpak-builder
|
||||
flatpak-pip-generator
|
||||
repo
|
@ -24,20 +24,29 @@ finish-args:
|
||||
# biometric / user password auth
|
||||
- --system-talk-name=org.freedesktop.PolicyKit1
|
||||
modules:
|
||||
- name: goldwarden
|
||||
- ./ui/python3-requirements.json
|
||||
- name: wl-clipboard
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
- meson setup build && cd build && ninja
|
||||
- install -D build/src/wl-copy /app/bin/wl-copy
|
||||
sources:
|
||||
- type: git
|
||||
url: https://github.com/bugaevc/wl-clipboard.git
|
||||
- name: goldwarden-ui
|
||||
buildsystem: simple
|
||||
build-options:
|
||||
build-args:
|
||||
- "--share=network"
|
||||
build-commands:
|
||||
- pip3 install --prefix=/app tendo
|
||||
- git clone https://github.com/bugaevc/wl-clipboard.git
|
||||
- cd wl-clipboard && meson setup build && cd build && ninja
|
||||
- install -D wl-clipboard/build/src/wl-copy /app/bin/wl-copy
|
||||
- install -D main.py /app/bin/main.py
|
||||
- cp -R ./ /app/bin
|
||||
- install -D com.quexten.Goldwarden.desktop /app/share/applications/com.quexten.Goldwarden.desktop
|
||||
- install -D goldwarden.svg /app/share/icons/hicolor/scalable/apps/com.quexten.Goldwarden.svg
|
||||
- cp -R ./ /app/bin/
|
||||
sources:
|
||||
- type: dir
|
||||
path: ui
|
||||
path: ui
|
||||
- name: goldwarden
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
- install -D goldwarden /app/bin/goldwarden
|
||||
sources:
|
||||
- type: file
|
||||
path: goldwarden
|
@ -2,7 +2,12 @@ import subprocess
|
||||
import json
|
||||
import os
|
||||
|
||||
BINARY_PATH = "/home/quexten/go/src/github.com/quexten/goldwarden/goldwarden"
|
||||
# if flatpak
|
||||
if os.path.exists("/app/bin/goldwarden"):
|
||||
BINARY_PATH = "/app/bin/goldwarden"
|
||||
else:
|
||||
res = subprocess.run(["which", "goldwarden"])
|
||||
BINARY_PATH = res.stdout.decode("utf-8").strip()
|
||||
|
||||
def set_api_url(url):
|
||||
restic_cmd = f"{BINARY_PATH} config set-api-url {url}"
|
||||
|
49
ui/python3-requirements.json
Normal file
49
ui/python3-requirements.json
Normal file
@ -0,0 +1,49 @@
|
||||
{
|
||||
"name": "python3-requirements",
|
||||
"buildsystem": "simple",
|
||||
"build-commands": [],
|
||||
"modules": [
|
||||
{
|
||||
"name": "python3-ChaCha20",
|
||||
"buildsystem": "simple",
|
||||
"build-commands": [
|
||||
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"ChaCha20==1.1.1\" --no-build-isolation"
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"type": "file",
|
||||
"url": "https://files.pythonhosted.org/packages/7d/93/2c5c7203bcb1ece177a49d14b32f0e0511f7d4eaf8446c15f7d64af082ad/ChaCha20-1.1.1.tar.gz",
|
||||
"sha256": "6d6b1ef373058540369c14d2369ab14ee4ffaeae4dc53d8a18b5b617bd06c6bb"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "python3-chacha20poly1305",
|
||||
"buildsystem": "simple",
|
||||
"build-commands": [
|
||||
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"chacha20poly1305==0.0.3\" --no-build-isolation"
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"type": "file",
|
||||
"url": "https://files.pythonhosted.org/packages/38/2c/5b4eb73c5cb30ded3082af025e76f529764971c57c02b101e842ff998f63/chacha20poly1305-0.0.3.tar.gz",
|
||||
"sha256": "f2f005c7cf4638ffa4ff06c02c78748068b642916795c6d16c7cc5e355e70edf"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "python3-tendo",
|
||||
"buildsystem": "simple",
|
||||
"build-commands": [
|
||||
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"tendo==0.3.0\" --no-build-isolation"
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"type": "file",
|
||||
"url": "https://files.pythonhosted.org/packages/ce/3f/761077d55732b0b1a673b15d4fdaa947a7c1eb5c9a23b7142df557019823/tendo-0.3.0-py3-none-any.whl",
|
||||
"sha256": "026b70b355ea4c9da7c2123fa2d5c280c8983c1b34e329ff49260e2e78b93be7"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
3
ui/requirements.txt
Normal file
3
ui/requirements.txt
Normal file
@ -0,0 +1,3 @@
|
||||
ChaCha20==1.1.1
|
||||
chacha20poly1305==0.0.3
|
||||
tendo==0.3.0
|
Loading…
x
Reference in New Issue
Block a user