totalspectrum / flexprop

Simple GUI for Propeller development (both P1 and P2)
Other
38 stars 15 forks source link

Build RPM using archive tar.gz from Github #73

Closed drwonky closed 1 year ago

drwonky commented 1 year ago

This builds on the previous RPM SPEC work and uses tar.gz files instead of git clone to fetch sources. The main advantage is that you can use plain tar files instead of cloning a bunch of git history. This also falls into line with standard RPM practice, whereas Git repos are not mainline.

Unfortunately I was not able to use the %setup macro because Github puts %{name}-%{branch} as the root directory in the tar file, and RPM macros just can't handle this. The workaround was to just implement the necessary steps as discrete commands.

I also broke down the build process somewhat to try and speed up building. The spin2cpp repo can be built using parallel make, but it seems that loadp2 and PropLoader are not standalone builds and must be built under the flexprop Makefile umbrella.

The build is a little faster, but it could be made a lot faster with some tweaking.

The %{make_build} macro automatically detects the number of cores available and uses -j<cores> as an argument to make, allowing for maximum parallelism. On my 24 thread machine it just whizzes through the spin2cpp build. I think with fixes to the Makefile dependencies and such, an RPM build could be sub 15 seconds. Right now it takes 34 seconds on my machine.

totalspectrum commented 1 year ago

This looks nice, thank you,