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