Skip to content
This repository has been archived by the owner on Dec 15, 2018. It is now read-only.

Flatpak packaging #26

Closed
Alexander-Wilms opened this issue Aug 25, 2018 · 10 comments
Closed

Flatpak packaging #26

Alexander-Wilms opened this issue Aug 25, 2018 · 10 comments

Comments

@Alexander-Wilms
Copy link

Alexander-Wilms commented Aug 25, 2018

I'm not sure if this or LibrePCB/librepcb is the proper place to file this request. I think it would be nice if LibrePCB could be provided as a Flatpak via Flathub. Below is a simple manifest, which I used to build LibrePCB. It seems to work fine so far; you can test it like this:

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub org.kde.Sdk 5.11
flapak-builder --force-clean --ccache --repo=librepcb-repo librepcb-build org.librepcb.LibrePCB.yaml
flatpak remote-add --no-gpg-verify librepcb-repo librepcb-repo
flatpak install librepcb-repo org.librepcb.LibrePCB
flatpak run org.librepcb.LibrePCB

Contents of org.librepcb.LibrePCB.yaml:

app-id: org.librepcb.LibrePCB
runtime: org.kde.Sdk
runtime-version: 5.11
sdk: org.kde.Sdk
command: librepcb
rename-icon: librepcb
rename-desktop-file: librepcb.desktop
rename-appdata-file: librepcb.appdata.xml
finish-args:
- --socket=wayland
- --socket=x11
- --share=ipc
- --device=dri
- --share=network
- --filesystem=home # required for creating the workspace, downloading libraries etc.
cleanup:
- /include
modules:

- name: librepcb
  buildsystem: qmake
  builddir: true
  sources:
  - type: git
    url: https://github.com/LibrePCB/LibrePCB
  - type: file
    path: librepcb.appdata.xml
  post-install:  
  - install -Dm 644 /app/share/pixmaps/librepcb.svg /app/share/icons/hicolor/scalable/apps/librepcb.svg
  - install -Dm 644 ../librepcb.appdata.xml /app/share/metainfo/librepcb.appdata.xml

You also need the appdata file from LibrePCB/LibrePCB#314

@ubruhin
Copy link
Member

ubruhin commented Aug 26, 2018

I think it would be nice if LibrePCB could be provided as a Flatpak via Flathub.

Yes, that would be great :)

Below is a simple manifest, which I used to build LibrePCB.

Nice, thanks! 👍

Are you interested in resolving LibrePCB/LibrePCB#313 and LibrePCB/LibrePCB#314? Then I could follow the App Submission instructions.

@Alexander-Wilms
Copy link
Author

Alexander-Wilms commented Aug 26, 2018

I'll try. Flathub requires stable releases, though. Until then one could use Gitlab CI to provide nightlies, like e.g. SuperTux does it: https://gitlab.com/SuperTux/flatpak

@ubruhin
Copy link
Member

ubruhin commented Aug 26, 2018

Hmm okay, I think we could provide our nightly flatpaks directly on https://download.librepcb.org. And as soon as we have stable releases, we can submit them to the official Flathub.

@ubruhin
Copy link
Member

ubruhin commented Aug 31, 2018

I was able to use GitLab-CI to automatically build the flatpak: https://gitlab.com/LibrePCB/librepcb-flatpak/.

The bundle is hosted at https://download.librepcb.org/nightly_builds/master/librepcb-nightly-linux-x86_64.flatpak and the repository at https://download.librepcb.org/flatpak_repository/.

Usage:

flatpak remote-add --no-gpg-verify librepcb https://download.librepcb.org/flatpak_repository/
flatpak install librepcb org.librepcb.LibrePCB
flatpak run org.librepcb.LibrePCB

@Alexander-Wilms Could you try if it also works for you?

@ubruhin
Copy link
Member

ubruhin commented Aug 31, 2018

Unfortunately the mimetypes are not installed properly...

@Alexander-Wilms
Copy link
Author

Alexander-Wilms commented Aug 31, 2018

I can try installing it in a few minutes. I think anything that should be exported needs to have the org.librepcb.LibrePCB prefix: flathub/org.jamovi.jamovi#9

@Alexander-Wilms
Copy link
Author

Thanks for the repo, it works fine here. Only thing to note is that one needs to run flatpak install with sudo, since the build isn't signed: flatpak/flatpak#1015

@ubruhin
Copy link
Member

ubruhin commented Aug 31, 2018

I think anything that should be exported needs to have the org.librepcb.LibrePCB prefix

Done in LibrePCB/LibrePCB@7736854, now it seems to work 😃

Thanks for the repo, it works fine here.

Perfect 👍

Only thing to note is that one needs to run flatpak install with sudo, since the build isn't signed

True...

Now the open tasks are:

@ubruhin
Copy link
Member

ubruhin commented Nov 25, 2018

I submitted LibrePCB 0.1.0 to Flathub: flathub/flathub#738

@ubruhin
Copy link
Member

ubruhin commented Nov 28, 2018

Package is now available at Flathub 😃 https://flathub.org/apps/details/org.librepcb.LibrePCB

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants