multi platform support into standard Erlang packaging

Christophe Romain christophe.romain@REDACTED
Sat Jul 1 10:14:59 CEST 2006


hello,

While packaging erlang apps for several platforms, we face the problem 
of architecture specific bin/lib location. the usual place is 
<appdir>/priv/lib/<driver_name>.so and <appdir>/priv/bin/<exec_file>

All application subdirectories are common to all platforms except the 
priv directory. As a result, a maintainer who wants to package an 
Erlang application must make as much packages as supported 
architectures. In any cases, only the content of the priv directory is 
changing.

Wouldn't it be nice to define a generic and standard location for priv 
things that allow to have many platforms into the same priv directory ?
example:
myapp-1.0/
     src/
     include/
     ebin/
     priv/
         lib/linux-x86/
         lib/darwin-powerpc/
         lib/windows/
         bin/windows/

REPOS actually does this and exports [libpath/1,binpath/1]
erlang code that needs to load drivers are changed from
   LibDir = code:priv_dir(?MODULE) ++ "/lib",
to
   LibDir = repos:libdir(?MODULE),

That would be great not to patch erlang code to reach such binary stuff 
!
What do you think about ?




More information about the erlang-questions mailing list