]>
Commit | Line | Data |
---|---|---|
98f12a87 | 1 | # TODO: |
413f3657 | 2 | # - think about some trigger to upgrade from 6.5-1 and older |
d5d8586d | 3 | # (I suggest just to forget about those broken version, |
4 | # unfortunately they have already landed in Ac) | |
413f3657 | 5 | # - apache1 config |
b65498ff | 6 | # - security CVE-2006-1945, CVE-2006-2237: http://security.gentoo.org/glsa/glsa-200606-06.xml |
0216b680 | 7 | %include /usr/lib/rpm/macros.perl |
77af5809 | 8 | Summary: Advanced Web Statistics is a free powerful server log file analyzer |
b09e5a9d | 9 | Summary(pl.UTF-8): Zaawansowany program do analizowania logów serwera |
41124ea0 | 10 | Name: awstats |
c4acedbd | 11 | Version: 7.7 |
6bdfa708 PS |
12 | Release: 1 |
13 | License: GPL v3+ | |
3764641a | 14 | Group: Applications/Networking |
3a0a0332 | 15 | Source0: http://awstats.sourceforge.net/files/%{name}-%{version}.tar.gz |
c4acedbd | 16 | # Source0-md5: a69ee5127fcf38b12d47856fab3d57e4 |
98f12a87 JK |
17 | Source1: %{name}.crontab |
18 | Source2: %{name}-httpd.conf | |
19 | Source3: %{name}.conf | |
28e1e8f2 | 20 | Source4: %{name}-lighttpd.conf |
41124ea0 | 21 | Patch0: %{name}_conf.patch |
98f12a87 | 22 | Patch1: %{name}-created_dir_mode.patch |
c3a188e3 | 23 | Patch2: %{name}-PLD.patch |
3764641a | 24 | URL: http://awstats.sourceforge.net/ |
0216b680 | 25 | BuildRequires: rpm-perlprov |
656a81dd | 26 | BuildRequires: rpmbuild(macros) >= 1.264 |
7fbdb4cc | 27 | Requires(triggerpostun): sed >= 4.0 |
9fe6c0fa | 28 | Requires: perl-Geo-IP |
41124ea0 | 29 | Requires: perl-Storable |
264b38ac | 30 | Requires: perl-Time-HiRes |
656a81dd | 31 | Requires: webapps |
7b692be8 | 32 | Suggests: crondaemon |
4a9b8f2a | 33 | Conflicts: apache-base < 2.4.0-1 |
41124ea0 | 34 | BuildArch: noarch |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
36 | ||
656a81dd ER |
37 | %define _webapps /etc/webapps |
38 | %define _webapp %{name} | |
39 | %define _sysconfdir %{_webapps}/%{_webapp} | |
40 | ||
41124ea0 | 41 | %description |
42 | Advanced Web Statistics is a powerful and featureful tool that | |
43 | generates advanced web server graphic statistics. This server log | |
44 | analyzer works from command line or as a CGI and shows you all | |
45 | information your log contains, in graphical web pages. It can analyze | |
46 | a lot of web/wap/proxy servers like Apache, IIS, Weblogic, Webstar, | |
66eba1f6 | 47 | Squid, ... but also mail or FTP servers. |
41124ea0 | 48 | |
49 | This program can measure visits, unique vistors, authenticated users, | |
50 | pages, domains/countries, OS busiest times, robot visits, type of | |
51 | files, search engines/keywords used, visits duration, HTTP errors and | |
52 | more... Statistics can be updated from a browser or your scheduler. | |
53 | The program also supports virtual servers, plugins and a lot of | |
54 | features. | |
55 | ||
e418261b | 56 | %description -l pl.UTF-8 |
77af5809 | 57 | awstats (Advanced Web Statistics - zaawansowane statystyki WWW) to |
e418261b JR |
58 | potężne i bogate w możliwości narzędzie generujące zaawansowane |
59 | graficzne statystyki serwera WWW. Ten analizator logów serwera działa | |
60 | z linii poleceń lub jako CGI i pokazuje wszystkie informacje zawarte w | |
61 | logu w postaci graficznych stron WWW. Może analizować logi wielu | |
62 | serwerów WWW/WAP/proxy, takich jak Apache, IIS, Weblogic, Webstar, | |
63 | Squid... ale także serwerów pocztowych lub FTP. | |
77af5809 | 64 | |
e418261b JR |
65 | Ten program może mierzyć odwiedziny, odwiedzających, uwierzytelnionych |
66 | użytkowników, strony, domeny/kraje, najbardziej zajęte godziny, | |
67 | odwiedziny robotów, rodzaje plików, używane wyszukiwarki i słowa | |
68 | kluczowe, czasy trwania odwiedzin, błędy HTTP... a nawet więcej. | |
69 | Statystyki mogą być uaktualniane z przeglądarki lub schedulera. | |
70 | Program obsługuje także serwery wirtualne, wtyczki i wiele innych | |
77af5809 JB |
71 | rzeczy. |
72 | ||
41124ea0 | 73 | %prep |
74 | %setup -q | |
98f12a87 JK |
75 | %patch0 -p1 |
76 | %patch1 -p1 | |
c3a188e3 | 77 | %patch2 -p1 |
993bf034 | 78 | find . '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f |
41124ea0 | 79 | |
80 | %install | |
81 | rm -rf $RPM_BUILD_ROOT | |
656a81dd | 82 | install -d $RPM_BUILD_ROOT{/etc/cron.d,%{_sysconfdir},%{_bindir}} \ |
98f12a87 JK |
83 | $RPM_BUILD_ROOT{%{_datadir}/awstats,/var/lib/awstats} |
84 | ||
7b692be8 ER |
85 | install -p tools/awstats_* $RPM_BUILD_ROOT%{_bindir} |
86 | install -p tools/{logresolvemerge,maillogconvert,urlaliasbuilder}.pl $RPM_BUILD_ROOT%{_bindir} | |
98f12a87 | 87 | cp -r wwwroot $RPM_BUILD_ROOT%{_datadir}/awstats |
656a81dd | 88 | mv $RPM_BUILD_ROOT%{_datadir}/awstats/wwwroot/cgi-bin/awstats.model.conf $RPM_BUILD_ROOT%{_sysconfdir} |
98f12a87 | 89 | mv $RPM_BUILD_ROOT%{_datadir}/awstats/wwwroot/cgi-bin/{lang,lib,plugins} $RPM_BUILD_ROOT%{_datadir}/%{name} |
7b692be8 ER |
90 | cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/awstats |
91 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf | |
92 | cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf | |
93 | cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf | |
98f12a87 JK |
94 | ln -s %{_datadir}/awstats/wwwroot/cgi-bin/awstats.pl $RPM_BUILD_ROOT%{_bindir} |
95 | ||
7fbdb4cc ER |
96 | %clean |
97 | rm -rf $RPM_BUILD_ROOT | |
98 | ||
96382267 | 99 | %triggerin -- apache-base |
656a81dd | 100 | %webapp_register httpd %{_webapp} |
7fbdb4cc | 101 | |
96382267 | 102 | %triggerun -- apache-base |
656a81dd | 103 | %webapp_unregister httpd %{_webapp} |
7fbdb4cc | 104 | |
29c5f9af ER |
105 | %triggerin -- lighttpd |
106 | %webapp_register lighttpd %{_webapp} | |
107 | ||
108 | %triggerun -- lighttpd | |
109 | %webapp_unregister lighttpd %{_webapp} | |
110 | ||
656a81dd ER |
111 | %triggerpostun -- %{name} < 6.5-2.1 |
112 | # rescue app configs. | |
113 | for i in awstats.conf awstats.model.conf; do | |
114 | if [ -f /etc/%{name}/$i.rpmsave ]; then | |
115 | mv -f %{_sysconfdir}/$i{,.rpmnew} | |
116 | mv -f /etc/%{name}/$i.rpmsave %{_sysconfdir}/$i | |
98f12a87 | 117 | fi |
656a81dd | 118 | done |
7fbdb4cc | 119 | |
656a81dd ER |
120 | # nuke very-old config location (this mostly for Ra) |
121 | if [ -f /etc/httpd/httpd.conf ]; then | |
7fbdb4cc | 122 | sed -i -e "/^Include.*%{name}.conf/d" /etc/httpd/httpd.conf |
98f12a87 | 123 | fi |
41124ea0 | 124 | |
656a81dd ER |
125 | # migrate from httpd (apache2) config dir |
126 | if [ -f /etc/httpd/%{name}.conf.rpmsave ]; then | |
127 | cp -f %{_sysconfdir}/httpd.conf{,.rpmnew} | |
128 | mv -f /etc/httpd/%{name}.conf.rpmsave %{_sysconfdir}/httpd.conf | |
129 | fi | |
130 | ||
131 | # migrate from apache-config macros | |
132 | if [ -f /etc/%{name}/apache.conf.rpmsave ]; then | |
133 | if [ -d /etc/httpd/webapps.d ]; then | |
134 | cp -f %{_sysconfdir}/httpd.conf{,.rpmnew} | |
135 | cp -f /etc/%{name}/apache.conf.rpmsave %{_sysconfdir}/httpd.conf | |
98f12a87 | 136 | fi |
656a81dd ER |
137 | rm -f /etc/%{name}/apache.conf.rpmsave |
138 | fi | |
139 | ||
140 | rm -f /etc/httpd/httpd.conf/99_%{name}.conf | |
141 | /usr/sbin/webapp register httpd %{_webapp} | |
33ea26ba | 142 | %service -q httpd reload |
41124ea0 | 143 | |
41124ea0 | 144 | %files |
145 | %defattr(644,root,root,755) | |
6bdfa708 | 146 | %doc README.md docs/* tools/webmin tools/xslt |
656a81dd ER |
147 | %dir %attr(750,root,http) %{_sysconfdir} |
148 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf | |
29c5f9af | 149 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf |
0174ff64 | 150 | %attr(644,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/awstats*.conf |
151 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/awstats | |
656a81dd | 152 | |
3a0a0332 | 153 | %attr(755,root,root) %{_bindir}/*.pl |
98f12a87 JK |
154 | %dir %{_datadir}/%{name} |
155 | %{_datadir}/%{name}/lang | |
156 | %{_datadir}/%{name}/lib | |
157 | %{_datadir}/%{name}/plugins | |
158 | %dir %{_datadir}/%{name}/wwwroot | |
159 | %dir %{_datadir}/%{name}/wwwroot/cgi-bin | |
2a807c7f | 160 | %attr(755,root,root) %{_datadir}/%{name}/wwwroot/cgi-bin/awdownloadcsv.pl |
3a0a0332 | 161 | %attr(755,root,root) %{_datadir}/%{name}/wwwroot/cgi-bin/awredir.pl |
162 | %attr(755,root,root) %{_datadir}/%{name}/wwwroot/cgi-bin/awstats.pl | |
98f12a87 JK |
163 | %{_datadir}/%{name}/wwwroot/classes |
164 | %{_datadir}/%{name}/wwwroot/css | |
165 | %{_datadir}/%{name}/wwwroot/icon | |
166 | %{_datadir}/%{name}/wwwroot/js | |
167 | %attr(775,root,stats) /var/lib/%{name} |