0
0
mirror of https://github.com/keepassxreboot/keepassxc.git synced 2024-09-19 20:02:18 +02:00

Update snapcraft file to latest API

This commit is contained in:
Jonathan White 2022-02-27 15:59:07 -05:00
parent 18704f5a19
commit ab007c4815
5 changed files with 23 additions and 119 deletions

View File

@ -354,10 +354,6 @@ checkSnapcraft() {
return
fi
if ! $GREP -qPzo "version: ${RELEASE_NAME}" snap/snapcraft.yaml; then
exitError "'snapcraft.yaml' has not been updated to the '${RELEASE_NAME}' release!"
fi
if ! $GREP -qPzo "KEEPASSXC_BUILD_TYPE=Release" snap/snapcraft.yaml; then
exitError "'snapcraft.yaml' is not set for a release build!"
fi

View File

@ -133,11 +133,6 @@ function Test-VersionInFiles {
-pattern "<release version=`"$Version`" date=`"\d{4}-\d{2}-\d{2}`">" -Quiet)) {
throw "share/linux/org.keepassxc.KeePassXC.appdata.xml does not contain a section for $Version."
}
# Check Snapcraft
if (!(Select-String "$SourceDir\snap\snapcraft.yaml" -pattern "version: $Version" -Quiet)) {
throw "snap/snapcraft.yaml has not been updated to $Version."
}
}
function Test-WorkingTreeClean {

View File

@ -1,10 +0,0 @@
# /snap/local/launchers
Here are the launchers, or wrapper programs to deal with some runtime-fixable problems for the snapped applications, like setting proper environmental variables in snap.
In convention launchers are named _something_-launch, for dealing certain problem with _something_, and usually can be called in a stacked manner to consolidate their modifications.
```yaml
apps:
_app_name_:
command: foo-launch bar-launch _app_command_
```

View File

@ -1,14 +0,0 @@
#!/usr/bin/env bash
# This is the maintainence launcher for the snap, make necessary runtime environment changes to make the snap work here. You may also insert security confinement/deprecation/obsoletion notice of the snap here.
set \
-o errexit \
-o errtrace \
-o nounset \
-o pipefail
# gtk-common-themes support
export QT_QPA_PLATFORMTHEME=gtk3
# Finally run the next part of the command chain
exec "${@}"

View File

@ -1,51 +1,36 @@
name: keepassxc
version: 2.7.0
adopt-info: keepassxc
grade: stable
summary: Community-driven port of the Windows application “KeePass Password Safe”
description: |
KeePassXC is an application for people with extremely high demands on secure
personal data management. It has a light interface, is cross-platform and
published under the terms of the GNU General Public License.
confinement: strict
base: core18
confinement: strict
compression: lzo
plugs: # plugs for theming, font settings, cursor and to use gtk3 file chooser
gtk-3-themes:
interface: content
target: $SNAP/data-dir/themes
default-provider: gtk-common-themes:gtk-3-themes
icon-themes:
interface: content
target: $SNAP/data-dir/icons
default-provider: gtk-common-themes:icon-themes
sound-themes:
interface: content
target: $SNAP/data-dir/sounds
default-provider: gtk-common-themes:sounds-themes
apps:
keepassxc:
adapter: full
command: usr/bin/keepassxc -style fusion
command-chain:
- bin/desktop-launch
- bin/gtk3-env-launch
plugs: [unity7, x11, opengl, gsettings, home, network, network-bind, removable-media, raw-usb, wayland, desktop-legacy, desktop]
desktop: usr/share/applications/org.keepassxc.KeePassXC.desktop
environment:
DISABLE_WAYLAND: 1
command: keepassxc
common-id: org.keepassxc.KeePassXC.desktop
extensions: [kde-neon]
plugs: [kde-frameworks-5-plug, home, unity7, network, network-bind, removable-media, raw-usb]
cli:
command: keepassxc-cli
plugs: [x11, gsettings, home, removable-media, raw-usb]
extensions: [kde-neon]
plugs: [home, removable-media, raw-usb]
proxy:
command: keepassxc-proxy
extensions: [kde-neon]
plugs: [home]
slots:
session-dbus-interface:
interface: dbus
name: org.keepassxc.KeePassXC.MainWindow
bus: session
parts:
keepassxc:
source: .
plugin: cmake
parse-info: [usr/share/metainfo/org.keepassxc.KeePassXC.appdata.xml]
configflags:
- -DCMAKE_BUILD_TYPE=Release
- -DCMAKE_INSTALL_PREFIX=/usr
@ -53,79 +38,31 @@ parts:
- -DKEEPASSXC_BUILD_TYPE=Release
- -DWITH_TESTS=OFF
- -DWITH_XC_ALL=ON
build-snaps:
- kde-frameworks-5-core18-sdk
- kde-frameworks-5-core18
build-packages:
- g++
- libgcrypt20-dev
- libbotan-2-dev
- libqt5x11extras5-dev
- libqt5svg5-dev
- qtbase5-dev
- qtbase5-private-dev
- qttools5-dev
- qttools5-dev-tools
- zlib1g-dev
- libxi-dev
- libxtst-dev
- libyubikey-dev
- libykpers-1-dev
- libsodium-dev
- libargon2-0-dev
- libqrencode-dev
- libusb-1.0-0-dev
- libminizip-dev
- asciidoctor
stage-packages:
- dbus
- qttranslations5-l10n # common translations
- libgcrypt20
- libykpers-1-1
- libargon2-0
- libsodium23
- botan
- libxtst6
- libqt5x11extras5
- libqt5svg5
- try: [libqrencode3, libqrencode4]
- libqt5concurrent5
- libquazip5-1
- libusb-1.0-0
- qtwayland5
- qt5-gtk-platformtheme # for theming, font settings, cursor and to use gtk3 file chooser
- libqrencode3
- libusb-1.0-0
- xclip
override-build: |
snapcraftctl build
sed -i 's|Icon=keepassxc|Icon=${SNAP}/usr/share/icons/hicolor/256x256/apps/keepassxc.png|g' $SNAPCRAFT_PART_INSTALL/usr/share/applications/org.keepassxc.KeePassXC.desktop
organize:
usr/share/qt5/translations/*.qm: usr/share/keepassxc/translations/
stage:
- -opt
after: [desktop-qt5]
launchers: # custom launcher to set QT_QPA_PLATFORMTHEME=gtk3 correctly
source: snap/local/launchers
plugin: dump
organize:
'*': bin/
stage:
- -bin/README.*
desktop-qt5:
source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
source-subdir: qt
plugin: make
make-parameters: ["FLAVOR=qt5"]
build-packages:
- qtbase5-dev
- dpkg-dev
stage-packages:
- libxkbcommon0
- ttf-ubuntu-font-family
- dmz-cursor-theme
- light-themes
- adwaita-icon-theme
- gnome-themes-standard
- shared-mime-info
- libqt5gui5
- libgdk-pixbuf2.0-0
- libgtk2.0-0
- libqt5svg5 # for loading icon themes which are svg
- try: [appmenu-qt5] # not available on core18
- locales-all