]> git.pld-linux.org Git - packages/clickheat.git/blob - clickheat.spec
cdb98fc3ad9fe60882a92ef57932c5b8641bcb89
[packages/clickheat.git] / clickheat.spec
1 # TODO
2 # - frontend package
3 # - admin package
4 %define         php_min_version 5.0.0
5 %include        /usr/lib/rpm/macros.php
6 Summary:        ClickHeat | Clicks heatmap
7 Name:           clickheat
8 Version:        1.12
9 Release:        0.4
10 License:        GPL v2
11 Group:          Applications/WWW
12 Source0:        http://downloads.sourceforge.net/clickheat/%{name}-%{version}.zip
13 # Source0-md5:  5a4a057a55c904782facad0add684e69
14 Source1:        apache.conf
15 Source2:        lighttpd.conf
16 Patch0:         paths.patch
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}
21 Requires:       php-gd
22 Requires:       webapps
23 Requires:       webserver(access)
24 Requires:       webserver(alias)
25 Requires:       webserver(php)
26 BuildArch:      noarch
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %define         _webapps        /etc/webapps
30 %define         _webapp         %{name}
31 %define         _sysconfdir     %{_webapps}/%{_webapp}
32 %define         _appdir         %{_datadir}/%{_webapp}
33
34 # bad depsolver
35 %define         _noautopear     pear
36
37 # exclude optional php dependencies
38 %define         _noautophp      php-mysql
39
40 # put it together for rpmbuild
41 %define         _noautoreq      %{?_noautophp} %{?_noautopear}
42
43 %description
44 ClickHeat is a visual heatmap of clicks on a HTML page, showing hot
45 and cold click zones.
46
47 %prep
48 %setup -qc
49 mv %{name}/* .
50 %patch0 -p1
51
52 # to satisfy deps
53 %{__sed} -i -e '1s,#!/usr/bin/php5-cgi -q,#!/usr/bin/php,' scripts/compressJs.php
54
55 # simplify packaging
56 install -d doc
57 mv INSTALL LICENSE LISEZMOI README VERSION doc
58
59 %{__rm} {cache,config,logs}/.htaccess
60 rmdir cache config logs
61
62 %install
63 rm -rf $RPM_BUILD_ROOT
64 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},/var/{cache,log}/%{name}}
65
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}
69
70 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
71 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
72
73 rm $RPM_BUILD_ROOT%{_appdir}/js/clickheat-original.js
74 rm $RPM_BUILD_ROOT%{_appdir}/scripts/compressJs.php
75
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
79
80 %triggerin -- apache1 < 1.3.37-3, apache1-base
81 %webapp_register apache %{_webapp}
82
83 %triggerun -- apache1 < 1.3.37-3, apache1-base
84 %webapp_unregister apache %{_webapp}
85
86 %triggerin -- apache < 2.2.0, apache-base
87 %webapp_register httpd %{_webapp}
88
89 %triggerun -- apache < 2.2.0, apache-base
90 %webapp_unregister httpd %{_webapp}
91
92 %triggerin -- lighttpd
93 %webapp_register lighttpd %{_webapp}
94
95 %triggerun -- lighttpd
96 %webapp_unregister lighttpd %{_webapp}
97
98 %clean
99 rm -rf $RPM_BUILD_ROOT
100
101 %files
102 %defattr(644,root,root,755)
103 %doc doc/*
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
109 %{_appdir}
110 %{_examplesdir}/%{name}-%{version}
111 %dir %attr(775,root,http) /var/cache/%{name}
112 %dir %attr(775,root,http) /var/log/%{name}
This page took 0.073202 seconds and 2 git commands to generate.