Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

port to core22 #8

Merged
merged 1 commit into from
Mar 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading