]> git.pld-linux.org Git - SPECS.git/blob - piwik.spec
SPECS updated Sun 1 Aug 20:28:02 CEST 2021
[SPECS.git] / piwik.spec
1 %define         php_min_version 5.1.3
2 Summary:        Open source web analytics
3 Name:           piwik
4 Version:        1.6
5 Release:        0.1
6 License:        GPL v3 and other OSS licenses
7 Group:          Applications/WWW
8 Source0:        http://piwik.org/latest.zip
9 # Source0-md5:  04c5dc7f595adce4d68be9f94bbb140c
10 Source1:        apache.conf
11 Source2:        lighttpd.conf
12 URL:            http://www.piwik.org
13 BuildRequires:  rpmbuild(macros) >= 1.268
14 Requires:       php-common >= 4:%{php_min_version}
15 Requires:       php-pdo-mysql
16 Requires:       webapps
17 Requires:       webserver(access)
18 Requires:       webserver(alias)
19 Requires:       webserver(php)
20 Suggests:       php-gd
21 BuildArch:      noarch
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %define         _webapps        /etc/webapps
25 %define         _webapp         %{name}
26 %define         _sysconfdir     %{_webapps}/%{_webapp}
27 %define         _appdir         %{_datadir}/%{_webapp}
28
29 # bad depsolver
30 %define         _noautopear     pear
31 # exclude optional php dependencies
32 %define         _noautophp      php-curl
33 # put it together for rpmbuild
34 %define         _noautoreq      %{?_noautophp} %{?_noautopear}
35
36 %description
37 Piwik is a downloadable, open source (GPL licensed) real time web
38 analytics software program. It provides you with detailed reports on
39 your website visitors: the search engines and keywords they used, the
40 language they speak, your popular pages... and so much more.
41
42 Piwik aims to be an open source alternative to Google Analytics, and
43 is already used on more than 200,000 websites.
44
45 %prep
46 %setup -qc
47
48 # relocate for simplier install and doc section
49 mv %{name}/{config,misc} .
50 mv %{name}/{LEGALNOTICE,README} .
51
52 # common license
53 rm misc/gpl-3.0.txt
54
55 %install
56 rm -rf $RPM_BUILD_ROOT
57 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
58 cp -a %{name}/* $RPM_BUILD_ROOT%{_appdir}
59
60 cp -a config/* $RPM_BUILD_ROOT%{_sysconfdir}
61 ln -s %{_sysconfdir} $RPM_BUILD_ROOT%{_appdir}/config
62
63 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
64 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
65 cp -p $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf
66
67 %triggerin -- apache1 < 1.3.37-3, apache1-base
68 %webapp_register apache %{_webapp}
69
70 %triggerun -- apache1 < 1.3.37-3, apache1-base
71 %webapp_unregister apache %{_webapp}
72
73 %triggerin -- apache < 2.2.0, apache-base
74 %webapp_register httpd %{_webapp}
75
76 %triggerun -- apache < 2.2.0, apache-base
77 %webapp_unregister httpd %{_webapp}
78
79 %triggerin -- lighttpd
80 %webapp_register lighttpd %{_webapp}
81
82 %triggerun -- lighttpd
83 %webapp_unregister lighttpd %{_webapp}
84
85 %clean
86 rm -rf $RPM_BUILD_ROOT
87
88 %files
89 %defattr(644,root,root,755)
90 %doc LEGALNOTICE README misc
91 %dir %attr(750,root,http) %{_sysconfdir}
92 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
93 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
94 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
95 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.php
96 %{_appdir}
This page took 0.217417 seconds and 3 git commands to generate.