[SR-Dev] sip-router: modules & repositories

Daniel-Constantin Mierla miconda at gmail.com
Sat Mar 28 12:00:16 CET 2009



On 03/28/2009 12:26 AM, Andrei Pelinescu-Onciul wrote:
> [...]
>
> I've added support for multiple modules dirs (the list of modules dirs
> is defined in Makefile.dirs).
> It's on andrei/modules_dirs branch (see
> http://lists.sip-router.org/pipermail/sr-dev/2009-March/001179.html
> for more details).
>
> There are some changes when running make install: 
> - each set of modules is installed in its own dir
>  (e.g.: /usr/local/lib/sip-router/modules,
>        /usr/local/lib/sip-router/modules-k ...)
> - the modules docs are now installed in separate dirs
>   (instead of /usr/local/share/doc/sr/ in 
>              /usr/local/share/doc/sr/{modules,modules_s,modules_k} )
>
> One potential problem is that all the man pages are installed in the
> same dir, so modules with the same name might overwrite their man page.
> However only a small number of ser modules have man page support so
> far, so at least for now this is not a problem.
>
> The modules using includes from tm would need to be updated
>  (../tm/ should be replaced with ../../modules/tm/).
>
>
> If we agree that this is the best way to organize the repos, we should
>  decide on the names for the 3 modules directories and I'll merge my
>  branch into master.
> Regarding the names, they should not contain a '-' (to avoid potential
> future problems with shells that don't allow '-' in env. vars), and they
> should be different from any make variable name (so if you come up with
> a name grep it first in Makefile* to see if it's already used).
>
> We might consider renaming modules/ to something different (e.g.
> common_mods) to avoid some confusion with old make commands
> (right now make modules will make only the modules in the modules/ dir,
>  using a different dir name. would permit changing make modules to make
>  all the modules from all the dirs).
>
> BTW: we are not limited to 3 modules dirs, we could use as many as we
> want, we could even divide them alphabetically :-)
>   
for me it is ok to prefix them with modules_ or mods_ (e.g., modules_k 
or mods_s). I prefer the module-related prefix to be first (e.g., 
mods_common instead of common_mods)

Another idea that popped up, but this will require changes in all 
modules for includes to have:
- modules/common/*
- modules/kamailio/*
- modules/ser/*

But probably in Makefile.defs the dir names have to be simple and as we 
have first version, let's go for it.

The idea to group them in the future is very good IMO, because number of 
the modules increases as we go. So we can have:
- modules_db - db drivers
- modules_presence- presence related modules
... a.s.o.

Daniel

-- 
Daniel-Constantin Mierla
SIP Router Masterclass - Kamailio (OpenSER) Training
http://www.asipto.com/index.php/sip-router-masterclass/




More information about the sr-dev mailing list