isoqlog - spec

Paweł Zuzelski z w grabina.waw.pl
Pią, 26 Paź 2007, 16:15:53 CEST


On Monday 22 October 2007 13:42:45 Tomasz Witek wrote:
> z configa dla sendmaila.
> htmldir		= "/usr/isoqlog/htmltemp"
> langfile	= "/usr/isoqlog/lang/english"
>
> a te pliki są w /usr/share/....

ops, faktycznie... Dzięki...

W załączniku poprawiona wersja.

-- 
Pozdrawiam,
Paweł Zuzelski
jid:z w jabber.ync.pl
-------------- następna część ---------
# $Revision:$, $Date:$
#
# Conditional build
%bcond_without webapps
%bcond_without crondaemon

Summary:	MTA log analysis program written in C
Summary(pl.UTF-8):	Analizator logĂłw MTA.
Name:		isoqlog
Version:	2.2.1
Release:	1
License:	Freer than GPL, see COPYING
Group:		Applications/Text
Source0:	http://www.enderunix.org/isoqlog/%{name}-%{version}.tar.gz
# Source0-md5:	ade1c33b39c051f7ff4c5eb67f6f7285
Source1:	%{name}.httpd.conf
Source2:	%{name}.postfix.conf
Source3:	%{name}.qmail.conf
Source4:	%{name}.sendmail.conf
Source5:	%{name}.exim.conf
Source6:	%{name}.domains
Source7:	%{name}.cron.db
URL:		http://www.enderunix.org/isoqlog/
BuildRequires:	autoconf >= 2.60
BuildRequires:	automake
%{?with_crondaemon:Requires:	crondaemon}
%{?with_webapps:Requires:	webapps}
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%define         _outputdir      /home/services/isoqlog
%if %{with webapps}
%define         _webapps        /etc/webapps
%define         _webapp         %{name}
%define         _webappsconfdir %{_webapps}/%{_webapp}
%endif

%description
Isoqlog is an MTA log analysis program written in C. It designed to
scan qmail, postfix, sendmail and exim logfile and produce usage
statistics in HTML format for viewing through a browser. It produces
Top domains output according to Sender, Receiver, Total mails and
bytes; it keeps your main domain mail statistics with regard to Days
Top Domain, Top Users values for per day, per month and years.

%description -l pl.UTF-8
Isoqlog to analizator logów MTA napisany w C. Potrafi wygenerować
statyczny plik w formacie HTML na podstawie logĂłw qmaila, postfixa,
sendmaila i exima. Raport wygenerowany przez Isoqlog przedstawia
rozkład występowania domen w adresach odbiorców, nadawców pod
względem ilości przesłanych maili oraz rozmiaru maili. Zestawienie
zawiera statystyki najbardziej obciążonych domen i najbardziej
aktywnych użytkowników w danym dniu, miesiącu i roku.

%description -l tr
Isoqlog C dilinde yazilmis bir MTA log analiz programidir. Qmail,
Postfix, Senmail log dosyalarini tarayarak gerekli istatistiklerin
HTML formatinda tarayicilarda gorulmesini saglar. Istatistikler
Gonderici, Alici, Toplam gonderilen mail ve buyuklugune ve sayisina
gore tutulmanin yanisira gunluk, aylik ve yillik en cok kullanilan
email ve domain ciktisinda yer alir.

%prep
%setup -q

%build
%{__aclocal}
%{__autoconf}
%{__automake}
%configure \
	--prefix=''
%{__make}

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_bindir}
install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/htmltemp/{images,library}
install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/lang
install -d $RPM_BUILD_ROOT%{_outputdir}
install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
ln -s %{_datadir}/%{name}/htmltemp/images $RPM_BUILD_ROOT%{_outputdir}/images
ln -s %{_datadir}/%{name}/htmltemp/library $RPM_BUILD_ROOT%{_outputdir}/library
%{?with_crondaemon:install -d $RPM_BUILD_ROOT/etc/cron.daily}
%{?with_webapps:install -d $RPM_BUILD_ROOT%{_webappsconfdir}}
install isoqlog/isoqlog $RPM_BUILD_ROOT%{_bindir}/isoqlog
install data/htmltemp/*.html $RPM_BUILD_ROOT%{_datadir}/%{name}/htmltemp
install data/htmltemp/images/*.gif $RPM_BUILD_ROOT%{_datadir}/%{name}/htmltemp/images
install data/htmltemp/library/*.css $RPM_BUILD_ROOT%{_datadir}/%{name}/htmltemp/library
install data/lang/{bulgarian,czech,dutch,finnish,german,polish,romana,spanish,turkish,danish,english,french,italian,norwegian,portuguese,russian,swedish} $RPM_BUILD_ROOT%{_datadir}/%{name}/lang
install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/
install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/
install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/
install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/
install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/
%{?with_crondaemon:install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/}
%if %{with webapps}
install %{SOURCE1} $RPM_BUILD_ROOT%{_webappsconfdir}/httpd.conf
install %{SOURCE1} $RPM_BUILD_ROOT%{_webappsconfdir}/apache.conf
%endif

%clean
rm -rf $RPM_BUILD_ROOT

#
# Konfiguracja apache'a
#

%if %{with webapps}
%triggerin -- apache1 < 1.3.37-3, apache1-base
%webapp_register apache %{_webapp}

%triggerun -- apache1 < 1.3.37-3, apache1-base
%webapp_unregister apache %{_webapp}

%triggerin -- apache < 2.2.0, apache-base
%webapp_register httpd %{_webapp}

%triggerun -- apache < 2.2.0, apache-base
%webapp_unregister httpd %{_webapp}
%endif

#
# Instalujemy 4 pliki konfiguracyjne isoqlog dla każdego obsługiwanego formatu
# logów a następnie linkujemy isoqlog.conf do odpowiedniego zależnie od tego,
# ktĂłre MTA jest zainstalowane.
#

%triggerin -- exim
[ -h %{_sysconfdir}/%{name}.conf ] && rm %{_sysconfdir}/%{name}.conf
[ -e %{_sysconfdir}/%{name}.conf ] || ln -s %{_sysconfdir}/%{name}/%{name}.exim.conf %{_sysconfdir}/%{name}.conf

%triggerin -- postfix
[ -h %{_sysconfdir}/%{name}.conf ] && rm %{_sysconfdir}/%{name}.conf
[ -e %{_sysconfdir}/%{name}.conf ] || ln -s %{_sysconfdir}/%{name}/%{name}.postfix.conf %{_sysconfdir}/%{name}.conf

%triggerin -- qmail
[ -h %{_sysconfdir}/%{name}.conf ] && rm %{_sysconfdir}/%{name}.conf
[ -e %{_sysconfdir}/%{name}.conf ] || ln -s %{_sysconfdir}/%{name}/%{name}.qmail.conf %{_sysconfdir}/%{name}.conf

%triggerin -- sendmail
[ -h %{_sysconfdir}/%{name}.conf ] && rm %{_sysconfdir}/%{name}.conf
[ -e %{_sysconfdir}/%{name}.conf ] || ln -s %{_sysconfdir}/%{name}/%{name}.sendmail.conf %{_sysconfdir}/%{name}.conf

#
# Jeżeli link do pliku konfiguracyjnego nie istnieje (czyli żadne MTA nie było
# zainstalowane) instalujemy standardowo link do konfigu zakładającego format
# logĂłw sendmaila
#

%post
[ -e %{_sysconfdir}/%{name}.conf ] || ln -s %{_sysconfdir}/%{name}/%{name}.sendmail.conf %{_sysconfdir}/%{name}.conf

%preun
[ -h %{_sysconfdir}/%{name}.conf ] && rm %{_sysconfdir}/%{name}.conf

%files
%defattr(644,root,root,755)
%dir %{_sysconfdir}/%{name}
%dir %{_datadir}/%{name}
%dir %{_outputdir}
%attr(755,root,root) %{_bindir}/*
%if %{with webapps}
%dir %attr(750,root,http) %{_webappsconfdir}
%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webappsconfdir}/apache.conf
%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webappsconfdir}/httpd.conf
%endif
%{?with_crondaemon:%attr(754,root,root) /etc/cron.daily/%{name}.cron.db}
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/isoqlog.sendmail.conf
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/isoqlog.exim.conf
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/isoqlog.postfix.conf
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/isoqlog.qmail.conf
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/isoqlog.domains
%{_datadir}/%{name}/*
%doc AUTHORS COPYING ChangeLog EnderUNIX FAQ README
%doc tr/{BENIOKU,DEGISIKLIKLER,HABERLER,KOPYALAMA,KURULUM,YAZARLAR}
%{_outputdir}/images
%{_outputdir}/library
%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <feedback w pld-linux.org>
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log:$
-------------- następna część ---------
Załącznik, który nie był tekstem został usunięty...
Name: isoqlog.cron.db
Type: application/x-shellscript
Size: 94 bytes
Desc: nie znany
Url : /mailman/pipermail/pld-devel-pl/attachments/20071026/13f16129/attachment.bin 
-------------- następna część ---------
#isoqlog  Configuration file 

logtype		= "postfix"
logstore	= "/var/log/maillog"
domainsfile     = "/etc/isoqlog/isoqlog.domains"
outputdir	= "/home/services/isoqlog" # html output directory
htmldir		= "/usr/share/isoqlog/htmltemp"
langfile	= "/usr/share/isoqlog/lang/english"
hostname	= "localhost"

maxsender   = 100	
maxreceiver = 100	
maxtotal    = 100  
maxbyte     = 100 
-------------- następna część ---------
#isoqlog  Configuration file 

logtype		= "qmail-syslog"
logstore	= "/var/log/maillog" 
domainsfile     = "/etc/isoqlog/isoqlog.domains" 
outputdir	= "/home/services/isoqlog" #html output directory
htmldir		= "/usr/share/isoqlog/htmltemp"
langfile	= "/usr/share/isoqlog/lang/english"
hostname	= "localhost"

maxsender   = 100	
maxreceiver = 100	
maxtotal    = 100  
maxbyte     = 100 
-------------- następna część ---------
#isoqlog  Configuration file 

logtype		= "sendmail"
logstore 	= "/var/log/maillog"
domainsfile     = "/etc/isoqlog/isoqlog.domains" 
outputdir	= "/home/services/isoqlog" #html output directory
htmldir		= "/usr/share/isoqlog/htmltemp"
langfile	= "/usr/share/isoqlog/lang/english"
hostname	= "localhost"

maxsender   = 100	
maxreceiver = 100	
maxtotal    = 100  
maxbyte     = 100 
-------------- następna część ---------
example.org
-------------- następna część ---------
#isoqlog  Configuration file 

logtype		= "exim"
logstore 	= "/var/log/exim/main.log"
domainsfile     = "/etc/isoqlog/isoqlog.domains" 
outputdir	= "/home/services/isoqlog" #html output directory
htmldir		= "/usr/share/isoqlog/htmltemp"
langfile	= "/usr/share/isoqlog/lang/english"
hostname	= "localhost"

maxsender   = 100	
maxreceiver = 100	
maxtotal    = 100  
maxbyte     = 100 
-------------- następna część ---------
Alias /isoqlog /home/services/isoqlog

<Directory "/home/services/isoqlog">
        Options Indexes FollowSymlinks
        AllowOverride None
        Order allow,deny
        Allow from all
</Directory>

<Directory "/usr/share/isoqlog/htmltemp/library">
        AllowOverride None
        Order allow,deny
        Allow from all
</Directory>

<Directory "/usr/share/isoqlog/htmltemp/images">
        AllowOverride None
        Order allow,deny
        Allow from all
</Directory>


Więcej informacji o liście dyskusyjnej pld-devel-pl