package: add Javascript menu and jQuery package
authorPeter Korsgaard <jacmet@sunsite.dk>
Sun, 18 Dec 2011 22:11:14 +0000 (23:11 +0100)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sun, 18 Dec 2011 22:28:37 +0000 (23:28 +0100)
A lot of open source Javascript libraries can be interesting to use on
embedded systems, so add a specific Javascript menu and the probably most
well known library of them all, jQuery.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/Config.in
package/jquery/Config.in [new file with mode: 0644]
package/jquery/jquery.mk [new file with mode: 0644]

index eb93b1c45b6660f8a2c7670fd5f223cd983c6bf3..b8eb066144bfd12dad2117d511e1cd5e7c5d2074 100644 (file)
@@ -322,6 +322,10 @@ source "package/java/concierge/Config.in"
 endmenu
 endif
 
+menu "Javascript"
+source "package/jquery/Config.in"
+endmenu
+
 menu "Networking"
 source "package/libcgi/Config.in"
 source "package/libcgicc/Config.in"
diff --git a/package/jquery/Config.in b/package/jquery/Config.in
new file mode 100644 (file)
index 0000000..92f5604
--- /dev/null
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_JQUERY
+       bool "jQuery"
+       help
+         jQuery is a fast and concise JavaScript Library that
+         simplifies HTML document traversing, event handling,
+         animating, and Ajax interactions for rapid web development.
+
+         http://jquery.com
diff --git a/package/jquery/jquery.mk b/package/jquery/jquery.mk
new file mode 100644 (file)
index 0000000..aba6301
--- /dev/null
@@ -0,0 +1,17 @@
+JQUERY_VERSION = 1.7.1
+JQUERY_SITE = http://code.jquery.com
+JQUERY_SOURCE = jquery-$(JQUERY_VERSION).min.js
+
+define JQUERY_EXTRACT_CMDS
+       cp $(DL_DIR)/$(JQUERY_SOURCE) $(@D)
+endef
+
+define JQUERY_INSTALL_TARGET_CMDS
+       $(INSTALL) -D $(@D)/$(JQUERY_SOURCE) $(TARGET_DIR)/var/www/jquery.js
+endef
+
+define JQUERY_UNINSTALL_TARGET_CMDS
+       rm -f $(TARGET_DIR)/var/www/jquery.js
+endef
+
+$(eval $(call GENTARGETS))