Репозиторий Sisyphus
Последнее обновление: 21 июня 2018 | Пакетов: 18578 | Посещений: 11722916
en ru br
Репозитории ALT
S:7.7-alt0.4.20180105
5.1: 6.9-alt0.b2008.11.30.M51.1
4.1: 6.9-alt0.0.b2008.08.05.M41.1
4.0: 6.9-alt0.b2008.11.30.M40.1
3.0: 6.4-alt1
www.altlinux.org/Changes

Другие репозитории

Группа :: Мониторинг
Пакет: awstats

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%define _pseudouser_user awstats
%define _pseudouser_group awstats
%define _pseudouser_home %_localstatedir/%name
%define docdir %_docdir/%name-%version

Name: awstats
Version: 7.7
Release: alt0.4.20180105

Summary: Real-time logfile analyzer to get advanced web statistics
Summary(ru_RU.KOI8-R): Анализатор логов Web-сервера в режиме реального времени
License: GPL3
Group: Monitoring

Url: http://www.awstats.org
BuildArch: noarch

# https://github.com/eldy/awstats

Source: %name-%version.tar
Source1: awstats.cron
Source2: apache.modconfdir
Source3: apache2.mods-start
Source4: apache2.sites-available
Source5: apache2.sites-start
Source6: apache2.ports-start
Source7: README.ALT.ru_RU.UTF8

Patch: %name-%version-%release.patch

BuildRequires(pre): rpm-build-licenses
BuildRequires(pre): rpm-build-apache
BuildRequires(pre): rpm-build-apache2

# Automatically added by buildreq on Wed Jul 21 2010 (-bi)

BuildRequires: apache2-common perl-libwww tzdata perl-Switch perl-CGI

%description
AWStats is a short for Advanced Web Statistics. It's a free tool that generates
advanced web (but also ftp, syslog or mail) server access statistics
graphically. This log analyzer works as a CGI or from command line and shows
you all possible information your log contains, in few graphical web pages. It
uses a partial information file to be able to process large log files, often
and quickly. It can analyze log files from IIS (W3C log format), Apache log
files (NCSA combined/XLF/ELF log format or common/CLF log format), WebStar and
most of all web, proxy, wap, streaming servers (and even syslog, ftp servers or
mail logs).

%description -l ru_RU.KOI8-R
AWStats это сокращение от Advanced Web Statistics (расширеная Веб-статистика).
Это бесплатный инструмент для генерации расширеной статистики графиков о работе
http (а так же ftp, syslog или mail) сервисов. Данный анализатор работает как
из командной строки так и в виде CGI-скрипта.

%package docs
Summary: AWStats documentation set
Group: Monitoring

%description docs
AWStats is a short for Advanced Web Statistics. It's a free tool that generates
advanced web (but also ftp, syslog or mail) server access statistics
graphically. This log analyzer works as a CGI or from command line and shows
you all possible information your log contains, in few graphical web pages. It
uses a partial information file to be able to process large log files, often
and quickly. It can analyze log files from IIS (W3C log format), Apache log
files (NCSA combined/XLF/ELF log format or common/CLF log format), WebStar and
most of all web, proxy, wap, streaming servers (and even syslog, ftp servers or
mail logs).

%package apache
Summary: AWStats apache-related config
Group: Monitoring
Requires: %name = %version-%release
Requires: apache-base

%description apache
AWStats apache-related config

%package apache2
Summary: AWStats apache2-related config
Group: Monitoring
Requires: %name = %version-%release
Requires: apache2-base

%description apache2
AWStats apache2-related config

%prep
%setup
%patch -p1
cp %SOURCE7 ./

%build
# build awgraphapplet.jar from source, avoiding upstream shipped binary
cd wwwroot/classes/src/
perl Makefile.pl

%install
install -d %buildroot%_datadir/%name
install -d %buildroot%_sysconfdir/{%name,cron.d}
install -d %buildroot%_pseudouser_home
install -d %buildroot%apache_modconfdir
install -d %buildroot%apache2_mods_start
install -d %buildroot%apache2_sites_available
install -d %buildroot%apache2_sites_start
install -d %buildroot%apache2_ports_start

cp -r {tools,wwwroot} %buildroot%_datadir/%name/
mv %buildroot%_datadir/%name/wwwroot/cgi-bin/{lang,lib,plugins} %buildroot%_datadir/%name/

# move unneeded files

mkdir examples
mv %buildroot%_datadir/%name/tools/{awstats_configure.pl,httpd_conf,webmin,xslt} examples/
mv %buildroot%_datadir/%name/wwwroot/cgi-bin/awredir.pl examples/
mv %buildroot%_datadir/%name/plugins/example/example.pm examples/

# fix permissions (again)

find %buildroot%_datadir/%name -name \*.pl -exec chmod 0755 {} \;

install -p -m644 %SOURCE1 %buildroot%_sysconfdir/cron.d/%name
install -p -m644 %SOURCE2 %buildroot%apache_modconfdir/%name.conf
install -p -m644 %SOURCE3 %buildroot%apache2_mods_start/%name.conf
install -p -m644 %SOURCE4 %buildroot%apache2_sites_available/%name.conf
install -p -m644 %SOURCE5 %buildroot%apache2_sites_start/%name.conf
install -p -m644 %SOURCE6 %buildroot%apache2_ports_start/%name.conf

%pre
/usr/sbin/groupadd -r -f %_pseudouser_group ||:
/usr/sbin/useradd -g %_pseudouser_group -c 'AWStats log analyzer' \
       -d %_pseudouser_home -s /dev/null -r %_pseudouser_user >/dev/null 2>&1 ||:

%pre apache
/usr/sbin/usermod -g %_pseudouser_group -G %apache_group %_pseudouser_user

%pre apache2
/usr/sbin/usermod -g %_pseudouser_group -G %apache2_group %_pseudouser_user

%post apache
%post_apacheconf

%postun apache
%postun_apacheconf

%post apache2
%apache2_sbindir/a2chkconfig
%post_apache2conf

%postun apache2
%apache2_sbindir/a2chkconfig
%postun_apache2conf

%files
%_datadir/%name
%exclude %_datadir/%name/wwwroot/cgi-bin/awstats.model.conf
%exclude %_datadir/%name/wwwroot/classes/src
%exclude %_datadir/%name/plugins/example
# fix plugins perms
%attr(0644,root,root) %_datadir/%name/plugins/*.pm
%_sysconfdir/%name
%dir %attr(1775,root,%_pseudouser_group) %_pseudouser_home
%config(noreplace) %_sysconfdir/cron.d/%name
%doc README.md README.ALT.ru_RU.UTF8 wwwroot/cgi-bin/awstats.model.conf


%files docs
%doc docs examples

%files apache
%config(noreplace) %apache_modconfdir/%name.conf

%files apache2
%config(noreplace) %apache2_mods_start/%name.conf
%config(noreplace) %apache2_sites_available/%name.conf
%config(noreplace) %apache2_sites_start/%name.conf
%config(noreplace) %apache2_ports_start/%name.conf

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin