keepassxc/snapcraft.yaml
AsavarTzeth 4853014a61 Fix id and appdata validation failures (#1131)
According to the AppStream specification org.keepassxc is not a valid
id. The product name is missing. This results in failures if one tries
to validate the file and makes it unusable where validation is enforced.

Additionally it seems specification don't allow the `<icon>` tag with
component type desktop-application. I am not sure this tag is strictly
necessary. In any case validation tests require this to be removed.

Fixing both of these issues ensure the AppStream appdata is compliant
and works anywhere passing validations is a requirement.

Also provide some other fixes and improvements to the appdata.

Minor validation failures:

- Fix missing captions for screenshots (`appstreamcli`)
- Fix descriptions cannot start with `<ul>` tag (`appstream-util`)

Other enhancements:

- Add more URL types, but could not add donation type because "&" is not
  allowed in the `<url>` tag and using "%26" causes
  `appstreamcli validate` to fail.
- Add `<developer_name>`, which in cases such as KeePassXC is a team name.
2017-11-08 17:51:37 +01:00

71 lines
2.1 KiB
YAML

name: keepassxc
version: 2.2.2
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
apps:
keepassxc:
command: desktop-launch keepassxc
plugs: [unity7, x11, opengl, gsettings, home, network, network-bind, removable-media, raw-usb]
desktop: usr/share/applications/org.keepassxc.KeePassXC.desktop
cli:
command: keepassxc-cli
plugs: [gsettings, home, removable-media, raw-usb]
parts:
keepassxc:
source: .
plugin: cmake
configflags:
- -DCMAKE_BUILD_TYPE=Release
- -DCMAKE_INSTALL_PREFIX=/usr
- -DKEEPASSXC_DIST_TYPE=Snap
- -DWITH_TESTS=OFF
- -DWITH_XC_AUTOTYPE=ON
- -DWITH_XC_HTTP=ON
- -DWITH_XC_YUBIKEY=ON
build-packages:
- g++
- libgcrypt20-dev
- libqt5x11extras5-dev
- qtbase5-dev
- qttools5-dev
- qttools5-dev-tools
- zlib1g-dev
- libxi-dev
- libxtst-dev
- libyubikey-dev
- libykpers-1-dev
install: |
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
after: [desktop-qt5]
# Redefine desktop-qt5 stage packages to work with Ubuntu 17.04
desktop-qt5:
stage-packages:
- libxkbcommon0
- ttf-ubuntu-font-family
- dmz-cursor-theme
- light-themes
- shared-mime-info
- libqt5gui5
- libgdk-pixbuf2.0-0
- libqt5svg5 # for loading icon themes which are svg
- locales-all
# Overcome limitation in snapd to support URL loading (CTRL+U)
# client needs to install "snapd-xdg-open" on their system
snapd-xdg-open:
source: https://github.com/ubuntu-core/snapd-xdg-open.git
source-depth: 1
plugin: nil
install: |
install -D -t $SNAPCRAFT_PART_INSTALL/usr/bin/ data/xdg-open
stage-packages:
- dbus