4 %define php_min_version 5.0.0
5 %include /usr/lib/rpm/macros.php
6 Summary: ClickHeat | Clicks heatmap
11 Group: Applications/WWW
12 Source0: http://downloads.sourceforge.net/clickheat/%{name}-%{version}.zip
13 # Source0-md5: 5a4a057a55c904782facad0add684e69
15 Source2: lighttpd.conf
17 URL: http://www.labsmedia.com/clickheat/
18 BuildRequires: rpm-php-pearprov >= 4.4.2-11
19 BuildRequires: rpmbuild(macros) >= 1.268
20 Requires: php-common >= 4:%{php_min_version}
23 Requires: webserver(access)
24 Requires: webserver(alias)
25 Requires: webserver(php)
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 %define _webapps /etc/webapps
30 %define _webapp %{name}
31 %define _sysconfdir %{_webapps}/%{_webapp}
32 %define _appdir %{_datadir}/%{_webapp}
35 %define _noautopear pear
37 # exclude optional php dependencies
38 %define _noautophp php-mysql
40 # put it together for rpmbuild
41 %define _noautoreq %{?_noautophp} %{?_noautopear}
44 ClickHeat is a visual heatmap of clicks on a HTML page, showing hot
53 %{__sed} -i -e '1s,#!/usr/bin/php5-cgi -q,#!/usr/bin/php,' scripts/compressJs.php
57 mv INSTALL LICENSE LISEZMOI README VERSION doc
59 %{__rm} {cache,config,logs}/.htaccess
60 rmdir cache config logs
63 rm -rf $RPM_BUILD_ROOT
64 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},/var/{cache,log}/%{name}}
66 cp -a . $RPM_BUILD_ROOT%{_appdir}
67 ln -s %{_sysconfdir} $RPM_BUILD_ROOT%{_appdir}/config
68 rm -rf $RPM_BUILD_ROOT%{_appdir}/{doc,examples}
70 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
71 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
73 rm $RPM_BUILD_ROOT%{_appdir}/js/clickheat-original.js
74 rm $RPM_BUILD_ROOT%{_appdir}/scripts/compressJs.php
76 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
77 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
78 cp -a $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf
80 %triggerin -- apache1 < 1.3.37-3, apache1-base
81 %webapp_register apache %{_webapp}
83 %triggerun -- apache1 < 1.3.37-3, apache1-base
84 %webapp_unregister apache %{_webapp}
86 %triggerin -- apache < 2.2.0, apache-base
87 %webapp_register httpd %{_webapp}
89 %triggerun -- apache < 2.2.0, apache-base
90 %webapp_unregister httpd %{_webapp}
92 %triggerin -- lighttpd
93 %webapp_register lighttpd %{_webapp}
95 %triggerun -- lighttpd
96 %webapp_unregister lighttpd %{_webapp}
99 rm -rf $RPM_BUILD_ROOT
102 %defattr(644,root,root,755)
104 %dir %attr(770,root,http) %{_sysconfdir}
105 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
106 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
107 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
108 #%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.php
110 %{_examplesdir}/%{name}-%{version}
111 %dir %attr(775,root,http) /var/cache/%{name}
112 %dir %attr(775,root,http) /var/log/%{name}