porymap icon indicating copy to clipboard operation
porymap copied to clipboard

Flatpak

Open JakobDev opened this issue 1 year ago • 0 comments

I have made a Flatpak manifest for porymap. Flatpak is a universal package system for Linux. If you create a Flatpak, porymap can be installed on evry Linux Distro without any problems. You can also publish to Flathub, which is a universal AppStore for Linux.

Here is the Manifest:

app-id: io.github.huderlem.porymap
runtime: org.kde.Platform
runtime-version: "5.15-21.08"
sdk: org.kde.Sdk
command: porymap
finish-args:
  - --socket=fallback-x11
  - --socket=wayland
  - --device=dri
  - --share=ipc

modules:
  - name: porymap
    buildsystem: qmake
    post-install:
      - install -Dm755 porymap -t $FLATPAK_DEST/bin
    sources:
      - type: archive
        url: https://github.com/huderlem/porymap/archive/refs/tags/4.5.0.tar.gz
        sha256: 0924fe64ec83c5ba8ded6d73d4bbcf3cf2b2ad07036f4f166209c888bbf7a568

Save it as io.github.huderlem.porymap.yaml.

Flatpak should be pre-installed and configured on most Distros, but if you don't have it, follow setup instructions. After that, run the following command:

flatpak install org.kde.Platform//5.15-21.08 org.kde.Sdk//5.15-21.08 org.flatpak.Builder

To build it, run the following command in the directory you saved io.github.huderlem.porymap.yaml.

flatpak run org.flatpak.Builder build-dir io.github.huderlem.porymap.yaml --force-clean --ccache --install --user

This will build and install porymap.

To run it, use this command:

flatpak run io.github.huderlem.porymap

As far as I have tested, everything works out of the Box. The only thing you need to add is a .desktop file, so it will appear in the Menu, and a AppStream file which contains the Informations for the Sfotware Centers (Desxription, Screenshots etc.).

The Benefit of publishing on Flathub is, that it can easily be installed on every Linux Distro with one click. Also more people will find porymap. Users will no longer need to build porymap from source. It uses the Qt version from the KDE runtime and not from the Host system, so it will even work on Distros which ship a older version of Qt. Flathub will handle the Build and Updates for you. You just need to give them the Manifest and when a new Version is releases, you just need to update the URL and the SHA256.

JakobDev avatar Jul 08 '22 07:07 JakobDev