diff mbox

jquery-ui: new package

Message ID 1337071203-5841-1-git-send-email-spdawson@gmail.com
State Superseded
Headers show

Commit Message

Simon Dawson May 15, 2012, 8:40 a.m. UTC
From: Simon Dawson <spdawson@gmail.com>

Signed-off-by: Simon Dawson <spdawson@gmail.com>
---
 package/Config.in              |    1 +
 package/jquery-ui/Config.in    |   23 +++++++++++++++++++++++
 package/jquery-ui/jquery-ui.mk |   29 +++++++++++++++++++++++++++++
 3 files changed, 53 insertions(+)
 create mode 100644 package/jquery-ui/Config.in
 create mode 100644 package/jquery-ui/jquery-ui.mk

Comments

Peter Korsgaard May 15, 2012, 8:54 a.m. UTC | #1
>>>>> "spdawson" == spdawson  <spdawson@gmail.com> writes:

 spdawson> From: Simon Dawson <spdawson@gmail.com>
 spdawson> Signed-off-by: Simon Dawson <spdawson@gmail.com>

 spdawson> +JQUERY_UI_VERSION = 1.8.20
 spdawson> +JQUERY_UI_SITE = http://jqueryui.com/download
 spdawson> +JQUERY_UI_SOURCE = jquery-ui-$(JQUERY_UI_VERSION).custom.zip
 spdawson> +
 spdawson> +JQUERY_UI_THEME = smoothness

I've looked at adding it myself, but the problem is the theming. How do
you expect to handle this?
Simon Dawson May 15, 2012, 1:42 p.m. UTC | #2
> I've looked at adding it myself, but the problem is the theming. How do
> you expect to handle this?

Hmm. Good question; they don't make it easy with the whole "download
builder" thing. Any suggestions?

On 15 May 2012 09:54, Peter Korsgaard <jacmet@uclibc.org> wrote:
>>>>>> "spdawson" == spdawson  <spdawson@gmail.com> writes:
>
>  spdawson> From: Simon Dawson <spdawson@gmail.com>
>  spdawson> Signed-off-by: Simon Dawson <spdawson@gmail.com>
>
>  spdawson> +JQUERY_UI_VERSION = 1.8.20
>  spdawson> +JQUERY_UI_SITE = http://jqueryui.com/download
>  spdawson> +JQUERY_UI_SOURCE = jquery-ui-$(JQUERY_UI_VERSION).custom.zip
>  spdawson> +
>  spdawson> +JQUERY_UI_THEME = smoothness
>
> I've looked at adding it myself, but the problem is the theming. How do
> you expect to handle this?
>
> --
> Bye, Peter Korsgaard
Peter Korsgaard May 15, 2012, 1:45 p.m. UTC | #3
>>>>> "Simon" == Simon Dawson <spdawson@gmail.com> writes:

 >> I've looked at adding it myself, but the problem is the theming. How do
 >> you expect to handle this?

 Simon> Hmm. Good question; they don't make it easy with the whole "download
 Simon> builder" thing. Any suggestions?

Not really. I gave up and just added a local package with my custom
downloaded theme.
Simon Dawson May 15, 2012, 2:07 p.m. UTC | #4
I suppose that could be the answer: allow the configuration to specify
a custom local path/tarball from which to install the user's custom
theme. Would that be an acceptable compromise?
diff mbox

Patch

diff --git a/package/Config.in b/package/Config.in
index fb1b08f..acbbdbd 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -370,6 +370,7 @@  source "package/explorercanvas/Config.in"
 source "package/flot/Config.in"
 source "package/jquery/Config.in"
 source "package/jquery-sparkline/Config.in"
+source "package/jquery-ui/Config.in"
 source "package/jquery-validation/Config.in"
 source "package/jsmin/Config.in"
 endmenu
diff --git a/package/jquery-ui/Config.in b/package/jquery-ui/Config.in
new file mode 100644
index 0000000..073a40a
--- /dev/null
+++ b/package/jquery-ui/Config.in
@@ -0,0 +1,23 @@ 
+config BR2_PACKAGE_JQUERY_UI
+	bool "jQuery UI"
+	help
+	  jQuery UI provides abstractions for low-level interaction and
+	  animation, advanced effects and high-level, themeable widgets,
+	  built on top of the jQuery JavaScript Library, that you can use
+	  to build highly interactive web applications.
+
+	  http://jqueryui.com/
+
+config BR2_PACKAGE_JQUERY_UI_JAVASCRIPT_PATH
+	string "Target install path for JavaScript"
+	default "/var/www/javascripts"
+	depends on BR2_PACKAGE_JQUERY_UI
+	help
+	  Specify a target install path for JavaScript files
+
+config BR2_PACKAGE_JQUERY_UI_CSS_PATH
+	string "Target install path for CSS"
+	default "/var/www/stylesheets"
+	depends on BR2_PACKAGE_JQUERY_UI
+	help
+	  Specify a target install path for CSS files
diff --git a/package/jquery-ui/jquery-ui.mk b/package/jquery-ui/jquery-ui.mk
new file mode 100644
index 0000000..472c9b3
--- /dev/null
+++ b/package/jquery-ui/jquery-ui.mk
@@ -0,0 +1,29 @@ 
+#############################################################
+#
+# jquery-ui
+#
+#############################################################
+JQUERY_UI_VERSION = 1.8.20
+JQUERY_UI_SITE = http://jqueryui.com/download
+JQUERY_UI_SOURCE = jquery-ui-$(JQUERY_UI_VERSION).custom.zip
+
+JQUERY_UI_THEME = smoothness
+
+define JQUERY_UI_EXTRACT_CMDS
+	unzip -d $(@D) $(DL_DIR)/$(JQUERY_UI_SOURCE)
+endef
+
+define JQUERY_UI_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0644 -D $(@D)/js/jquery-ui-$(JQUERY_UI_VERSION).custom.min.js \
+		$(TARGET_DIR)/$(BR2_PACKAGE_JQUERY_UI_JAVASCRIPT_PATH)/jquery-ui.js
+	mkdir -p $(TARGET_DIR)/$(BR2_PACKAGE_JQUERY_UI_CSS_PATH)
+	cp -a $(@D)/css/$(JQUERY_UI_THEME) \
+		$(TARGET_DIR)/$(BR2_PACKAGE_JQUERY_UI_CSS_PATH)
+endef
+
+define JQUERY_UI_UNINSTALL_TARGET_CMDS
+	$(RM) $(TARGET_DIR)/$(BR2_PACKAGE_JQUERY_UI_JAVASCRIPT_PATH)/jquery-ui.js
+	$(RM) -r $(TARGET_DIR)/$(BR2_PACKAGE_JQUERY_UI_CSS_PATH)/$(JQUERY_UI_THEME)
+endef
+
+$(eval $(call GENTARGETS))