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