parnoldx / nasc

Do maths like a normal person
http://parnoldx.github.io/nasc/
GNU General Public License v3.0
560 stars 37 forks source link

[Packaging] Provide flatpak package #67

Closed phw closed 7 years ago

phw commented 7 years ago

I made an attempt to provide a Flatpak package for your excellent NaSC. The build files are available at https://github.com/phw/nasc-flatpak

The build is currently fine, but it requires some patching (see the patch files in the repository):

  1. Most important is patching of the app ID from com.github.parnold-x.nasc.gschema.xml to com.github.parnoldx.nasc.gschema.xml (without the dash). Flatpak doesn't allow the dash here, I filed an issue to ask on clarification on https://github.com/flatpak/flatpak-builder/issues/37 .
  2. lib dir path for qcalculate, would be solved by https://github.com/parnold-x/nasc/pull/57
  3. Hard coded template path for qcalculate

The last two issues should be solved upstream here. For the first issue we maybe need to keep the patch.

One remaining issue that it fails to update the exchange rates on startup. Not sure why, I experimented with --share=network without luck.

I would like to submit this to flathub.org if we get the issues above sorted out. If somebody wants to test this locally you can build a local package by cloning the repository and run:

flatpak-builder --repo=repo com.github.parnoldx.nasc com.github.parnoldx.nasc.json --force-clean
flatpak build-bundle repo nasc.flatpak com.github.parnoldx.nasc
flatpak install nasc.flatpak

Then run it via the desktop icon or from command line:

flatpak run com.github.parnoldx.nasc
parnoldx commented 7 years ago

Cool. Thanks. Hope I get time this winter to rewrite some parts.

  1. Mhh. The elementary houston appstore build thing enforces these RDNN. Not entierly sure if it's also the case with the gschema but I would prefer to keep it consistent.
  2. Merged. Hope launchpad builds now with your tip.
  3. I removed the template and the style dir can now be set in the CMake.
phw commented 7 years ago

Great, that's looking good :) I just submitted a final pull request, then I think this is good to go.

About the app ID: Yes, I would leave it as is and we just patch it for flatpak. We have conflicting restrictions here, and changing the app ID is not an option with Elementary anyway ( this troubles me in one of my own apps, too). If you are interested they are tracking this on https://github.com/elementary/houston/issues/436

Awesome app by the way, I had been looking for this for a while. I often fall back to pen and paper for things like this, but this is just great. Especially that you can give it away as PDF afterwards. Only thing I would love to see is some plotting capabilities :)

parnoldx commented 7 years ago

Happy to see that it's useful for you. Main problem for plotting is how to integrate this good regarding to UX.

phw commented 7 years ago

Have been using the flatpak version over the last days, working good for me. If you are ok with it I would propose this for flathub.org once you make a new stable release.

parnoldx commented 7 years ago

Im OK with it. I will trigger a new appcenter release. This should also make a release.

phw commented 7 years ago

Submitted to Flathub at https://github.com/flathub/flathub/pull/128

parnoldx commented 7 years ago

Great. Thank you.

phw commented 7 years ago

As soon as this is published I will provide a pull request for the README with install instructions.

smcv commented 7 years ago

Most important is patching of the app ID from com.github.parnold-x.nasc.gschema.xml to com.github.parnoldx.nasc.gschema.xml (without the dash)

I'd recommend com.github.parnold_x.nasc rather than com.github.parnoldx.nasc. There could be a Github user named parnoldx, but there can't be one named parnold_x because Github doesn't allow underscores in usernames (they are syntactically the same as Internet hostnames, so that things like parnold-x.github.io can work).

See also https://github.com/flatpak/flatpak-builder/issues/37#issuecomment-335248867

scx commented 5 years ago

New attempt to create a flatpak package: https://github.com/parnold-x/nasc/issues/105 https://github.com/flathub/flathub/pull/867

See also: https://github.com/scx/nasc-flatpak