snapcraft.yaml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. ---
  2. name: flameshot
  3. adopt-info: flameshot
  4. base: core18
  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: flameshot
  20. desktop: usr/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. - pulseaudio
  36. - wayland
  37. - unity7
  38. - x11
  39. parts:
  40. flameshot:
  41. build-snaps:
  42. - kde-frameworks-5-core18-sdk
  43. - kde-frameworks-5-core18
  44. - cmake #core18 does not have new enough cmake so install from snap
  45. plugin: cmake
  46. configflags:
  47. - '-DCMAKE_BUILD_TYPE=RelWithDebInfo'
  48. - '-DCMAKE_INSTALL_PREFIX=/usr'
  49. source: https://github.com/flameshot-org/flameshot.git
  50. source-type: git
  51. override-pull: |
  52. snapcraftctl pull
  53. last_committed_tag="$(git tag -l --sort=-v:refname | 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/share/applications/org.flameshot.Flameshot.desktop
  61. sed -i 's|^Icon=.*|Icon=${SNAP}/usr/share/icons/hicolor/scalable/apps/org.flameshot.Flameshot.svg|' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/org.flameshot.Flameshot.desktop
  62. sed -i 's/^\(Name\(\[.\+\]\)\?=.*\)$/\1 (Snappy Edition)/g' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/org.flameshot.Flameshot.desktop
  63. build-packages:
  64. - g++
  65. - make
  66. - qt5-default
  67. - qttools5-dev-tools
  68. - libqt5svg5-dev
  69. stage-packages:
  70. - dbus-x11
  71. - libgtk2.0-0
  72. - openssl
  73. - ca-certificates
  74. - qtwayland5
  75. - libqt5dbus5
  76. - libqt5network5
  77. - libqt5core5a
  78. - libqt5widgets5
  79. - libqt5gui5
  80. - libqt5svg5
  81. - libxkbcommon0
  82. - ttf-ubuntu-font-family
  83. - dmz-cursor-theme
  84. - light-themes
  85. - adwaita-icon-theme
  86. - gnome-themes-standard
  87. - shared-mime-info
  88. - libgdk-pixbuf2.0-0
  89. prime:
  90. # libquazip5-1 pulls in Qt5 from bionic as a dependency. We don't
  91. # want it in our snap, however, because we get a newer Qt5 from the
  92. # kde-kf5 platform snap.
  93. - "-usr/lib/x86_64-linux-gnu/libQt5*"
  94. - "-usr/lib/x86_64-linux-gnu/libqt5*"
  95. slots:
  96. # Depending on in which environment we're running we either need
  97. # to use the system or session DBus so we also need to have one
  98. # slot for each.
  99. dbus-flameshot:
  100. interface: dbus
  101. bus: session
  102. name: org.flameshot.Flameshot