]> git.pld-linux.org Git - packages/clickheat.git/commitdiff
- up to 1.12, somewhat more packaging
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 19 Apr 2011 21:40:21 +0000 (21:40 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apache.conf -> 1.2
    clickheat.spec -> 1.2
    lighttpd.conf -> 1.2
    paths.patch -> 1.1

apache.conf
clickheat.spec
lighttpd.conf
paths.patch [new file with mode: 0644]

index 12e3d251e738f79b9d681923d34950634e9c5415..c623a56e3492197a1c63aa4e249407b576219573 100644 (file)
@@ -2,3 +2,6 @@ Alias /clickheat /usr/share/clickheat
 <Directory /usr/share/clickheat>
        Allow from all
 </Directory>
+<Directory /usr/share/clickheat/config>
+       Deny from all
+</Directory>
index a39c333924e20d8fb8fbd05c04965448b81f1dd7..cdb98fc3ad9fe60882a92ef57932c5b8641bcb89 100644 (file)
@@ -1,28 +1,28 @@
 # TODO
 # - frontend package
 # - admin package
+%define                php_min_version 5.0.0
+%include       /usr/lib/rpm/macros.php
 Summary:       ClickHeat | Clicks heatmap
 Name:          clickheat
-Version:       1.11
-Release:       0.1
+Version:       1.12
+Release:       0.4
 License:       GPL v2
 Group:         Applications/WWW
 Source0:       http://downloads.sourceforge.net/clickheat/%{name}-%{version}.zip
-# Source0-md5: 0ad7c917045772ebcc004027b4858098
+# Source0-md5: 5a4a057a55c904782facad0add684e69
 Source1:       apache.conf
 Source2:       lighttpd.conf
+Patch0:                paths.patch
 URL:           http://www.labsmedia.com/clickheat/
+BuildRequires: rpm-php-pearprov >= 4.4.2-11
 BuildRequires: rpmbuild(macros) >= 1.268
-Requires:      webapps
-# see packages/webapps/webapps.README for description and complete listing
+Requires:      php-common >= 4:%{php_min_version}
 Requires:      php-gd
+Requires:      webapps
 Requires:      webserver(access)
 Requires:      webserver(alias)
-#Requires:     webserver(auth)
-#Requires:     webserver(cgi)
-#Requires:     webserver(indexfile)
 Requires:      webserver(php)
-#Requires:     webserver(setenv)
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -31,24 +31,47 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define                _sysconfdir     %{_webapps}/%{_webapp}
 %define                _appdir         %{_datadir}/%{_webapp}
 
+# bad depsolver
+%define                _noautopear     pear
+
+# exclude optional php dependencies
+%define                _noautophp      php-mysql
+
+# put it together for rpmbuild
+%define                _noautoreq      %{?_noautophp} %{?_noautopear}
+
 %description
 ClickHeat is a visual heatmap of clicks on a HTML page, showing hot
 and cold click zones.
 
 %prep
-%setup -qn %{name}
+%setup -qc
+mv %{name}/* .
+%patch0 -p1
+
+# to satisfy deps
+%{__sed} -i -e '1s,#!/usr/bin/php5-cgi -q,#!/usr/bin/php,' scripts/compressJs.php
 
 # simplify packaging
 install -d doc
 mv INSTALL LICENSE LISEZMOI README VERSION doc
 
+%{__rm} {cache,config,logs}/.htaccess
+rmdir cache config logs
+
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},/var/{cache,log}/%{name}}
 
 cp -a . $RPM_BUILD_ROOT%{_appdir}
-rm -rf $RPM_BUILD_ROOT%{_appdir}/doc
+ln -s %{_sysconfdir} $RPM_BUILD_ROOT%{_appdir}/config
+rm -rf $RPM_BUILD_ROOT%{_appdir}/{doc,examples}
+
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+
 rm $RPM_BUILD_ROOT%{_appdir}/js/clickheat-original.js
+rm $RPM_BUILD_ROOT%{_appdir}/scripts/compressJs.php
 
 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
@@ -78,9 +101,12 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc doc/*
-%dir %attr(750,root,http) %{_sysconfdir}
+%dir %attr(770,root,http) %{_sysconfdir}
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
-%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.php
+#%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.php
 %{_appdir}
+%{_examplesdir}/%{name}-%{version}
+%dir %attr(775,root,http) /var/cache/%{name}
+%dir %attr(775,root,http) /var/log/%{name}
index 926eaa80dfe5c261cf41202ea069615621d3d863..26607c82d97527bded5f2bbc678a1e38f24ed80f 100644 (file)
@@ -1,3 +1,7 @@
 alias.url += (
     "/clickheat" => "/usr/share/clickheat",
 )
+
+$HTTP["url"] =~ "/clickheat/config/" {
+    url.access-deny = ("")
+}
diff --git a/paths.patch b/paths.patch
new file mode 100644 (file)
index 0000000..2306594
--- /dev/null
@@ -0,0 +1,13 @@
+--- clickheat/config.php~      2011-03-08 13:51:16.000000000 +0200
++++ clickheat/config.php       2011-04-20 00:11:50.864847825 +0300
+@@ -77,8 +77,8 @@
+       $basePath = preg_replace('~[\\\\/]+~', '/', dirname(__FILE__));
+ }
+ $clickheatDefault = array(
+-'logPath'             => $basePath.'/logs/',
+-'cachePath'           => $basePath.'/cache/',
++'logPath'             => '/var/log/clickheat',
++'cachePath'           => '/var/cache/clickheat',
+ 'referers'            => false,
+ 'groups'              => false,
+ 'filesize'            => 0,
This page took 0.093699 seconds and 4 git commands to generate.