snapcraft.yaml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. ---
  2. name: flameshot
  3. adopt-info: flameshot
  4. base: core20
  5. summary: Powerful yet simple to use screenshot software
  6. description: |
  7. A powerful open source screenshot and annotation tool for Linux, Flameshot
  8. has a varied set of markup tools available, which include Freehand drawing,
  9. Lines, Arrows, Boxes, Circles, Highlighting, Blur. Additionally, you can
  10. customise the color, size and/or thickness of many of these image annotation
  11. tools.
  12. grade: stable # must be 'stable' to release into candidate/stable channels
  13. confinement: strict # use 'strict' once you have the right plugs and slots
  14. #confinement: devmode # use 'strict' once you have the right plugs and slots
  15. architectures:
  16. - build-on: amd64
  17. apps:
  18. flameshot:
  19. command: usr/local/bin/flameshot
  20. desktop: usr/local/share/applications/org.flameshot.Flameshot.desktop
  21. extensions:
  22. - kde-neon
  23. environment:
  24. DISABLE_WAYLAND: 1
  25. XDG_DATA_DIRS: $SNAP/share:$XDG_DATA_DIRS
  26. QT_QPA_PLATFORMTHEME: gtk3
  27. slots: [dbus-flameshot]
  28. plugs:
  29. - kde-frameworks-5-plug
  30. - home
  31. - removable-media
  32. - network
  33. - network-bind
  34. - opengl
  35. - x11
  36. - wayland
  37. parts:
  38. flameshot:
  39. build-snaps:
  40. - kde-frameworks-5-qt-5-15-core20
  41. source: https://github.com/flameshot-org/flameshot.git
  42. plugin: cmake
  43. source-type: git
  44. override-pull: |
  45. snapcraftctl pull
  46. last_committed_tag="$(git tag -l --sort=-v:refname | head -1)"
  47. git_revno="$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)"
  48. git_hash="$(git rev-parse --short HEAD)"
  49. snapcraftctl set-version "${last_committed_tag}+git${git_revno}.${git_hash}"
  50. override-build: |
  51. snapcraftctl build
  52. # Correct the Icon path
  53. sed -i 's|^Exec=flameshot|Exec=/snap/bin/org.flameshot.Flameshot|' ${SNAPCRAFT_PART_INSTALL}/usr/local/share/applications/org.flameshot.Flameshot.desktop
  54. 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
  55. sed -i 's/^\(Name\(\[.\+\]\)\?=.*\)$/\1 (Snappy Edition)/g' ${SNAPCRAFT_PART_INSTALL}/usr/local/share/applications/org.flameshot.Flameshot.desktop
  56. build-packages:
  57. - g++
  58. - make
  59. - qt5-default
  60. - git
  61. stage-packages:
  62. - dbus-x11
  63. - libgtk2.0-0
  64. - openssl
  65. - ca-certificates
  66. - libxkbcommon0
  67. - ttf-ubuntu-font-family
  68. - dmz-cursor-theme
  69. - light-themes
  70. - adwaita-icon-theme
  71. - gnome-themes-standard
  72. - shared-mime-info
  73. - libgdk-pixbuf2.0-0
  74. slots:
  75. # Depending on in which environment we're running we either need
  76. # to use the system or session DBus so we also need to have one
  77. # slot for each.
  78. dbus-flameshot:
  79. interface: dbus
  80. bus: session
  81. name: org.flameshot.Flameshot