[Pkg-javascript-commits] [SCM] jqueryui branch, master, updated. debian/1.7.1-1-63-g6ea9d70

Marcelo Jorge Vieira metal at alucinados.com
Thu Jun 21 19:27:06 UTC 2012


The following commit has been merged in the master branch:
commit 6074d27c8728d24b329af29f9d2674a54793ce12
Author: Marcelo Jorge Vieira <metal at alucinados.com>
Date:   Mon Jun 18 19:28:11 2012 -0300

    Minifying effects and UI files (Closes: #677619)

diff --git a/debian/libjs-jquery-ui.install b/debian/libjs-jquery-ui.install
index 8c359ac..ca4b28e 100644
--- a/debian/libjs-jquery-ui.install
+++ b/debian/libjs-jquery-ui.install
@@ -1,5 +1,3 @@
-build/*.js                    /usr/share/javascript/jquery-ui
 css/                          /usr/share/javascript/jquery-ui
 development-bundle/themes     /usr/share/javascript/jquery-ui
 development-bundle/ui         /usr/share/javascript/jquery-ui
-build/*.css                   /usr/share/javascript/jquery-ui/css/smoothness/
diff --git a/debian/rules b/debian/rules
index 26d687b..29a0f96 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,24 +2,35 @@
 
 PKG_PATH:=/usr/share/javascript/jquery-ui
 JS_FILE:=$$(basename development-bundle/ui/jquery-ui-*.custom.js)
+JS_MIN_FILE:=$$(basename development-bundle/ui/jquery-ui-*.custom.min.js)
 CSS_FILE:=$$(basename css/smoothness/jquery-ui-*.custom.css)
+CSS_MIN_FILE:=$$(basename css/smoothness/jquery-ui-*.custom.min.css)
 DH_LINKS_FILE:=debian/libjs-jquery-ui.links
-BUILD_DIR:=build
 
 %:
 	dh $@
 
 override_dh_auto_build:
-	mkdir $(BUILD_DIR)
-	yui-compressor development-bundle/ui/jquery-ui-*.custom.js -o $(BUILD_DIR)/jquery-ui.min.js
-	yui-compressor css/smoothness/jquery-ui-*.custom.css -o $(BUILD_DIR)/jquery-ui.min.css
+	for file in `find development-bundle/ui/jquery* -name '*.js'`; do \
+		yui-compressor $$file -o $${file%.js}.min.js; \
+	done
+	for file in `find css/smoothness/ -name '*.css'`; do \
+		yui-compressor $$file -o $${file%.css}.min.css; \
+	done
 	echo "$(PKG_PATH)/ui/$(JS_FILE) $(PKG_PATH)/jquery-ui.js" > $(DH_LINKS_FILE)
+	echo "$(PKG_PATH)/ui/$(JS_MIN_FILE) $(PKG_PATH)/jquery-ui.min.js" >> $(DH_LINKS_FILE)
 	echo "$(PKG_PATH)/css/smoothness/$(CSS_FILE) $(PKG_PATH)/css/smoothness/jquery-ui.css" >> $(DH_LINKS_FILE)
+	echo "$(PKG_PATH)/css/smoothness/$(CSS_MIN_FILE) $(PKG_PATH)/css/smoothness/jquery-ui.min.css" >> $(DH_LINKS_FILE)
 	dh_auto_build
 
 override_dh_auto_clean:
 	rm -f $(DH_LINKS_FILE)
-	rm -rf $(BUILD_DIR)
+	for file in `find development-bundle/ui/ -name '*.min.js'`; do \
+		rm -f $$file; \
+	done
+	for file in `find css/smoothness/ -name '*.min.css'`; do \
+		rm -f $$file; \
+	done
 	dh_auto_clean
 
 get-orig-source:

-- 
jqueryui



More information about the Pkg-javascript-commits mailing list