HTDOCS = /www
LUA_LIBRARYDIR = /usr/lib/lua
LUCI_LIBRARYDIR = $(LUA_LIBRARYDIR)/luci
+UCODE_LIBRARYDIR = /usr/share/ucode/luci
# 1: everything expect po subdir or only po subdir
endif
define Build/Prepare
- for d in luasrc htdocs root src; do \
+ for d in luasrc ucode htdocs root src; do \
if [ -d ./$$$$d ]; then \
mkdir -p $(PKG_BUILD_DIR)/$$$$d; \
$(CP) ./$$$$d/* $(PKG_BUILD_DIR)/$$$$d/; \
$(if $(CONFIG_LUCI_SRCDIET),$(call SrcDiet,$(1)$(LUCI_LIBRARYDIR)/),true)
$(call SubstituteVersion,$(1)$(LUCI_LIBRARYDIR)/)
endif
+ ifneq ($(wildcard ${CURDIR}/ucode),)
+ $(INSTALL_DIR) $(1)$(UCODE_LIBRARYDIR)
+ cp -pR $(PKG_BUILD_DIR)/ucode/* $(1)$(UCODE_LIBRARYDIR)/
+ $(call SubstituteVersion,$(1)$(UCODE_LIBRARYDIR)/)
+ endif
ifneq ($(wildcard ${CURDIR}/htdocs),)
$(INSTALL_DIR) $(1)$(HTDOCS)
cp -pR $(PKG_BUILD_DIR)/htdocs/* $(1)$(HTDOCS)/
$(SED) 's/<%# *\([^ ]*\)PKG_VERSION *%>/\1$(if $(PKG_VERSION),$(PKG_VERSION),$(PKG_SRC_VERSION))/g' \
-e 's/"\(<%= *\(media\|resource\) *%>[^"]*\.\(js\|css\)\)"/"\1?v=$(if $(PKG_VERSION),$(PKG_VERSION),$(PKG_SRC_VERSION))"/g' \
"$$$$src"; \
+ done; \
+ $(FIND) $(1) -type f -name '*.ut' | while read src; do \
+ $(SED) 's/{# *\([^ ]*\)PKG_VERSION *#}/\1$(if $(PKG_VERSION),$(PKG_VERSION),$(PKG_SRC_VERSION))/g' \
+ -e 's/"\({{ *\(media\|resource\) *}}[^"]*\.\(js\|css\)\)"/"\1?v=$(if $(PKG_VERSION),$(PKG_VERSION),$(PKG_SRC_VERSION))"/g' \
+ "$$$$src"; \
done
endef