[build2] possible to do something similar to DESTDIR= make install?

Boris Kolpackov boris at codesynthesis.com
Sun Aug 13 14:58:17 UTC 2017


Norbert Lange <nolange79 at gmail.com> writes:

> I just found out about build2 and would like to create a debian
> package for easy (un)installation.

Great. I will be glad to assist if you run into any other issues.


> I am hanging on the install step, normally you would so a fake-install
> and then archive the data.
> 
> eg.
> DESTDIR=/tmp/hugo make install
> 
> would install an executable into /tmp/hugo/usr/bin
> 
> To create (conforming) debian packages, both of build2 and software
> that uses build2 such a mechanism is needed.
> Might be that its already available, but I dint find any reference.

I've implemented this and it's now available in the staged version:

https://stage.build2.org/0/0.7.0-a.0/

The new configuration variable is called config.install.chroot. Here is
the usage example:

b config.install.root=/usr config.install.chroot=/tmp/install install


> Another relevant point is, that for building (conforming) debian
> packages it is not allowed to access the net. This is possible for
> build2 itself, I am not sure its possible for packages using it?

Yes, sure. Every build2 package is a build2 project which means it
can be downloaded, built, and installed manually, without using the
bpkg package manager.

In fact, if I were to create Debian packages of the toolchain, I
wouldn't even use build2-toolchain. Instead I would first get
libbutl and build2 and bootstrap the build system (see the INSTALL
file inside build2/ for details). The result of this step will be
two Debian packages: libbutl and build2.

Then you can package libbpkg (which will use the build system and
depend on libbutl). This will result in the libbpkg Debian package.

Then you can package bpkg (which will use the build system and
depend on libbpkg and libbutl).

And that will get you the entire toolchain packaged.

Boris



More information about the users mailing list