]>
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 |
e418261b | 9 | Summary(pl.UTF-8): Zaawansowany program do analizowania logów serwera |
41124ea0 | 10 | Name: awstats |
3a0a0332 | 11 | Version: 6.6 |
0174ff64 | 12 | Release: 0.4 |
638933b3 | 13 | License: GPL v2 |
3764641a | 14 | Group: Applications/Networking |
3a0a0332 | 15 | Source0: http://awstats.sourceforge.net/files/%{name}-%{version}.tar.gz |
16 | # Source0-md5: 38e393edb530d409fdf7f79127a7548e | |
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 |
41124ea0 | 32 | BuildArch: noarch |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
34 | ||
656a81dd ER |
35 | %define _webapps /etc/webapps |
36 | %define _webapp %{name} | |
37 | %define _sysconfdir %{_webapps}/%{_webapp} | |
38 | ||
41124ea0 | 39 | %description |
40 | Advanced Web Statistics is a powerful and featureful tool that | |
41 | generates advanced web server graphic statistics. This server log | |
42 | analyzer works from command line or as a CGI and shows you all | |
43 | information your log contains, in graphical web pages. It can analyze | |
44 | a lot of web/wap/proxy servers like Apache, IIS, Weblogic, Webstar, | |
66eba1f6 | 45 | Squid, ... but also mail or FTP servers. |
41124ea0 | 46 | |
47 | This program can measure visits, unique vistors, authenticated users, | |
48 | pages, domains/countries, OS busiest times, robot visits, type of | |
49 | files, search engines/keywords used, visits duration, HTTP errors and | |
50 | more... Statistics can be updated from a browser or your scheduler. | |
51 | The program also supports virtual servers, plugins and a lot of | |
52 | features. | |
53 | ||
e418261b | 54 | %description -l pl.UTF-8 |
77af5809 | 55 | awstats (Advanced Web Statistics - zaawansowane statystyki WWW) to |
e418261b JR |
56 | potężne i bogate w możliwości narzędzie generujące zaawansowane |
57 | graficzne statystyki serwera WWW. Ten analizator logów serwera działa | |
58 | z linii poleceń lub jako CGI i pokazuje wszystkie informacje zawarte w | |
59 | logu w postaci graficznych stron WWW. Może analizować logi wielu | |
60 | serwerów WWW/WAP/proxy, takich jak Apache, IIS, Weblogic, Webstar, | |
61 | Squid... ale także serwerów pocztowych lub FTP. | |
77af5809 | 62 | |
e418261b JR |
63 | Ten program może mierzyć odwiedziny, odwiedzających, uwierzytelnionych |
64 | użytkowników, strony, domeny/kraje, najbardziej zajęte godziny, | |
65 | odwiedziny robotów, rodzaje plików, używane wyszukiwarki i słowa | |
66 | kluczowe, czasy trwania odwiedzin, błędy HTTP... a nawet więcej. | |
67 | Statystyki mogą być uaktualniane z przeglądarki lub schedulera. | |
68 | Program obsługuje także serwery wirtualne, wtyczki i wiele innych | |
77af5809 JB |
69 | rzeczy. |
70 | ||
41124ea0 | 71 | %prep |
72 | %setup -q | |
98f12a87 JK |
73 | %patch0 -p1 |
74 | %patch1 -p1 | |
c3a188e3 | 75 | %patch2 -p1 |
41124ea0 | 76 | |
77 | %install | |
78 | rm -rf $RPM_BUILD_ROOT | |
656a81dd | 79 | install -d $RPM_BUILD_ROOT{/etc/cron.d,%{_sysconfdir},%{_bindir}} \ |
98f12a87 JK |
80 | $RPM_BUILD_ROOT{%{_datadir}/awstats,/var/lib/awstats} |
81 | ||
82 | install tools/awstats_* $RPM_BUILD_ROOT%{_bindir} | |
83 | install tools/{logresolvemerge,maillogconvert,urlaliasbuilder}.pl $RPM_BUILD_ROOT%{_bindir} | |
84 | cp -r wwwroot $RPM_BUILD_ROOT%{_datadir}/awstats | |
656a81dd | 85 | mv $RPM_BUILD_ROOT%{_datadir}/awstats/wwwroot/cgi-bin/awstats.model.conf $RPM_BUILD_ROOT%{_sysconfdir} |
98f12a87 JK |
86 | mv $RPM_BUILD_ROOT%{_datadir}/awstats/wwwroot/cgi-bin/{lang,lib,plugins} $RPM_BUILD_ROOT%{_datadir}/%{name} |
87 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/awstats | |
656a81dd ER |
88 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf |
89 | install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf | |
28e1e8f2 | 90 | install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf |
98f12a87 JK |
91 | ln -s %{_datadir}/awstats/wwwroot/cgi-bin/awstats.pl $RPM_BUILD_ROOT%{_bindir} |
92 | ||
7fbdb4cc ER |
93 | %clean |
94 | rm -rf $RPM_BUILD_ROOT | |
95 | ||
04438bfd | 96 | %triggerin -- apache < 2.2.0, apache-base |
656a81dd | 97 | %webapp_register httpd %{_webapp} |
7fbdb4cc | 98 | |
04438bfd | 99 | %triggerun -- apache < 2.2.0, apache-base |
656a81dd | 100 | %webapp_unregister httpd %{_webapp} |
7fbdb4cc | 101 | |
29c5f9af ER |
102 | %triggerin -- lighttpd |
103 | %webapp_register lighttpd %{_webapp} | |
104 | ||
105 | %triggerun -- lighttpd | |
106 | %webapp_unregister lighttpd %{_webapp} | |
107 | ||
656a81dd ER |
108 | %triggerpostun -- %{name} < 6.5-2.1 |
109 | # rescue app configs. | |
110 | for i in awstats.conf awstats.model.conf; do | |
111 | if [ -f /etc/%{name}/$i.rpmsave ]; then | |
112 | mv -f %{_sysconfdir}/$i{,.rpmnew} | |
113 | mv -f /etc/%{name}/$i.rpmsave %{_sysconfdir}/$i | |
98f12a87 | 114 | fi |
656a81dd | 115 | done |
7fbdb4cc | 116 | |
656a81dd ER |
117 | # nuke very-old config location (this mostly for Ra) |
118 | if [ -f /etc/httpd/httpd.conf ]; then | |
7fbdb4cc | 119 | sed -i -e "/^Include.*%{name}.conf/d" /etc/httpd/httpd.conf |
98f12a87 | 120 | fi |
41124ea0 | 121 | |
656a81dd ER |
122 | # migrate from httpd (apache2) config dir |
123 | if [ -f /etc/httpd/%{name}.conf.rpmsave ]; then | |
124 | cp -f %{_sysconfdir}/httpd.conf{,.rpmnew} | |
125 | mv -f /etc/httpd/%{name}.conf.rpmsave %{_sysconfdir}/httpd.conf | |
126 | fi | |
127 | ||
128 | # migrate from apache-config macros | |
129 | if [ -f /etc/%{name}/apache.conf.rpmsave ]; then | |
130 | if [ -d /etc/httpd/webapps.d ]; then | |
131 | cp -f %{_sysconfdir}/httpd.conf{,.rpmnew} | |
132 | cp -f /etc/%{name}/apache.conf.rpmsave %{_sysconfdir}/httpd.conf | |
98f12a87 | 133 | fi |
656a81dd ER |
134 | rm -f /etc/%{name}/apache.conf.rpmsave |
135 | fi | |
136 | ||
137 | rm -f /etc/httpd/httpd.conf/99_%{name}.conf | |
138 | /usr/sbin/webapp register httpd %{_webapp} | |
33ea26ba | 139 | %service -q httpd reload |
41124ea0 | 140 | |
41124ea0 | 141 | %files |
142 | %defattr(644,root,root,755) | |
98f12a87 | 143 | %doc README.TXT docs/* tools/webmin tools/xslt |
656a81dd ER |
144 | %dir %attr(750,root,http) %{_sysconfdir} |
145 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf | |
29c5f9af | 146 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf |
0174ff64 | 147 | %attr(644,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/awstats*.conf |
148 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/awstats | |
656a81dd | 149 | |
3a0a0332 | 150 | %attr(755,root,root) %{_bindir}/*.pl |
98f12a87 JK |
151 | %dir %{_datadir}/%{name} |
152 | %{_datadir}/%{name}/lang | |
153 | %{_datadir}/%{name}/lib | |
154 | %{_datadir}/%{name}/plugins | |
155 | %dir %{_datadir}/%{name}/wwwroot | |
156 | %dir %{_datadir}/%{name}/wwwroot/cgi-bin | |
3a0a0332 | 157 | %attr(755,root,root) %{_datadir}/%{name}/wwwroot/cgi-bin/awredir.pl |
158 | %attr(755,root,root) %{_datadir}/%{name}/wwwroot/cgi-bin/awstats.pl | |
98f12a87 JK |
159 | %{_datadir}/%{name}/wwwroot/classes |
160 | %{_datadir}/%{name}/wwwroot/css | |
161 | %{_datadir}/%{name}/wwwroot/icon | |
162 | %{_datadir}/%{name}/wwwroot/js | |
163 | %attr(775,root,stats) /var/lib/%{name} |