I propose that the debian package building should be progressive.
It's a good idea to first keep using nodejs internally in the package. I mean having a specific
version of nodejs installed with ucoin. So nodejs compatibility will be handled in the package.
For maintaining the package building I propose some options, to be discussed here in French first:
The modifications in install.sh is for code reuse, and to be DRY (Dont Repeat Yourself), I splited
install_node_js() from install_ucoin_from_git() and added a command line switch --call-only for the script.
Which purpose is to load the original script but only execute the newly available install_node_js() function, with the 2 arguments.
So my questions are related to the way you'd like to work with the debian package building script:
Do I pull-request the inclusion of install.sh for your own usage too?
Or, Should I split install.sh into common reusable shell helper functions?
Do you want I also pull-request the Makefile? It means I will probably merge some behavior of install.sh into Makefile rules, to be DRY compliant, and also because it's really a Makefile jobs…
may be pipe install.sh | bash would become:
git clone ucoinmake install-local-user
Or some mixed solution…
Tell me, as I can also maintains debian.patches on the packet side which will be applied by debhelpers when the package is build.
News from the .deb: It can now build partially with debian tools, the Makefile is created by the package source itself, could be accomplished some other way. The result of the build is:
nodejs downloaded and extracted
npm install has built all the libs
now it needs to be installed somewhere. I proposed to first use /home/ucoin/.ucoin similarly to what is done by install.sh. Needs to be changed in the future to fit with debian's policy.
I'm reading more deeply install.sh and its tight link to ucoin.sh which proposes a shell function which is the shell wrapper to nodejs bin/ucoind (javascript)
I'm going to rewrite what I need to both script by strictly keeping existing behavior. I mean, I'm gonna change both ucoin.sh and the ucoind function and install.sh to be usable by my installer, but still providing the same call syntax.
It is OK if you change ucoind.sh and install.sh files by keeping the exact same syntax + exact same behavior. You can also include the Makefile with the same condition.
Will you push soon to your github repo so I can have a preview of these files?
It is not at all portable yet, assuming my ucoin clone to be in $HOME/ucoin.
I faced binary lib dependencies complain by the debhelper dh_shlibdeps, which is probably because of the build is done by a local nodejs version and not by a debian's one. I stopped to progress here and the installer didn't go forward.
I'm also still in progress to provide script helpers, but I started to use a released tarball and I should now move to a git helper: like described here
I didn't push package draft because it's mostly broken and don't live well in nodejs multiple version environment…