All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH RFC 0/2] Add configuration item for custom JavaScript install path
@ 2012-06-19  6:56 spdawson at gmail.com
  2012-06-19  6:56 ` [Buildroot] [PATCH RFC 1/2] " spdawson at gmail.com
  2012-06-19  6:56 ` [Buildroot] [PATCH RFC 2/2] Use JavaScript install path from configuration during package installation spdawson at gmail.com
  0 siblings, 2 replies; 6+ messages in thread
From: spdawson at gmail.com @ 2012-06-19  6:56 UTC (permalink / raw)
  To: buildroot

From: Simon Dawson <spdawson@gmail.com>

JavaScript files are installed by convention into /var/www in the target
filesystem. This is inflexible, and not appropriate to all use cases.

This patch series adds a Buildroot-wide configuration item to allow the
JavaScript install path to be customised; the path will be /var/www by default.

Simon Dawson (2):
  Add configuration item for custom JavaScript install path
  Use JavaScript install path from configuration during package
    installation

 package/Config.in                              |    1 +
 package/explorercanvas/explorercanvas.mk       |    4 ++--
 package/flot/flot.mk                           |    4 ++--
 package/javascript/Config.in                   |    5 +++++
 package/jquery-sparkline/jquery-sparkline.mk   |    4 ++--
 package/jquery-validation/jquery-validation.mk |    4 ++--
 package/jquery/jquery.mk                       |    4 ++--
 7 files changed, 16 insertions(+), 10 deletions(-)
 create mode 100644 package/javascript/Config.in

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH RFC 1/2] Add configuration item for custom JavaScript install path
  2012-06-19  6:56 [Buildroot] [PATCH RFC 0/2] Add configuration item for custom JavaScript install path spdawson at gmail.com
@ 2012-06-19  6:56 ` spdawson at gmail.com
  2012-06-20 23:38   ` Arnout Vandecappelle
  2012-06-19  6:56 ` [Buildroot] [PATCH RFC 2/2] Use JavaScript install path from configuration during package installation spdawson at gmail.com
  1 sibling, 1 reply; 6+ messages in thread
From: spdawson at gmail.com @ 2012-06-19  6:56 UTC (permalink / raw)
  To: buildroot

From: Simon Dawson <spdawson@gmail.com>

Signed-off-by: Simon Dawson <spdawson@gmail.com>
---
 package/Config.in            |    1 +
 package/javascript/Config.in |    5 +++++
 2 files changed, 6 insertions(+)
 create mode 100644 package/javascript/Config.in

diff --git a/package/Config.in b/package/Config.in
index 1044e9f..b60ba2b 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -378,6 +378,7 @@ source "package/libv4l/Config.in"
 endmenu
 
 menu "Javascript"
+source "package/javascript/Config.in"
 source "package/explorercanvas/Config.in"
 source "package/flot/Config.in"
 source "package/jquery/Config.in"
diff --git a/package/javascript/Config.in b/package/javascript/Config.in
new file mode 100644
index 0000000..c837e9e
--- /dev/null
+++ b/package/javascript/Config.in
@@ -0,0 +1,5 @@
+config BR2_JAVASCRIPT_INSTALL_PATH
+	string "Target install path for JavaScript"
+	default "/var/www"
+	help
+	  Specify a target install path for JavaScript files
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH RFC 2/2] Use JavaScript install path from configuration during package installation
  2012-06-19  6:56 [Buildroot] [PATCH RFC 0/2] Add configuration item for custom JavaScript install path spdawson at gmail.com
  2012-06-19  6:56 ` [Buildroot] [PATCH RFC 1/2] " spdawson at gmail.com
@ 2012-06-19  6:56 ` spdawson at gmail.com
  1 sibling, 0 replies; 6+ messages in thread
From: spdawson at gmail.com @ 2012-06-19  6:56 UTC (permalink / raw)
  To: buildroot

From: Simon Dawson <spdawson@gmail.com>

Signed-off-by: Simon Dawson <spdawson@gmail.com>
---
 package/explorercanvas/explorercanvas.mk       |    4 ++--
 package/flot/flot.mk                           |    4 ++--
 package/jquery-sparkline/jquery-sparkline.mk   |    4 ++--
 package/jquery-validation/jquery-validation.mk |    4 ++--
 package/jquery/jquery.mk                       |    4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/package/explorercanvas/explorercanvas.mk b/package/explorercanvas/explorercanvas.mk
index 93dcb1f..e099faa 100644
--- a/package/explorercanvas/explorercanvas.mk
+++ b/package/explorercanvas/explorercanvas.mk
@@ -8,11 +8,11 @@ endef
 
 define EXPLORERCANVAS_INSTALL_TARGET_CMDS
 	$(INSTALL) -D $(@D)/excanvas.compiled.js \
-		$(TARGET_DIR)/var/www/excanvas.js
+		$(TARGET_DIR)/$(BR2_JAVASCRIPT_INSTALL_PATH)/excanvas.js
 endef
 
 define EXPLORERCANVAS_UNINSTALL_TARGET_CMDS
-	rm -f $(TARGET_DIR)/var/www/excanvas.js
+	rm -f $(TARGET_DIR)/$(BR2_JAVASCRIPT_INSTALL_PATH)/excanvas.js
 endef
 
 $(eval $(call GENTARGETS))
diff --git a/package/flot/flot.mk b/package/flot/flot.mk
index 8b51b55..3d6987e 100644
--- a/package/flot/flot.mk
+++ b/package/flot/flot.mk
@@ -12,12 +12,12 @@ FLOT_FILES = jquery.flot $(addprefix jquery.flot.,\
 
 define FLOT_INSTALL_TARGET_CMDS
 	for i in $(FLOT_FILES); do \
-		$(INSTALL) -m 0644 -D $(@D)/$$i.min.js $(TARGET_DIR)/var/www/$$i.js; \
+		$(INSTALL) -m 0644 -D $(@D)/$$i.min.js $(TARGET_DIR)/$(BR2_JAVASCRIPT_INSTALL_PATH)/$$i.js; \
 	done
 endef
 
 define FLOT_UNINSTALL_TARGET_CMDS
-	rm -f $(TARGET_DIR)/var/www/jquery.flot*
+	rm -f $(TARGET_DIR)/$(BR2_JAVASCRIPT_INSTALL_PATH)/jquery.flot*
 endef
 
 $(eval $(call GENTARGETS))
diff --git a/package/jquery-sparkline/jquery-sparkline.mk b/package/jquery-sparkline/jquery-sparkline.mk
index d0b478a..3ef1dc7 100644
--- a/package/jquery-sparkline/jquery-sparkline.mk
+++ b/package/jquery-sparkline/jquery-sparkline.mk
@@ -8,11 +8,11 @@ endef
 
 define JQUERY_SPARKLINE_INSTALL_TARGET_CMDS
 	$(INSTALL) -m 0644 -D $(@D)/$(JQUERY_SPARKLINE_SOURCE) \
-		$(TARGET_DIR)/var/www/jquery.sparkline.js
+		$(TARGET_DIR)/$(BR2_JAVASCRIPT_INSTALL_PATH)/jquery.sparkline.js
 endef
 
 define JQUERY_SPARKLINE_UNINSTALL_TARGET_CMDS
-	rm -f $(TARGET_DIR)/var/www/jquery.sparkline.js
+	rm -f $(TARGET_DIR)/$(BR2_JAVASCRIPT_INSTALL_PATH)/jquery.sparkline.js
 endef
 
 $(eval $(call GENTARGETS))
diff --git a/package/jquery-validation/jquery-validation.mk b/package/jquery-validation/jquery-validation.mk
index 5fee4c1..ccf1155 100644
--- a/package/jquery-validation/jquery-validation.mk
+++ b/package/jquery-validation/jquery-validation.mk
@@ -8,11 +8,11 @@ endef
 
 define JQUERY_VALIDATION_INSTALL_TARGET_CMDS
 	$(INSTALL) -m 0644 -D $(@D)/jquery.validate.min.js \
-		$(TARGET_DIR)/var/www/jquery.validate.js
+		$(TARGET_DIR)/$(BR2_JAVASCRIPT_INSTALL_PATH)/jquery.validate.js
 endef
 
 define JQUERY_VALIDATION_UNINSTALL_TARGET_CMDS
-	rm -f $(TARGET_DIR)/var/www/jquery.validate.js
+	rm -f $(TARGET_DIR)/$(BR2_JAVASCRIPT_INSTALL_PATH)/jquery.validate.js
 endef
 
 $(eval $(call GENTARGETS))
diff --git a/package/jquery/jquery.mk b/package/jquery/jquery.mk
index 08dd4a3..93d8eab 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_JAVASCRIPT_INSTALL_PATH)/jquery.js
 endef
 
 define JQUERY_UNINSTALL_TARGET_CMDS
-	rm -f $(TARGET_DIR)/var/www/jquery.js
+	rm -f $(TARGET_DIR)/$(BR2_JAVASCRIPT_INSTALL_PATH)/jquery.js
 endef
 
 $(eval $(call GENTARGETS))
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH RFC 1/2] Add configuration item for custom JavaScript install path
  2012-06-19  6:56 ` [Buildroot] [PATCH RFC 1/2] " spdawson at gmail.com
@ 2012-06-20 23:38   ` Arnout Vandecappelle
  2012-06-26  8:32     ` Simon Dawson
  0 siblings, 1 reply; 6+ messages in thread
From: Arnout Vandecappelle @ 2012-06-20 23:38 UTC (permalink / raw)
  To: buildroot

On 06/19/12 08:56, spdawson at gmail.com wrote:
> From: Simon Dawson<spdawson@gmail.com>
>
> Signed-off-by: Simon Dawson<spdawson@gmail.com>
> ---
>   package/Config.in            |    1 +
>   package/javascript/Config.in |    5 +++++
>   2 files changed, 6 insertions(+)
>   create mode 100644 package/javascript/Config.in
>
> diff --git a/package/Config.in b/package/Config.in
> index 1044e9f..b60ba2b 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -378,6 +378,7 @@ source "package/libv4l/Config.in"
>   endmenu
>
>   menu "Javascript"
> +source "package/javascript/Config.in"
>   source "package/explorercanvas/Config.in"
>   source "package/flot/Config.in"
>   source "package/jquery/Config.in"
> diff --git a/package/javascript/Config.in b/package/javascript/Config.in
> new file mode 100644
> index 0000000..c837e9e
> --- /dev/null
> +++ b/package/javascript/Config.in
> @@ -0,0 +1,5 @@
> +config BR2_JAVASCRIPT_INSTALL_PATH
> +	string "Target install path for JavaScript"
> +	default "/var/www"
> +	help
> +	  Specify a target install path for JavaScript files

  I would instead define a WWW_INSTALL_PATH, which can also be used to set the
wwwroot of the various http servers.  We could still have a javascript path
to point to a subdirectory of the wwwroot, but I don't think there's much point.

  Question is where this config option should go then.  We could put it next to
the webservers, but it is possible that you use some javascript libraries without
webserver (e.g. because it's custom-written in another application).  We could
also put it in target/generic/Config.in, but there's currently nothing similar
there...

  BTW personally, I'm in favour of defaulting to /www for this path instead of
/var/www.  However, the Linux Foundation's draft Filesystem Hierarchy Standard [1]
puts it at /srv/www.  Sounds even better to me, but it's a big change from our
current layout.


  Regards,
  Arnout

[1] http://bzr.linuxfoundation.org/loggerhead/lsb/devel/fhs-spec/annotate/head:/root-filesystem.xml#L1700

-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH RFC 1/2] Add configuration item for custom JavaScript install path
  2012-06-20 23:38   ` Arnout Vandecappelle
@ 2012-06-26  8:32     ` Simon Dawson
  2012-06-28 22:12       ` Arnout Vandecappelle
  0 siblings, 1 reply; 6+ messages in thread
From: Simon Dawson @ 2012-06-26  8:32 UTC (permalink / raw)
  To: buildroot

Thanks for the feedback Arnout.

On 21 June 2012 00:38, Arnout Vandecappelle <arnout@mind.be> wrote:
> ?I would instead define a WWW_INSTALL_PATH, which can also be used to set
> the wwwroot of the various http servers.

It's a good idea, but I don't know quite how it would be achieved
cleanly. A quick grep through Buildroot reveals the following
potential problem files.

* package/boa/boa.conf
* package/tinyhttpd/S85tinyhttpd
* package/tinyhttpd/tinyhttpd.patch

The configuration files could be fixed up during installation of the
relevant packages, but the httpd patch is more of a problem.

Does anyone have a suggestion for how to deal with this?

Simon.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH RFC 1/2] Add configuration item for custom JavaScript install path
  2012-06-26  8:32     ` Simon Dawson
@ 2012-06-28 22:12       ` Arnout Vandecappelle
  0 siblings, 0 replies; 6+ messages in thread
From: Arnout Vandecappelle @ 2012-06-28 22:12 UTC (permalink / raw)
  To: buildroot

On 06/26/12 10:32, Simon Dawson wrote:
> Thanks for the feedback Arnout.
>
> On 21 June 2012 00:38, Arnout Vandecappelle<arnout@mind.be>  wrote:
>>   I would instead define a WWW_INSTALL_PATH, which can also be used to set
>> the wwwroot of the various http servers.
>
> It's a good idea, but I don't know quite how it would be achieved
> cleanly. A quick grep through Buildroot reveals the following
> potential problem files.
>
> * package/boa/boa.conf
> * package/tinyhttpd/S85tinyhttpd
> * package/tinyhttpd/tinyhttpd.patch
>
> The configuration files could be fixed up during installation of the
> relevant packages, but the httpd patch is more of a problem.
>
> Does anyone have a suggestion for how to deal with this?


  Add -DWWW_INSTALL_PATH='"$(WWW_INSTALL_PATH)"' to CFLAGS.

  Regards,
  Arnout
-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-06-28 22:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-19  6:56 [Buildroot] [PATCH RFC 0/2] Add configuration item for custom JavaScript install path spdawson at gmail.com
2012-06-19  6:56 ` [Buildroot] [PATCH RFC 1/2] " spdawson at gmail.com
2012-06-20 23:38   ` Arnout Vandecappelle
2012-06-26  8:32     ` Simon Dawson
2012-06-28 22:12       ` Arnout Vandecappelle
2012-06-19  6:56 ` [Buildroot] [PATCH RFC 2/2] Use JavaScript install path from configuration during package installation spdawson at gmail.com

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.