flathub / io.github.dweymouth.supersonic

https://flathub.org/apps/details/io.github.dweymouth.supersonic
1 stars 2 forks source link

Flatpak packaging for Supersonic

Supersonic is a desktop music players that works with Subsonic-compatible servers like Navidrome.

To build this locally, try:

flatpak-builder build-dir com.github.dweymouth.supersonic.yml

Then to install:

flatpak-builder --user --install --force-clean build-dir com.github.dweymouth.supersonic.yml

And run:

flatpak run com.github.dweymouth.supersonic

You will need flatpak and flatpak-builder packages for the above to work.

Once this is published on Flathub, only flatpak will be required for running, of course.

Divergence from upstream

Some changes were originally required from upstream but have all been merged, thanks!

The remaining files are Golang-specific metadata information that is required to create the sources list that allows the package to be built without the network, see below.

Regenerating sources files

To regenerate the modules list, run this against your supersonic source tree (e.g. ~/dist/supersonic below):

go run github.com/dennwc/flatpak-go-mod@latest ~/dist/supersonic

Or, if it's installed locally:

~/go/bin/flatpak-go-mod ~/dist/supersonic

With the usual git pull, this becomes:

git -C ~/dist/supersonic pull && ~/go/bin/flatpak-go-mod ~/dist/supersonic

Digression

It's surprisingly difficult to get this to work right. First off, it's nearly impossible to come up with a full list of dependencies by hand, only animals and Debian developers do something like this. (To be fair, there's a good reason Debian developer do that, but it does not make sense in the Flatpak context in any case.)

There are various tools in various state of brokenness out there that allow you to automatically generate a list of sources entry. I have tried them all, let me give you a tour.

I ended up using dennwc and i audited this version of the source. It "Just Works".

References