Author: glen                         Date: Thu Mar 12 01:53:39 2009 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- compress the .js

---- Files affected:
SPECS:
   dokuwiki-plugin-lightbox.spec (1.4 -> 1.5) 

---- Diffs:

================================================================
Index: SPECS/dokuwiki-plugin-lightbox.spec
diff -u SPECS/dokuwiki-plugin-lightbox.spec:1.4 
SPECS/dokuwiki-plugin-lightbox.spec:1.5
--- SPECS/dokuwiki-plugin-lightbox.spec:1.4     Thu Mar 12 02:04:27 2009
+++ SPECS/dokuwiki-plugin-lightbox.spec Thu Mar 12 02:53:33 2009
@@ -4,14 +4,17 @@
 Summary(pl.UTF-8):     Wtyczka lightboxv2 dla DokuWiki
 Name:          dokuwiki-plugin-%{plugin}
 Version:       20080808
-Release:       2
+Release:       2.5
 License:       GPL v2
 Group:         Applications/WWW
 Source0:       
http://www.lokeshdhakar.com/projects/lightbox2/releases/lightbox2.04.zip
 # Source0-md5: c930f97a5791f202d7c48303de36f282
 Patch0:                %{name}.patch
+Patch1:                %{name}-dw-jscompress.patch
 URL:           http://wiki.splitbrain.org/plugin:lightboxv2
+BuildRequires: js
 BuildRequires: sharutils
+BuildRequires: shrinksafe
 Requires:      dokuwiki >= 20061106
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -32,6 +35,7 @@
        cat js/lightbox.js
 ) > script.js
 %patch0 -p1
+%patch1 -p1
 uudecode blank.gif.uue
 
 rm -f images/bullet.gif
@@ -40,6 +44,19 @@
 rm -f images/image-1.jpg
 rm -f images/thumb-1.jpg
 
+%build
+js_compress() {
+       for a in "$@"; do
+               # compress
+               shrinksafe -c script.js > $a.tmp && mv $a.tmp script.js
+               # trim newlines
+               tr -d '\r\n' < script.js > $a.tmp && mv $a.tmp script.js
+               # check syntax
+               js -C -f script.js
+       done
+}
+#js_compress script.js
+
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{plugindir}
@@ -68,6 +85,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.5  2009/03/12 01:53:33  glen
+- compress the .js
+
 Revision 1.4  2009/03/12 01:04:27  glen
 - konqueror support
 - scriptaculous.js (.js loader) not needed if scripts are already concat
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/dokuwiki-plugin-lightbox.spec?r1=1.4&r2=1.5&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to