Analogous to DESTDIR for Boos installation

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Analogous to DESTDIR for Boos installation

Boost - Users mailing list
Hi,
I need to prepare a binary distribution of Boost for deploying on
company hosts. For this, I need to configure libraries with a prefix
of say /usr/local, doing as per documentation

./bootstrap.sh --prefix=/some/path

where /some/path is the actual path where the libraries and header
flles will be installed on the various hosts.

To prepare the package to be distributed (the actual packaging system
used is irrelevant here, simply assuming a tar.gz would do) I need,
however, to "install" everything under some other path, say
/path/to/package/content.

When using gnu packages, I usually do something like

./configure --prefix=/some/path
make
make DESTDIR=/path/to/package/content install

and then I can prepare and distribute my package.

I'm unable to find an analogous procedure for Boost. More exactly, I
do not found a way to invoke the install phase of b2 with a different
prefix than the one specified to the stage phase through the --prefix
options to boostrap.sh

I solved the problem in a unsatisfactory way by manually copying the
files from both the source and the build directory to the content
folder, but I'd really like to have an automated way to do it. Is this
possible? If yes, how? And if not, does anyone have a better idea than
manual copying?

Thanks for the help

--
Leo Cacciari

Aliae nationes servitutem pati possunt. Populi Romani est propria libertas.
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Analogous to DESTDIR for Boos installation

Boost - Users mailing list
On 27/09/2017 23:00, Leo Cacciari wrote:

> To prepare the package to be distributed (the actual packaging system
> used is irrelevant here, simply assuming a tar.gz would do) I need,
> however, to "install" everything under some other path, say
> /path/to/package/content.
>
> When using gnu packages, I usually do something like
>
> ./configure --prefix=/some/path
> make
> make DESTDIR=/path/to/package/content install
>
> and then I can prepare and distribute my package.
>
> I'm unable to find an analogous procedure for Boost. More exactly, I
> do not found a way to invoke the install phase of b2 with a different
> prefix than the one specified to the stage phase through the --prefix
> options to boostrap.sh

You should be able to just do it:

   b2 --prefix=/path/to/package/content install

Alternatively, if that does something undesirable, use this:

   b2 --stagedir=/path/to/package/content/lib stage

This will copy all the binaries to the designated folder.  It doesn't
copy the include files, but you can do that manually fairly easily.

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users