snapcraft.yaml 3.2 KB

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