@@ -51,6 +51,15 @@ config BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE
This is necessary if you want to run swupdate with the embedded
webserver and do not provide an own website to be installed to
/var/www/swupdate.
+
+if BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE
+
+config BR2_PACKAGE_SWUPDATE_WEBSITE_PATH
+ string "location of swupdate website data"
+ default "/var/www/swupdate"
+
+endif
+
endif
comment "swupdate needs a toolchain w/ threads"
@@ -114,11 +114,16 @@ endef
define SWUPDATE_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(@D)/swupdate $(TARGET_DIR)/usr/bin/swupdate
- $(if $(BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE), \
- mkdir -p $(TARGET_DIR)/var/www/swupdate; \
- cp -dpf $(@D)/www/* $(TARGET_DIR)/var/www/swupdate)
+ $(SWUPDATE_INSTALL_TARGET_WEBSITE_CMDS)
endef
+ifeq ($(BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE),y)
+define SWUPDATE_INSTALL_TARGET_WEBSITE_CMDS
+ $(INSTALL) -d -m 0755 $(TARGET_DIR)$(BR2_PACKAGE_SWUPDATE_WEBSITE_PATH)
+ $(INSTALL) -m 0644 $(@D)/www/* $(TARGET_DIR)$(BR2_PACKAGE_SWUPDATE_WEBSITE_PATH)
+endef
+endif
+
# Checks to give errors that the user can understand
# Must be before we call to kconfig-package
ifeq ($(BR2_PACKAGE_SWUPDATE)$(BR_BUILDING),yy)
Some systems run on an empty /var tmpfs and would prefer the website data installed in /usr/share/swupdate/www or something similar so this allows the website data to go somewhere else. The default location of /var/www/swupdate is preserved. Signed-off-by: Jordan Yelloz <jordan@yelloz.me> --- package/swupdate/Config.in | 9 +++++++++ package/swupdate/swupdate.mk | 11 ++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-)