Packaging Erlang libs and apps for a GNU/Linux distribution

Hartmut Goebel h.goebel@REDACTED
Sat Jul 11 17:48:59 CEST 2020


Hi,

I'm about to package some Erlang packages/modules for Guix
<https://guix.gnu.org/> and seeking some advice how to do it correctly.
There are not many Erlang packages in other distributions, to make some
general rules out ot it (and many are still using rebar2). Also I have
to admit that I have more or less no clue about Erlang. (My motivation
for packaging is to get ejabberd into guix, though.)

I learned that "rebar3" is the standard build tool, used by many
packages (according to what I'v seen at hex.pm).

My questions are:

  *

    Is there some kind of system-wide directory where rebar3 and the
    compiler will search for pre-build packages? (Like /usr/lib/ and
    /usr/include for C, /usr/lib/python3.7 for Python,
    /usr/lib/guile/3.0 for guile). Currently I'm symlinking dependencies
    into "_checkout", which seems awkward.

  *

    Is there some environment variable where rebar3 and the compilers
    will search for pre-build packages? (Like LIBPAAH, INCPATH,
    PYTHONPATH, GUILE_LOAD_PATH)

  *

    Is there some rebar3 install sub-command moving all relevant file
    into the correct, system-wide directories? (Like "make install" is
    expected to do)

    If not: Which ones are the relevant files or directories to install?
    (Currently I'm copying  the directories ebin, include and priv.)

  *

    Does it make sense to keep files compiled for the "test" profile as
    part of the built package? If so: Is there some standard system-wide
    location for?

  *

    Shall the test-suite be run as a specific profile? Which one?

  * When building escripts (rebar3 escript), as far as I've seen, this
    will create a "binary" containing all the required libraries - like
    static linking for C. Is there some way of "dynamic linking", where
    libraries are loaded from a system-wide location or from a path
    specified in some environment variable?

Many thanks in advance for any answer

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@REDACTED               |
| www.crazy-compilers.com | compilers which you thought are impossible |

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20200711/f3eb737a/attachment.htm>


More information about the erlang-questions mailing list