packages: trac-plugin-stractistics/trac-plugin-stractistics.spec, trac-plug...

glen glen at pld-linux.org
Fri Jan 27 00:14:12 CET 2012


Author: glen                         Date: Thu Jan 26 23:14:12 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- fix loading web resources

---- Files affected:
packages/trac-plugin-stractistics:
   trac-plugin-stractistics.spec (1.1 -> 1.2) , web_path.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/trac-plugin-stractistics/trac-plugin-stractistics.spec
diff -u packages/trac-plugin-stractistics/trac-plugin-stractistics.spec:1.1 packages/trac-plugin-stractistics/trac-plugin-stractistics.spec:1.2
--- packages/trac-plugin-stractistics/trac-plugin-stractistics.spec:1.1	Thu Jan 26 23:29:36 2012
+++ packages/trac-plugin-stractistics/trac-plugin-stractistics.spec	Fri Jan 27 00:14:06 2012
@@ -9,15 +9,20 @@
 Group:		Applications/WWW
 Source0:	http://trac-hacks.org/changeset/latest/stractisticsplugin?old_path=/&format=zip#/%{plugin}-%{version}.zip
 # Source0-md5:	46d88e22c664cbf57e625319dc705421
+Patch0:		web_path.patch
 URL:		http://trac-hacks.org/wiki/StractisticsPlugin
 BuildRequires:	python-devel
 BuildRequires:	rpmbuild(macros) >= 1.553
 Requires:	python-modules
 Requires:	python-simplejson
 Requires:	trac >= %{trac_ver}
+# for htdocs alias, can be removed in 0.13
+Requires:	trac >= 0.12.2-4
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define		trac_htdocs	/usr/share/trac/htdocs
+
 %description
 Stractistics is a plugin designed to estimate recent project activity
 by providing repository, ticket and wiki statistics.
@@ -25,7 +30,8 @@
 %prep
 %setup -qc
 mv %{plugin}plugin/trunk/* .
-%undos README.txt
+%undos README.txt stractistics/*.py
+%patch0 -p1
 
 %build
 %{__python} setup.py build
@@ -41,6 +47,10 @@
 	--optimize 2 \
 	--root=$RPM_BUILD_ROOT
 
+# mv htdocs
+install -d $RPM_BUILD_ROOT%{trac_htdocs}
+mv $RPM_BUILD_ROOT{%{py_sitescriptdir}/%{plugin}/htdocs,%{trac_htdocs}/%{plugin}}
+
 %py_postclean
 
 %clean
@@ -54,6 +64,7 @@
 %doc README.txt
 %{py_sitescriptdir}/%{plugin}
 %{py_sitescriptdir}/STractistics-%{version}-py*.egg-info
+%{trac_htdocs}/%{plugin}
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -61,5 +72,8 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.2  2012/01/26 23:14:06  glen
+- fix loading web resources
+
 Revision 1.1  2012/01/26 22:29:36  glen
 - new

================================================================
Index: packages/trac-plugin-stractistics/web_path.patch
diff -u /dev/null packages/trac-plugin-stractistics/web_path.patch:1.1
--- /dev/null	Fri Jan 27 00:14:12 2012
+++ packages/trac-plugin-stractistics/web_path.patch	Fri Jan 27 00:14:06 2012
@@ -0,0 +1,40 @@
+--- trac-plugin-stractistics-0.5.0b/./stractistics/web_ui.py~	2011-01-11 00:28:06.000000000 +0200
++++ trac-plugin-stractistics-0.5.0b/./stractistics/web_ui.py	2012-01-27 01:07:33.487229561 +0200
+@@ -90,16 +90,16 @@
+ 
+     def process_request(self, req):
+         req.perm.assert_permission('STRACTISTICS_VIEW')
+-        add_stylesheet(req, 'hw/css/stractistics.css')
+-        add_script(req, 'hw/javascript/swfobject.js')
+-        add_script(req, 'hw/javascript/prototype.js')
+-        add_script(req, 'hw/javascript/js-ofc-library/ofc.js')
+-        add_script(req, 'hw/javascript/js-ofc-library/data.js')
+-        add_script(req, 'hw/javascript/js-ofc-library/charts/area.js')
+-        add_script(req, 'hw/javascript/js-ofc-library/charts/bar.js')
+-        add_script(req, 'hw/javascript/js-ofc-library/charts/line.js')
+-        add_script(req, 'hw/javascript/js-ofc-library/charts/pie.js')
+-        add_script(req, 'hw/javascript/chart_reports.js')
++        add_stylesheet(req, 'stractistics/css/stractistics.css')
++        add_script(req, 'stractistics/javascript/swfobject.js')
++        add_script(req, 'stractistics/javascript/prototype.js')
++        add_script(req, 'stractistics/javascript/js-ofc-library/ofc.js')
++        add_script(req, 'stractistics/javascript/js-ofc-library/data.js')
++        add_script(req, 'stractistics/javascript/js-ofc-library/charts/area.js')
++        add_script(req, 'stractistics/javascript/js-ofc-library/charts/bar.js')
++        add_script(req, 'stractistics/javascript/js-ofc-library/charts/line.js')
++        add_script(req, 'stractistics/javascript/js-ofc-library/charts/pie.js')
++        add_script(req, 'stractistics/javascript/chart_reports.js')
+ 
+         add_ctxtnav(req, 'Project Reports', req.href.stractistics("/project_reports"))
+         add_ctxtnav(req, 'User Reports', req.href.stractistics("/user_reports"))
+--- trac-plugin-stractistics-0.5.0b/stractistics/./util.py~	2011-01-10 23:32:24.000000000 +0200
++++ trac-plugin-stractistics-0.5.0b/stractistics/./util.py	2012-01-27 01:11:55.732494931 +0200
+@@ -217,7 +217,7 @@
+         self.name = name
+         self.columns = []
+         self.results = []
+-        self.path = "".join([path, '/hw/swf/'])
++        self.path = "".join([path, '/stractistics/swf/'])
+         self.chart_info = ChartInfo(name, self.path)
+         
+     def set_name(self,name):
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/trac-plugin-stractistics/trac-plugin-stractistics.spec?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list