packages: clickheat/clickheat.spec, clickheat/js-scoping.patch (NEW) - repa...

glen glen at pld-linux.org
Wed Apr 20 07:22:00 CEST 2011


Author: glen                         Date: Wed Apr 20 05:22:00 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- repack js with better compression due local scoping

---- Files affected:
packages/clickheat:
   clickheat.spec (1.4 -> 1.5) , js-scoping.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/clickheat/clickheat.spec
diff -u packages/clickheat/clickheat.spec:1.4 packages/clickheat/clickheat.spec:1.5
--- packages/clickheat/clickheat.spec:1.4	Wed Apr 20 00:06:52 2011
+++ packages/clickheat/clickheat.spec	Wed Apr 20 07:21:55 2011
@@ -7,7 +7,7 @@
 Summary:	ClickHeat | Clicks heatmap
 Name:		clickheat
 Version:	1.12
-Release:	0.10
+Release:	0.11
 License:	GPL v2
 Group:		Applications/WWW
 Source0:	http://downloads.sourceforge.net/clickheat/%{name}-%{version}.zip
@@ -17,9 +17,12 @@
 Source3:	config.php
 Patch0:		paths.patch
 Patch1:		languages.patch
+Patch2:		js-scoping.patch
 URL:		http://www.labsmedia.com/clickheat/
+BuildRequires:	js
 BuildRequires:	rpm-php-pearprov >= 4.4.2-11
 BuildRequires:	rpmbuild(macros) >= 1.268
+BuildRequires:	yuicompressor
 Requires:	php-common >= 4:%{php_min_version}
 Requires:	php-gd
 Requires:	webapps
@@ -52,6 +55,7 @@
 mv %{name}/* .
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 # to satisfy deps
 %{__sed} -i -e '1s,#!/usr/bin/php5-cgi -q,#!/usr/bin/php,' scripts/compressJs.php
@@ -64,6 +68,11 @@
 %{__rm} {cache,config,logs}/.htaccess
 rmdir cache config logs
 
+%build
+# compress .js
+yuicompressor --charset UTF-8 js/clickheat-original.js -o js/clickheat.js
+js -C -f js/clickheat.js
+
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},/var/{cache,log}/%{name}}
@@ -145,6 +154,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.5  2011/04/20 05:21:55  glen
+- repack js with better compression due local scoping
+
 Revision 1.4  2011/04/19 22:06:52  glen
 - do not package scripts/, keep in doc
 

================================================================
Index: packages/clickheat/js-scoping.patch
diff -u /dev/null packages/clickheat/js-scoping.patch:1.1
--- /dev/null	Wed Apr 20 07:22:00 2011
+++ packages/clickheat/js-scoping.patch	Wed Apr 20 07:21:55 2011
@@ -0,0 +1,73 @@
+--- clickheat-1.12/scripts/compressJs.php~	2011-04-20 01:05:58.000000000 +0300
++++ clickheat-1.12/scripts/compressJs.php	2011-04-20 08:16:47.199246746 +0300
+@@ -13,5 +13,4 @@
+ }
+ Syntax_Compressor::js($str);
+ 
+-file_put_contents(dirname(__FILE__).'/../js/clickheat.js', '/** Code by www.labsmedia.com */'.$str);
+-?>
++file_put_contents(dirname(__FILE__).'/../js/clickheat.js', $str);
+--- clickheat-1.12/js/clickheat-original.js~	2011-04-20 08:16:19.000000000 +0300
++++ clickheat-1.12/js/clickheat-original.js	2011-04-20 08:16:22.158204062 +0300
+@@ -17,9 +17,26 @@
+ Windows 2000 - IE 6.0
+ Linux - Firefox 2.0.0.1, Konqueror 3.5.5, IE 7
+ */
++/*! Code by www.labsmedia.com */
+ 
+ /*global window: true*/
+ 
++(function() {
++
++/* Main variables */
++var 
++clickHeatGroup = '',
++clickHeatSite = '',
++clickHeatServer = '',
++clickHeatLastIframe = -1,
++clickHeatTime = 0,
++clickHeatQuota = -1,
++clickHeatBrowser = '',
++clickHeatDocument = '',
++clickHeatWait = 500,
++clickHeatLocalWait = 0,
++clickHeatDebug = (document.location.href.indexOf('debugclickheat') !== -1);
++
+ /* Event listener */
+ function addEvtListener(obj, evtName, f)
+ {
+@@ -49,22 +66,9 @@
+ 	}
+ }
+ 
+-/* Main variables */
+-var clickHeatGroup = '',
+-clickHeatSite = '',
+-clickHeatServer = '',
+-clickHeatLastIframe = -1,
+-clickHeatTime = 0,
+-clickHeatQuota = -1,
+-clickHeatBrowser = '',
+-clickHeatDocument = '',
+-clickHeatWait = 500,
+-clickHeatLocalWait = 0,
+-clickHeatDebug = (document.location.href.indexOf('debugclickheat') !== -1);
+-
+ /**
+-* Shows a debug string
+-**/
++ * Shows a debug string
++ */
+ function showClickHeatDebug(str)
+ {
+ 	if (clickHeatDebug === true)
+@@ -313,4 +313,7 @@
+ 		}
+ 	}
+ 	showClickHeatDebug('ClickHeat initialised with:<br/>site = ' + clickHeatSite + '<br/>group = ' + clickHeatGroup + '<br/>server = ' + clickHeatServer + '<br/>quota = ' + (clickHeatQuota === -1 ? 'unlimited' : clickHeatQuota) + '<br/>browser = ' + clickHeatBrowser + '<br/><br/><strong>Click in a blank area (not on a link) to test ClickHeat</strong>');
+-}
+\ No newline at end of file
++}
++
++// end local scope
++})();
================================================================

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



More information about the pld-cvs-commit mailing list