[PATCH] Add libdivecomputer and libgit2 to Ubuntu building

Miika Turkia miika.turkia at gmail.com
Sat Nov 22 08:37:11 PST 2014


On Sat, Nov 22, 2014 at 7:51 AM, Dirk Hohndel <dirk at hohndel.org> wrote:

> On Sat, Nov 22, 2014 at 06:49:39AM +0200, Miika Turkia wrote:
> > Some instructions how building libdivecomputer differs from Subsurface
> > build. And mention to copy libigt2 over to other repository if needed.
>
> I have started to play with this and would like go a slightly different
> path (but I'd like your feedback).
>
> I would like to "cheat" when creating our packages. I'd like to AT LEAST
> include our private libdivecomputer and link statically against that.
> (I'd like our private marble as well, but that's a lot more work and most
> likely not worth it).
>
> So I was thinking of having a completely clean git directory layout like
> this:
>
> src/subsurface
> src/subsurface/libdivecomputer
>
> Both of these directories are whatever git version I want (let's say tip
> of master and tip of my private branch).
> Then cp that src/subsurface directory into src/subsurface-$VERSION
>
> then start building libdivecomputer first
> then build subsurface and make sure you link it against libdivecomputer.a
>
> Does that make sense?
>

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.

>
> PS: here's the start of my script:
>
> #!/bin/bash
> # start from the directory above the combined subsurface &
> # subsurface/libdivecomputer directory
> VERSION=$(cd subsurface ; git describe | sed -e 's/-g.*$// ; s/^v//')
> echo "building Subsurface" $VERSION
> if [[ -d subsurface-$VERSION ]]; then
>         rm -rf subsurface-$VERSION.bak.prev
>         mv subsurface-$VERSION.bak subsurface-$VERSION.bak.prev
>         mv subsurface-$VERSION subsurface-$VERSION.bak
> fi
> mkdir subsurface-$VERSION
> (cd subsurface ; tar cf - . ) | (cd subsurface-$VERSION tar xf - )
> cd subsurface-$VERSION/libdivecomputer
>
> # now make libdivecomputer
>
> cd ..
>
> # now create the Subsurface package with the libdivecomputer.a that we
> # just built
>
> 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.

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 ()).

miika
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20141122/e6fde942/attachment-0001.html>


More information about the subsurface mailing list