Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generalized custom path configuration/build support.
- Loading branch information
Showing
9 changed files
with
171 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
title: Custom loading path | ||
|
||
h3. Basics | ||
|
||
Starting with version @1.0.1@, it is possible to build a liquidsoap binary that can load | ||
all its dependencies from any arbitrary path. This is very useful to distribute a liquidsoap | ||
bundled binary, independent of the distribution used. | ||
|
||
A custom loading path is a directory that contains the following file/directories: | ||
* @./camomile@: Camomile shared data. They are usually located in @/usr/(local/)share/camomile@ | ||
* @./libs@: pervasive scripts. Their are located in @liquidsoap/scripts@ in liquidsoap's sources | ||
* @./log@: default log directories | ||
* @./magic@: directory for magic files. See below for more details. | ||
* @./plugins@: default plugins directory (most likely empty) | ||
* @./run@: default runtime files directory | ||
* @liquidtts@: @liquidtts@ script. | ||
|
||
h3. Adding liquidsoap binary | ||
|
||
In order to ship a liquidsoap binary which is independent of the distribution it will | ||
be run on, one need to also include its dynamic libraries, except for the most common. | ||
The following command may be used to list them: | ||
|
||
%% | ||
ldd ./liquidsoap | grep usr | cut -d' ' -f 3 | ||
%% | ||
|
||
Those libraries are usually copied into a @./ld@ directory. Then, the @LD_LIBRARY_PATH@ | ||
is used to point the dynamic loader to this directory. | ||
|
||
Finally, the @liquidsoap@ library is usually added in @./bin/liquidsoap@ | ||
|
||
h3. Configuration variables | ||
|
||
In the following, configuration variables may refer to either absolute or relative paths. If referring to | ||
a relative path, the path is resolved relatively to the directory where the @liquidsoap@ binary | ||
is located at. | ||
|
||
In order to tell liquidsoap where its custom path is located, you need to set the | ||
@LIQUIDSOAP_BASE_DIR@. | ||
|
||
Another important variable is @MAGIC@. It tells liquidsoap where to load the libmagic's | ||
definitions and defaults to @../magic/magic.mgc@. Older versions of libmagic may | ||
require to use @magic/magic.mime@ instead. | ||
|
||
h3. Full example | ||
|
||
For a fully-functional example, you can check our "heroku buildpack":https://github.com/savonet/heroku-buildpack-liquidsoap. | ||
Its layout is: | ||
|
||
%% | ||
./bin | ||
./bin/liquidsoap | ||
./camomile | ||
./camomile/charmaps | ||
(...) | ||
./ld | ||
./ld/libao.so.2 | ||
(...) | ||
./libs | ||
./libs/externals.liq | ||
(...) | ||
./liquidtts | ||
./log | ||
./magic | ||
./magic/magic.mime | ||
./plugins | ||
./run | ||
%% | ||
|
||
Its configuration variables are set to: | ||
|
||
%% | ||
LD_LIBRARY_PATH=/path/to/ld | ||
LIQUIDSOAP_BASE_DIR=.. | ||
MAGIC=../magic/magic.mime | ||
%% | ||
|
||
As you can see, we use an old version of @libmagic@ so we need to load @magic.mime@ instead of @magic.mgc@. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters