Skip to content

Commit

Permalink
Snap: Migrate to core22 and minor cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
boukendesho committed Sep 5, 2024
1 parent 14a1367 commit bf6a742
Showing 1 changed file with 17 additions and 26 deletions.
43 changes: 17 additions & 26 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

name: flameshot
adopt-info: flameshot
base: core20
base: core22
summary: Powerful yet simple to use screenshot software
description: |
A powerful open source screenshot and annotation tool for Linux, Flameshot
Expand Down Expand Up @@ -34,48 +34,39 @@ apps:
- network
- network-bind
- opengl
- x11
- wayland
- desktop
- desktop-legacy
- unity7

parts:
flameshot:
build-snaps:
- kde-frameworks-5-99-qt-5-15-7-core20
source: https://github.com/flameshot-org/flameshot.git
- kf5-5-113-qt-5-15-11-core22-sdk
plugin: cmake
source: https://github.com/flameshot-org/flameshot.git
source-type: git
source-tag: 'v12.1.0'
source-depth: 1
cmake-parameters:
- -DFLAMESHOT_ICON=/snap/flameshot/current/usr/local/share/icons/hicolor/scalable/apps/flameshot.svg
- -DFLAMESHOT_ICON=usr/local/share/icons/hicolor/scalable/apps/flameshot.svg
# This cannot be enabled until the KF5 toolkit in the snap is updated
#- -DUSE_WAYLAND_CLIPBOARD=1
source-type: git
- -DUSE_WAYLAND_CLIPBOARD=1
override-pull: |
snapcraftctl pull
# 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}"
craftctl default
craftctl set version=$(git describe --tags --abbrev=0)
override-build: |
snapcraftctl build
craftctl default
# Correct the Icon path
sed -i 's|^Exec=flameshot|Exec=/snap/bin/org.flameshot.Flameshot|' ${SNAPCRAFT_PART_INSTALL}/usr/local/share/applications/org.flameshot.Flameshot.desktop
sed -i 's|^Icon=.*|Icon=${SNAP}/usr/local/share/icons/hicolor/scalable/apps/org.flameshot.Flameshot.svg|' ${SNAPCRAFT_PART_INSTALL}/usr/local/share/applications/org.flameshot.Flameshot.desktop
sed -i 's/^\(Name\(\[.\+\]\)\?=.*\)$/\1 (Snappy Edition)/g' ${SNAPCRAFT_PART_INSTALL}/usr/local/share/applications/org.flameshot.Flameshot.desktop
build-packages:
- g++
- make
- qt5-default
- git
sed -i 's|^Exec=/usr/local/bin/flameshot|Exec=flameshot|' ${SNAPCRAFT_PART_INSTALL}/usr/local/share/applications/org.flameshot.Flameshot.desktop
sed -i 's|^Icon=.*|Icon=${SNAP}/usr/local/share/icons/hicolor/scalable/apps/org.flameshot.Flameshot.svg|' ${CRAFT_PART_INSTALL}/usr/local/share/applications/org.flameshot.Flameshot.desktop
sed -i 's/^\(Name\(\[.\+\]\)\?=.*\)$/\1 (Snappy Edition)/g' ${CRAFT_PART_INSTALL}/usr/local/share/applications/org.flameshot.Flameshot.desktop
stage-packages:
- dbus-x11
- libgtk2.0-0
- openssl
- ca-certificates
#- openssl
#- ca-certificates
- libxkbcommon0
- ttf-ubuntu-font-family
#- ttf-ubuntu-font-family
- dmz-cursor-theme
- light-themes
- adwaita-icon-theme
Expand Down

0 comments on commit bf6a742

Please sign in to comment.