%define contentdir /var/www Summary: Squid report generator per user/ip/name Name: sarg Version: 2.3.2 Release: %mkrel 2 License: GPLv2+ Group: Monitoring URL: http://sarg.sourceforge.net/ Source: http://prdownloads.sourceforge.net/sarg/%{name}-%{version}.tar.gz Source1: 0sarg.daily Source2: 0sarg.weekly Source3: 0sarg.monthly Source4: sarg.conf.mageia Requires: squid Requires: bash %description Sarg (was Sqmgrlog) generate reports per user/ip/name from SQUID log file. The reports will be generated in HTML or email. %prep %setup -q %build chmod a+x cfgaux documentation fonts images include sarg-php sarg-php/locale chmod a+x sarg-php/locale/* chmod a+x sarg-php/locale/*/* chmod +x configure %configure2_5x \ --bindir=%{_sbindir} \ --sysconfdir=%{_sysconfdir}/%{name} \ --mandir=%{_mandir} \ --enable-sargphp=%{contentdir}/html %make %install rm -rf %{buildroot} mkdir -p %{buildroot}/{%_sbindir,%_datadir/%name,%_sysconfdir/%name} mkdir -p %{buildroot}%{contentdir}/html/squid mkdir -p %{buildroot}%{contentdir}/html/squid/{daily,weekly,monthly} mkdir -p %{buildroot}%{contentdir}/html/sarg-php %makeinstall_std mkdir -p %{buildroot}/etc/cron.daily install -m 0755 %{SOURCE1} %{buildroot}/etc/cron.daily/0%{name} mkdir -p %{buildroot}/etc/cron.weekly install -m 0755 %{SOURCE2} %{buildroot}/etc/cron.weekly/0%{name} mkdir -p %{buildroot}/etc/cron.monthly install -m 0755 %{SOURCE3} %{buildroot}/etc/cron.monthly/0%{name} install -m 644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/%{name}/%{name}.conf %find_lang %name %files -f %name.lang %defattr(-,root,squid) %doc CONTRIBUTORS DONATIONS ChangeLog %{_mandir}/man1/* %{_sysconfdir}/%{name}/*.tpl %{_sysconfdir}/%{name}/user* %attr(0755,root,squid) %{_sbindir}/%{name}* %attr(0755,root,squid) %dir %{_sysconfdir}/%{name} %attr(0664,root,squid) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf %attr(0755,root,squid) %dir %{contentdir}/html/squid %attr(0755,root,squid) %dir %{contentdir}/html/squid/daily %attr(0755,root,squid) %dir %{contentdir}/html/squid/weekly %attr(0755,root,squid) %dir %{contentdir}/html/squid/monthly %attr(0755,root,squid) %dir %{contentdir}/html/%{name}-php %{_datadir}/%{name} %{contentdir}/html/%{name}-php/* %config(noreplace) %attr(0754,root,squid) %{_sysconfdir}/cron.*/* %config(noreplace) %attr(0644,root,squid) %{_sysconfdir}/%{name}/exclude_codes %clean rm -rf %{buildroot} %changelog * Mon Jan 14 2013 umeabot <umeabot> 2.3.2-2.mga3 + Revision: 381712 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Sun Jan 08 2012 luigiwalser <luigiwalser> 2.3.2-1.mga2 + Revision: 193022 - enable parallel make - remove old patches - update to new version 2.3.2 - clean spec - enable sarg-php + dlucio <dlucio> - imported package sarg