snapcraft.yaml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. source-type: git
  47. override-pull: |
  48. snapcraftctl pull
  49. # remove release candidates
  50. last_committed_tag="$(git tag -l --sort=-v:refname | grep -v rc | head -1)"
  51. git_revno="$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)"
  52. git_hash="$(git rev-parse --short HEAD)"
  53. snapcraftctl set-version "${last_committed_tag}+git${git_revno}.${git_hash}"
  54. override-build: |
  55. snapcraftctl build
  56. # Correct the Icon path
  57. sed -i 's|^Exec=flameshot|Exec=/snap/bin/org.flameshot.Flameshot|' ${SNAPCRAFT_PART_INSTALL}/usr/local/share/applications/org.flameshot.Flameshot.desktop
  58. 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
  59. sed -i 's/^\(Name\(\[.\+\]\)\?=.*\)$/\1 (Snappy Edition)/g' ${SNAPCRAFT_PART_INSTALL}/usr/local/share/applications/org.flameshot.Flameshot.desktop
  60. build-packages:
  61. - g++
  62. - make
  63. - qt5-default
  64. - git
  65. stage-packages:
  66. - dbus-x11
  67. - libgtk2.0-0
  68. - openssl
  69. - ca-certificates
  70. - libxkbcommon0
  71. - ttf-ubuntu-font-family
  72. - dmz-cursor-theme
  73. - light-themes
  74. - adwaita-icon-theme
  75. - gnome-themes-standard
  76. - shared-mime-info
  77. - libgdk-pixbuf2.0-0
  78. slots:
  79. # Depending on in which environment we're running we either need
  80. # to use the system or session DBus so we also need to have one
  81. # slot for each.
  82. dbus-flameshot:
  83. interface: dbus
  84. bus: session
  85. name: org.flameshot.Flameshot