summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2011-12-19 15:53:40 +0100
committerPeter Korsgaard <jacmet@sunsite.dk>2011-12-20 11:23:53 +0100
commit4565a1d75f7576c4b654152e1e5162f8b932f1ca (patch)
tree24f4be0795898d8ea55531376362a144749c334b
parent1886506b6b9e45f678f98e3d8e50bbcde1acad95 (diff)
package: add jsmin (javascript minimizer)
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
-rw-r--r--package/Config.in1
-rw-r--r--package/jsmin/Config.in11
-rw-r--r--package/jsmin/jsmin.mk25
3 files changed, 37 insertions, 0 deletions
diff --git a/package/Config.in b/package/Config.in
index 1c62ea37e..adebd4be7 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -328,6 +328,7 @@ source "package/flot/Config.in"
source "package/jquery/Config.in"
source "package/jquery-sparkline/Config.in"
source "package/jquery-validation/Config.in"
+source "package/jsmin/Config.in"
endmenu
menu "Networking"
diff --git a/package/jsmin/Config.in b/package/jsmin/Config.in
new file mode 100644
index 000000000..d0948b891
--- /dev/null
+++ b/package/jsmin/Config.in
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_JSMIN
+ bool "jsmin"
+ help
+ JSMin is a filter which removes comments and unnecessary
+ whitespace from JavaScript files. It typically reduces
+ filesize by half, resulting in faster downloads. It also
+ encourages a more expressive programming style because it
+ eliminates the download cost of clean, literate
+ self-documentation.
+
+ http://www.crockford.com/javascript/jsmin.html
diff --git a/package/jsmin/jsmin.mk b/package/jsmin/jsmin.mk
new file mode 100644
index 000000000..1c414ff90
--- /dev/null
+++ b/package/jsmin/jsmin.mk
@@ -0,0 +1,25 @@
+JSMIN_VERSION = a9b47554d5684a55301a2eb7ca8480b7ee7630d4
+JSMIN_SITE = git://github.com/douglascrockford/JSMin.git
+
+define JSMIN_BUILD_CMDS
+ $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) jsmin
+endef
+
+define JSMIN_INSTALL_TARGET_CMDS
+ $(INSTALL) -m 0755 -D $(@D)/jsmin $(TARGET_DIR)/usr/bin/jsmin
+endef
+
+define INPUT_EVENT_DAEMON_UNINSTALL_TARGET_CMDS
+ rm -f $(TARGET_DIR)/usr/bin/jsmin
+endef
+
+define HOST_JSMIN_BUILD_CMDS
+ $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) jsmin
+endef
+
+define HOST_JSMIN_INSTALL_CMDS
+ $(INSTALL) -m 0755 -D $(@D)/jsmin $(HOST_DIR)/usr/bin/jsmin
+endef
+
+$(eval $(call GENTARGETS))
+$(eval $(call GENTARGETS,host))