snapcraft.yaml 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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 slot
  15. compression: lzo
  16. architectures:
  17. - build-on: amd64
  18. apps:
  19. flameshot:
  20. command: usr/local/bin/flameshot
  21. desktop: usr/local/share/applications/org.flameshot.Flameshot.desktop
  22. extensions:
  23. - kde-neon
  24. environment:
  25. DISABLE_WAYLAND: 1
  26. XDG_DATA_DIRS: $SNAP/share:$XDG_DATA_DIRS
  27. QT_QPA_PLATFORMTHEME: gtk3
  28. slots: [dbus-flameshot]
  29. plugs:
  30. - home
  31. - removable-media
  32. - network
  33. - network-bind
  34. - opengl
  35. - x11
  36. - wayland
  37. - desktop
  38. - desktop-legacy
  39. - unity7
  40. parts:
  41. flameshot:
  42. build-snaps:
  43. - kde-frameworks-5-qt-5-15-core20
  44. source: https://github.com/flameshot-org/flameshot.git
  45. plugin: cmake
  46. # This cannot be enabled until the KF5 toolkit in the snap is updated
  47. #cmake-parameters:
  48. # - -DUSE_WAYLAND_CLIPBOARD=1
  49. source-type: git
  50. override-pull: |
  51. snapcraftctl pull
  52. # remove release candidates
  53. last_committed_tag="$(git tag -l --sort=-v:refname | grep -v rc | head -1)"
  54. git_revno="$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)"
  55. git_hash="$(git rev-parse --short HEAD)"
  56. snapcraftctl set-version "${last_committed_tag}+git${git_revno}.${git_hash}"
  57. override-build: |
  58. snapcraftctl build
  59. # Correct the Icon path
  60. sed -i 's|^Exec=flameshot|Exec=/snap/bin/org.flameshot.Flameshot|' ${SNAPCRAFT_PART_INSTALL}/usr/local/share/applications/org.flameshot.Flameshot.desktop
  61. 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
  62. sed -i 's/^\(Name\(\[.\+\]\)\?=.*\)$/\1 (Snappy Edition)/g' ${SNAPCRAFT_PART_INSTALL}/usr/local/share/applications/org.flameshot.Flameshot.desktop
  63. build-packages:
  64. - g++
  65. - make
  66. - qt5-default
  67. - git
  68. stage-packages:
  69. - dbus-x11
  70. - libgtk2.0-0
  71. - openssl
  72. - ca-certificates
  73. - libxkbcommon0
  74. - ttf-ubuntu-font-family
  75. - dmz-cursor-theme
  76. - light-themes
  77. - adwaita-icon-theme
  78. - gnome-themes-standard
  79. - shared-mime-info
  80. - libgdk-pixbuf2.0-0
  81. slots:
  82. # Depending on in which environment we're running we either need
  83. # to use the system or session DBus so we also need to have one
  84. # slot for each.
  85. dbus-flameshot:
  86. interface: dbus
  87. bus: session
  88. name: org.flameshot.Flameshot