kamailio-5.x: make internal libs available always
authorSebastian Kemper <sebastian_ml@gmx.net>
Sun, 11 Feb 2018 18:35:47 +0000 (19:35 +0100)
committerSebastian Kemper <sebastian_ml@gmx.net>
Sun, 11 Feb 2018 18:39:07 +0000 (19:39 +0100)
kamailio comes with internal libraries. Some are not built when only the
standard group of modules is compiled (i.e. no modules selected in
menuconfig).

The problem is that there is no way to rely on specific internal
libraries being available in the main kamailio package.

To fix this this add some modules (if they are not already selected)
that will kick of the build of the internal libraries in any case.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
net/kamailio-5.x/Makefile

index 1a65daf095d1f22711504a741dac08bcb2890da6..d3b2468ace667bbc7ed531e43e3b38de2679864d 100644 (file)
@@ -118,9 +118,25 @@ endef
 
 TARGET_CPPFLAGS+=$(if $(CONFIG_PACKAGE_kamailio5-mod-app-python),-I$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION))
 
+# Kamailio always builds a baseline of packages. The "standard" group is
+# the lightest baseline.
+
+# "uid_gflags" is added to the list of modules to have at least one
+# module that kicks off the build of the internal libsrdb2. The module
+# has no other extra dependencies.
+#
+# The same is done with:
+#   "ims_diameter_server" -> libkamailio_ims
+#   "carrierroute" -> libtrie
+
 # "lib_target" is specified in order for the modules to get a proper
 # RPATH, as otherwise they would not find the internal libraries.
 
+EXTRA_MODULES:= \
+       $(if $(CONFIG_PACKAGE_kamailio5-mod-carrierroute),,carrierroute) \
+       $(if $(CONFIG_PACKAGE_kamailio5-mod-ims-diameter-server),,ims_diameter_server) \
+       $(if $(CONFIG_PACKAGE_kamailio5-mod-uid-gflags),,uid_gflags)
+
 PKG_MAKE_ARGS:= \
        prefix=/ \
        cfg_dir=/etc/kamailio/ \
@@ -129,7 +145,7 @@ PKG_MAKE_ARGS:= \
        lib_dir=/usr/lib/kamailio/ \
        modules_dir=/usr/lib/kamailio/ \
        group_include="standard" \
-       include_modules="$$(INCL_MODULES)" \
+       include_modules="$$(INCL_MODULES) $(EXTRA_MODULES)" \
        cfg_target=/etc/kamailio/ \
        lib_target=/usr/lib/kamailio/ \
        run_target=/var/run/kamailio/ \