This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| app-id: md.obsidian.Obsidian | |
| branch: 'master' | |
| base: org.electronjs.Electron2.BaseApp | |
| base-version: 20.08 | |
| runtime: org.freedesktop.Platform | |
| runtime-version: '20.08' | |
| command: obsidian.sh | |
| separate-locales: false | |
| sdk: org.freedesktop.Sdk | |
| finish-args: | |
| - --socket=x11 | |
| - --device=dri | |
| - --filesystem=home | |
| modules: | |
| - name: obsidian | |
| buildsystem: simple | |
| build-commands: | |
| - ./Obsidian.AppImage --appimage-extract | |
| - install -Dp -m 644 squashfs-root/obsidian.desktop ${FLATPAK_DEST}/share/applications/md.obsidian.Obsidian.desktop | |
| - sed -i 's@Exec=.*@Exec=obsidian.sh %F@g' ${FLATPAK_DEST}/share/applications/md.obsidian.Obsidian.desktop | |
| - sed -i 's@Icon=.*@Icon=md.obsidian.Obsidian@g' ${FLATPAK_DEST}/share/applications/md.obsidian.Obsidian.desktop | |
| - sed -i 's@MimeType=.*@MimeType=text/markdown\;@g' ${FLATPAK_DEST}/share/applications/md.obsidian.Obsidian.desktop | |
| - sed -i '/X-AppImage-Version=.*/d' ${FLATPAK_DEST}/share/applications/md.obsidian.Obsidian.desktop | |
| - mv squashfs-root/* ${FLATPAK_DEST} | |
| - mv ${FLATPAK_DEST}/usr/share/icons/hicolor/128x128/apps/{obsidian,md.obsidian.Obsidian}.png | |
| - mv ${FLATPAK_DEST}/usr/share/icons/hicolor/512x512/apps/{obsidian,md.obsidian.Obsidian}.png | |
| - mv ${FLATPAK_DEST}/usr/share/icons/hicolor/64x64/apps/{obsidian,md.obsidian.Obsidian}.png | |
| - mv ${FLATPAK_DEST}/usr/share/icons/hicolor/48x48/apps/{obsidian,md.obsidian.Obsidian}.png | |
| - mv ${FLATPAK_DEST}/usr/share/icons/hicolor/32x32/apps/{obsidian,md.obsidian.Obsidian}.png | |
| - mv ${FLATPAK_DEST}/usr/share/icons/hicolor/256x256/apps/{obsidian,md.obsidian.Obsidian}.png | |
| - mv ${FLATPAK_DEST}/usr/share/icons/hicolor/16x16/apps/{obsidian,md.obsidian.Obsidian}.png | |
| - mkdir -p ${FLATPAK_DEST}/share/icons | |
| - mv ${FLATPAK_DEST}/usr/share/icons/hicolor ${FLATPAK_DEST}/share/icons/hicolor | |
| - install -Dm755 obsidian.sh ${FLATPAK_DEST}/bin/obsidian.sh | |
| sources: | |
| - type: file | |
| path: Obsidian.AppImage | |
| - type: script | |
| dest-filename: obsidian.sh | |
| commands: | |
| - "zypak-wrapper /app/obsidian $@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/sh | |
| set -eou pipefail | |
| readonly VERSION="0.8.15" | |
| readonly APPIMAGE_URL="https://github.com/obsidianmd/obsidian-releases/releases/download/v${VERSION}/Obsidian-${VERSION}.AppImage" | |
| readonly APPIMAGE_NAME="Obsidian.AppImage" | |
| readonly APP="md.obsidian.Obsidian" | |
| readonly MANIFEST="${APP}.yml" | |
| readonly REPO="obsidian" | |
| readonly APP_VERSION="$(grep branch "${MANIFEST}" | cut --delimiter \' --field 2)" | |
| readonly RUNTIME_VERSION="$(grep runtime-version "${MANIFEST}" | cut --delimiter \' --field 2)" | |
| readonly BUNDLE="${APP}-${APP_VERSION}.flatpak" | |
| curl -L "${APPIMAGE_URL}" --output "${APPIMAGE_NAME}" | |
| chmod +x "${APPIMAGE_NAME}" | |
| flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo | |
| flatpak-builder --force-clean \ | |
| --install-deps-from=flathub \ | |
| --repo="${REPO}" \ | |
| build-dir \ | |
| "${MANIFEST}" | |
| flatpak build-bundle \ | |
| --arch=x86_64 \ | |
| "${REPO}" \ | |
| "${BUNDLE}" \ | |
| "${APP}" \ | |
| "${APP_VERSION}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment