From 2f8b3af14413b574f622d08908ef270fa46ef67d Mon Sep 17 00:00:00 2001 From: lemoer Date: Wed, 6 Jan 2021 13:25:58 +0100 Subject: [PATCH] gluon.mk: allow GluonCheckSite in imagebuilder --- package/gluon.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package/gluon.mk b/package/gluon.mk index a2aab619..7ae261a2 100644 --- a/package/gluon.mk +++ b/package/gluon.mk @@ -20,9 +20,13 @@ shell-unescape = $(subst @1,@,$(subst @2,$(newline),$(1))) shell-verbatim = $(call shell-unescape,$(call shell-escape,$(1))) +# As of now, we need to set the LUA_CPATH variable. This would not be necessary +# for the normal gluon build but is necessary for the imagebuilder. +# Note that all variables in GluonCheckSite except for $(1) are expanded when +# opkg calls the post-install scripts, not during the package build. define GluonCheckSite [ -z "$$STAGING_DIR_HOSTPKG" ] || PATH="$$STAGING_DIR_HOSTPKG/bin:$$PATH" -lua "$$IPKG_INSTROOT/lib/gluon/check-site.lua" <<'END__GLUON__CHECK__SITE' +LUA_CPATH="$${TOPDIR}/staging_dir/hostpkg/lib/lua/5.1/?.so" lua "$$IPKG_INSTROOT/lib/gluon/check-site.lua" <<'END__GLUON__CHECK__SITE' $(call shell-verbatim,cat '$(1)') END__GLUON__CHECK__SITE endef