Files
flameshot/snapcraft.yaml
Sergio Schvezov 3fafcf4aa9 chore: cleanup and update base to core22 (#3790)
* chore: cleanup and update base to core22

Signed-off-by: Sergio Schvezov <sergio.schvezov@ubuntu.com>

* fix: s/snapcraftctl/craftctl/

Co-authored-by: Alex Lowe <alex.lowe@canonical.com>

---------

Signed-off-by: Sergio Schvezov <sergio.schvezov@ubuntu.com>
Co-authored-by: Alex Lowe <alex.lowe@canonical.com>
2024-12-03 09:39:50 +02:00

66 lines
2.2 KiB
YAML

---
name: flameshot
adopt-info: flameshot
base: core22
summary: Powerful yet simple to use screenshot software
description: |
A powerful open source screenshot and annotation tool for Linux, Flameshot
has a varied set of markup tools available, which include Freehand drawing,
Lines, Arrows, Boxes, Circles, Highlighting, Blur. Additionally, you can
customise the color, size and/or thickness of many of these image annotation
tools.
grade: stable
confinement: strict
compression: lzo
architectures:
- build-on: amd64
apps:
flameshot:
command: usr/bin/flameshot
desktop: usr/share/applications/org.flameshot.Flameshot.desktop
extensions:
- kde-neon
environment:
DISABLE_WAYLAND: 1
XDG_DATA_DIRS: $SNAP/share:$XDG_DATA_DIRS
QT_QPA_PLATFORMTHEME: gtk3
slots: [dbus-flameshot]
plugs:
- home
- removable-media
- network
- network-bind
parts:
flameshot:
source: https://github.com/flameshot-org/flameshot.git
plugin: cmake
cmake-parameters:
- -DFLAMESHOT_ICON=/snap/flameshot/current/usr/share/icons/hicolor/scalable/apps/flameshot.svg
- -DCMAKE_INSTALL_PREFIX=/usr
- -DUSE_WAYLAND_CLIPBOARD=1
source-type: git
override-pull: |
craftctl default
# remove release candidates
last_committed_tag="$(git tag -l --sort=-v:refname | grep -v rc | head -1)"
git_revno="$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)"
git_hash="$(git rev-parse --short HEAD)"
snapcraftctl set-version "${last_committed_tag}+git${git_revno}.${git_hash}"
override-build: |
craftctl default
# Correct the Icon path
sed -i 's|^Icon=.*|Icon=${SNAP}/usr/share/icons/hicolor/scalable/apps/org.flameshot.Flameshot.svg|' ${CRAFT_PART_INSTALL}/usr/share/applications/org.flameshot.Flameshot.desktop
sed -i 's/^\(Name\(\[.\+\]\)\?=.*\)$/\1 (Snap Edition)/g' ${CRAFT_PART_INSTALL}/usr/share/applications/org.flameshot.Flameshot.desktop
slots:
# Depending on in which environment we're running we either need
# to use the system or session DBus so we also need to have one
# slot for each.
dbus-flameshot:
interface: dbus
bus: session
name: org.flameshot.Flameshot