# OE: conditional switches # #(ie. use with rpm --rebuild): # # --with diet Compile isoqlog against dietlibc # # %define build_diet 0 # commandline overrides: # rpm -ba|--rebuild --with 'xxx' %{?_with_diet: %{expand: %%define build_diet 1}} %define name isoqlog %define version 2.2 %define release 1mdk Summary: Isoqlog is an MTA log analysis program written in C. Name: %{name} Version: %{version} Release: %{release} Source: %{name}-%{version}.tar.bz2 Patch0: isoqlog-2.2-small_fixes.diff.bz2 Patch1: isoqlog-2.2-no_gifs.diff.bz2 License: BSD Group: Monitoring URL: http://www.enderunix.org/isoqlog/ BuildRequires: automake BuildRequires: gif2png BuildRoot: %{_tmppath}/%{name}-buildroot %if %{build_diet} BuildRequires: dietlibc-devel >= 0.20-1mdk %endif %description Isoqlog is an MTA log analysis program written in C. It is designed to scan qmail, postfix, sendmail logfiles and produce usage statistics in HTML format. for viewing through a browser. It produces Top domains output according to Incoming, Outgoing, total mails and bytes, it keeps your main domain mail statistics with Days Top Domain, Top Users values for per day, per month, and years. Features: -------- * Multi MTA support(qmail (multilog and syslog), postfix, sendmail) * Multi-domain support: Shows quite detailed statistics for not only your main domain, but also, any domain you want. * Displays statistics for common mail delivery errors. * For each domain you specify; displays Top incoming, outgoing, total and byte based statistics for users. * Displays server's activity based on incoming, outgoing, total mails and size of incoming mail, for domain and its users. * All days', all months', all years' activities ( above ones ) are stored for future inspection. * Multi-language Support (Turkish, English, German, Portuguese, Spanish, Italian, French, Swedish, Dutch, Polish, Norwegian) %prep %setup -q %patch0 -p1 %patch1 -p1 # CVS cleanup for i in `find . -type d -name CVS` `find . -type f -name .cvs\*` `find . -type f -name .#\*`; do if [ -e "$i" ]; then rm -r $i; fi >&/dev/null done # convert gif to png images (in conjunction with P2) gif2png -O isoqlog/htmltemp/images/*.gif %build ./configure \ --prefix=%{_prefix} \ --exec-prefix=%{_exec_prefix} \ --bindir=%{_bindir} \ --sbindir=%{_sbindir} \ --sysconfdir=%{_sysconfdir}/%{name} \ --datadir=%{_datadir} \ --includedir=%{_includedir} \ --libdir=%{_libdir} \ --libexecdir=%{_libexecdir} \ --localstatedir=%{_localstatedir} \ --sharedstatedir=%{_sharedstatedir} \ --mandir=%{_mandir} \ --infodir=%{_infodir} %if %{build_diet} # OE: use the power of dietlibc make CC="diet gcc" CFLAGS="-Os -Wall -s -static -nostdinc -D_BSD_SOURCE -D_GNU_SOURCE" %else %make CFLAGS="%{optflags}" %endif %install [ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot} # make install don't work, and I don't want to fix it. install -d %{buildroot}%{_sysconfdir}/%{name} install -d %{buildroot}/var/www/html/%{name}/{images,library} install -d %{buildroot}%{_bindir} install -d %{buildroot}%{_datadir}/%{name}/lang install -d %{buildroot}%{_datadir}/%{name}/htmltemp/{images,library} install -m0755 isoqlog/%{name} %{buildroot}%{_bindir}/%{name} install -m0644 isoqlog/htmltemp/images/*.png %{buildroot}/var/www/html/%{name}/images/ install -m0644 isoqlog/htmltemp/library/*.css %{buildroot}/var/www/html/%{name}/library/ install -m0644 isoqlog/htmltemp/images/*.png %{buildroot}%{_datadir}/%{name}/htmltemp/images/ install -m0644 isoqlog/htmltemp/library/*.css %{buildroot}%{_datadir}/%{name}/htmltemp/library/ install -m0644 isoqlog/htmltemp/*.html %{buildroot}%{_datadir}/%{name}/htmltemp/ rm -f isoqlog/lang/Makefile* install -m0644 isoqlog/lang/* %{buildroot}%{_datadir}/%{name}/lang/ # fix this rm -rf %{buildroot}%{_datadir}/doc # fix the config files rm -f %{buildroot}%{_sysconfdir}/%{name}/isoqlog* install -m644 isoqlog/isoqlog.conf-dist %{buildroot}%{_sysconfdir}/%{name}/isoqlog.conf.qmail-multilog install -m644 isoqlog/isoqlog.conf.sample1 %{buildroot}%{_sysconfdir}/%{name}/isoqlog.conf.qmail-syslog install -m644 isoqlog/isoqlog.conf.sample3 %{buildroot}%{_sysconfdir}/%{name}/isoqlog.conf.sendmail # install the postfix config as default install -m644 isoqlog/isoqlog.conf.sample2 %{buildroot}%{_sysconfdir}/%{name}/isoqlog.conf # put "localhost" into the isoqlog.domains file echo "localhost" > isoqlog.domains install -m644 isoqlog.domains %{buildroot}%{_sysconfdir}/%{name}/isoqlog.domains %clean [ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot} %files %defattr(-,root,root) %doc %{name}.* tr AUTHORS COPYING ChangeLog EnderUNIX INSTALL README* TODO %config(noreplace) %{_sysconfdir}/%{name}/isoqlog.conf %config(noreplace) %{_sysconfdir}/%{name}/isoqlog.conf.qmail-multilog %config(noreplace) %{_sysconfdir}/%{name}/isoqlog.conf.qmail-syslog %config(noreplace) %{_sysconfdir}/%{name}/isoqlog.conf.sendmail %config(noreplace) %{_sysconfdir}/%{name}/isoqlog.domains %{_bindir}/%{name} %dir /var/www/html/%{name} /var/www/html/%{name}/images/*.png /var/www/html/%{name}/library/*.css %{_datadir}/%{name} %changelog * Tue Aug 31 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.2-1mdk - 2.2 - rediff P0 & P1 * Wed Oct 15 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.1.1-1mdk - 2.1.1 - drop the errno and fclose patch, it's included - rediff P0 & P1 * Thu Aug 21 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.1-3mdk - fix P0 (more like lwq, sort of...) - fix the errno patch (P1) (should work now...) - added the fclose patch (P3) * Fri May 02 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.1-2mdk - fix buildrequires (Buchan Milne) - use the postfix config as default (Buchan Milne) - use png files per default - misc spec file fixes * Tue Jan 14 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.1-1mdk - 2.1 - rediff P0 - drop P1, it's included upstream - added P1 (new one ;)) - enable optional build against dietlibc (--with diet) - misc spec file fixes * Sun Aug 4 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0-3mdk - rebuilt with gcc-3.2 * Mon Jul 22 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0-2mdk - Postfix fix (P1) - put images an css in-place - really increment the release number * Tue Jul 16 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0-1mdk - initial cooker contrib