<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Nov 22, 2014 at 7:51 AM, Dirk Hohndel <span dir="ltr"><<a href="mailto:dirk@hohndel.org" target="_blank">dirk@hohndel.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">On Sat, Nov 22, 2014 at 06:49:39AM +0200, Miika Turkia wrote:<br>
> Some instructions how building libdivecomputer differs from Subsurface<br>
> build. And mention to copy libigt2 over to other repository if needed.<br>
<br>
</span>I have started to play with this and would like go a slightly different<br>
path (but I'd like your feedback).<br>
<br>
I would like to "cheat" when creating our packages. I'd like to AT LEAST<br>
include our private libdivecomputer and link statically against that.<br>
(I'd like our private marble as well, but that's a lot more work and most<br>
likely not worth it).<br>
<br>
So I was thinking of having a completely clean git directory layout like<br>
this:<br>
<br>
src/subsurface<br>
src/subsurface/libdivecomputer<br>
<br>
Both of these directories are whatever git version I want (let's say tip<br>
of master and tip of my private branch).<br>
Then cp that src/subsurface directory into src/subsurface-$VERSION<br>
<br>
then start building libdivecomputer first<br>
then build subsurface and make sure you link it against libdivecomputer.a<br>
<br>
Does that make sense?<br></blockquote><div><br></div><div>sounds fine by me. I'll try to take a look at what the debian/rules file should be for this. No promises though, as debain/ubuntu packaging is somewhat mysterious territory.<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
PS: here's the start of my script:<br>
<br>
#!/bin/bash<br>
# start from the directory above the combined subsurface &<br>
# subsurface/libdivecomputer directory<br>
VERSION=$(cd subsurface ; git describe | sed -e 's/-g.*$// ; s/^v//')<br>
echo "building Subsurface" $VERSION<br>
if [[ -d subsurface-$VERSION ]]; then<br>
        rm -rf subsurface-$VERSION.bak.prev<br>
        mv subsurface-$VERSION.bak subsurface-$VERSION.bak.prev<br>
        mv subsurface-$VERSION subsurface-$VERSION.bak<br>
fi<br>
mkdir subsurface-$VERSION<br>
(cd subsurface ; tar cf - . ) | (cd subsurface-$VERSION tar xf - )<br>
cd subsurface-$VERSION/libdivecomputer<br>
<br>
# now make libdivecomputer<br>
<br>
cd ..<br>
<br>
# now create the Subsurface package with the libdivecomputer.a that we<br>
# just built<br>
<br>
</blockquote></div>Compiling both libdivecomputer and subsurface with the same debian/rules should be doable, so no need for individually compile them. However, I am not yet sure how the static compilation and linking can be done Debian way. Will need to do some testing here.<br><br>The git version string for libdivecomputer should probably be manually updated into libdc sources as the compilation is done outside of git tree, and thus that string is not returned by "subsurrace --version". At least that is how it currently works from subsurface-beta Launchpad repository (Subsurface v4.2.90, built with libdivecomputer v0.5.0-devel ()).<br><br>miika<br></div></div>