Skip to content

Commit

Permalink
port to core22
Browse files Browse the repository at this point in the history
  • Loading branch information
soumyaDghosh committed Mar 24, 2024
1 parent 9f20c9d commit 0414fd0
Showing 1 changed file with 11 additions and 18 deletions.
29 changes: 11 additions & 18 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ license: MIT
icon: images/logo.png
summary: MarkText, a simple, elegant, cross-platform markdown editor.
description: |
MarkText is a cross-platform, next generation markdown editor that
MarkText is a cross-platform, next generation markdown editor that
focuses on speed and usability. It has features such as:
- Realtime preview (WYSIWYG) and a clean and simple interface to get a distraction-free writing experience.
Expand All @@ -18,7 +18,7 @@ description: |
Completely free and open-source forever.
base: core20
base: core22
grade: stable
confinement: strict
compression: lzo
Expand All @@ -27,40 +27,33 @@ architectures:
- build-on: amd64

parts:
bsi-trigger: # A non-built part, only used to trigger builds in build.snapcraft.io on upstream changes
plugin: nil
source: https://github.com/marktext/marktext.git

marktext:
plugin: dump
source:
source:
- on amd64: https://github.com/marktext/marktext/releases/download/v$SNAPCRAFT_PROJECT_VERSION/marktext-amd64.deb
source-type: deb
override-build: |
snapcraftctl build
sed -i 's|Icon=marktext|Icon=/usr/share/icons/hicolor/256x256/apps/marktext\.png|' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/marktext.desktop
craftctl default
sed -i 's|Icon=marktext|Icon=/usr/share/icons/hicolor/256x256/apps/marktext\.png|' ${CRAFT_PART_INSTALL}/usr/share/applications/marktext.desktop
stage-packages:
- libxkbfile1
- libnspr4
- libnss3
- libx11-dev
- libxkbfile-dev
- libsecret-1-dev
- libfontconfig-dev
prime:
- -opt/MarkText/chrome-sandbox

cleanup:
after: [marktext]
plugin: nil
build-snaps: [gnome-3-38-2004]
build-snaps: [gnome-42-2204]
override-prime: |
set -eux
cd /snap/gnome-3-38-2004/current
find . -type f,l -exec rm -f $SNAPCRAFT_PRIME/{} \;
cd /snap/gnome-42-2204/current
find . -type f,l -exec rm -f ${CRAFT_PRIME}/{} \;
apps:
marktext:
extensions: [gnome-3-38]
extensions: [gnome]
command: opt/MarkText/marktext --no-sandbox
desktop: usr/share/applications/marktext.desktop
environment:
Expand Down

0 comments on commit 0414fd0

Please sign in to comment.