Message ID | 1339681388-13133-1-git-send-email-spdawson@gmail.com |
---|---|
State | Rejected |
Headers | show |
>>>>> "spdawson" == spdawson <spdawson@gmail.com> writes:
spdawson> From: Simon Dawson <spdawson@gmail.com>
spdawson> Allow the JavaScript install path to be customised. By
spdawson> default, JavaScript files are installed to /var/www under the
spdawson> target root directory.
What's the use case for this? If we need it, wouldn't it then make more
sense to have a BR-wide setting for this instead of for each webrelated
package?
> What's the use case for this? If we need it, wouldn't it then make more > sense to have a BR-wide setting for this instead of for each webrelated > package? Installing JavaScript files into the hard-coded /var/www directory isn't always appropriate. For example, I am working on a project at the moment where /var is mounted as tmpfs, and I don't want any persistent data there. It's also not uncommon to structure things so that JavaScript files are in a subdirectory of the main /www or /var/www "web root" directory. Does that make sense? I totally agree with you about adding a Buildroot-wide configuration item for this, and probably also a similar configuration item to allow for a custom css install path.
diff --git a/package/jquery/Config.in b/package/jquery/Config.in index 92f5604..e811d48 100644 --- a/package/jquery/Config.in +++ b/package/jquery/Config.in @@ -6,3 +6,10 @@ config BR2_PACKAGE_JQUERY animating, and Ajax interactions for rapid web development. http://jquery.com + +config BR2_PACKAGE_JQUERY_JAVASCRIPT_PATH + string "Target install path for JavaScript" + default "/var/www" + depends on BR2_PACKAGE_JQUERY + help + Specify a target install path for JavaScript files diff --git a/package/jquery/jquery.mk b/package/jquery/jquery.mk index 08dd4a3..a4c31a8 100644 --- a/package/jquery/jquery.mk +++ b/package/jquery/jquery.mk @@ -8,11 +8,11 @@ endef define JQUERY_INSTALL_TARGET_CMDS $(INSTALL) -m 0644 -D $(@D)/$(JQUERY_SOURCE) \ - $(TARGET_DIR)/var/www/jquery.js + $(TARGET_DIR)/$(BR2_PACKAGE_JQUERY_JAVASCRIPT_PATH)/jquery.js endef define JQUERY_UNINSTALL_TARGET_CMDS - rm -f $(TARGET_DIR)/var/www/jquery.js + rm -f $(TARGET_DIR)/$(BR2_PACKAGE_JQUERY_JAVASCRIPT_PATH)/jquery.js endef $(eval $(call GENTARGETS))