snapcraft.yaml 3.5 KB

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