The kamailio build system provides an RPATH "///usr/lib/kamailio/" when
linking. OpenWrt's rstrip.sh inspects this RPATH and drops it. Now the
modules cannot find the needed libraries. Fix this by specifying a path
that rstrip.sh accepts.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
TARGET_CPPFLAGS+=$(if $(CONFIG_PACKAGE_kamailio5-mod-app-python),-I$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION))
+# "lib_target" is specified in order for the modules to get a proper
+# RPATH, as otherwise they would not find the internal libraries.
+
PKG_MAKE_ARGS:= \
prefix=/ \
cfg_dir=/etc/kamailio/ \
group_include="standard" \
include_modules="$$(INCL_MODULES)" \
cfg_target:=/etc/kamailio/ \
+ lib_target=/usr/lib/kamailio/ \
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
LD_EXTRA_OPTS="$(TARGET_LDFLAGS)" \
LOCALBASE="$(STAGING_DIR)/usr" \