Update squidanalyzer.spec for RPM build. Thanks to David Walser for the patch.

This commit is contained in:
Darold 2012-12-16 17:31:59 +01:00
parent 99d2f6f5f0
commit 1b96c2a2e4

View File

@ -7,7 +7,7 @@ Release: %mkrel 1
License: GPLv3 License: GPLv3
Group: Monitoring Group: Monitoring
URL: http://%{name}.darold.net/ URL: http://%{name}.darold.net/
Source: http://prdownloads.sourceforge.net/squid-report/SquidAnalyzer-%{version}.tar.gz Source: http://prdownloads.sourceforge.net/squid-report/%{name}-%{version}.tar.gz
Requires: squid Requires: squid
BuildRequires: perl BuildRequires: perl
BuildArch: noarch BuildArch: noarch
@ -26,7 +26,7 @@ or more often with heavy proxy usage.
%prep %prep
%setup -q -n SquidAnalyzer-%{version} %setup -q
%build %build
perl Makefile.PL DESTDIR=%{buildroot} LOGFILE=%{_logdir}/squid/access.log BINDIR=%{_sbindir} HTMLDIR=%{contentdir}/html/%{name} BASEURL=/%{name} MANDIR=%{_mandir}/man3 QUIET=yes perl Makefile.PL DESTDIR=%{buildroot} LOGFILE=%{_logdir}/squid/access.log BINDIR=%{_sbindir} HTMLDIR=%{contentdir}/html/%{name} BASEURL=/%{name} MANDIR=%{_mandir}/man3 QUIET=yes
@ -37,6 +37,7 @@ perl Makefile.PL DESTDIR=%{buildroot} LOGFILE=%{_logdir}/squid/access.log BINDIR
rm -rf %{buildroot} rm -rf %{buildroot}
%makeinstall_std %makeinstall_std
install etc/* %{buildroot}%{_sysconfdir}/%{name}/
install -d %{buildroot}%{_sysconfdir}/cron.daily install -d %{buildroot}%{_sysconfdir}/cron.daily
echo -e "#!/bin/sh\n%{_sbindir}/squid-analyzer" > %{buildroot}%{_sysconfdir}/cron.daily/0%{name} echo -e "#!/bin/sh\n%{_sbindir}/squid-analyzer" > %{buildroot}%{_sysconfdir}/cron.daily/0%{name}
@ -56,9 +57,11 @@ echo -e "#!/bin/sh\n%{_sbindir}/squid-analyzer" > %{buildroot}%{_sysconfdir}/cro
%attr(0755,root,squid) %dir %{_sysconfdir}/%{name}/lang %attr(0755,root,squid) %dir %{_sysconfdir}/%{name}/lang
%{_sysconfdir}/%{name}/lang/* %{_sysconfdir}/%{name}/lang/*
%attr(0755,root,squid) %dir %{contentdir}/html/%{name} %attr(0755,root,squid) %dir %{contentdir}/html/%{name}
%{contentdir}/html/%{name}/logo-%{name}.png %{contentdir}/html/%{name}/flotr2.js
%{contentdir}/html/%{name}/sorttable.js %{contentdir}/html/%{name}/sorttable.js
%{contentdir}/html/%{name}/%{name}.css %{contentdir}/html/%{name}/%{name}.css
%attr(0755,root,squid) %dir %{contentdir}/html/%{name}/images
%{contentdir}/html/%{name}/images/*.png
%clean %clean
rm -rf %{buildroot} rm -rf %{buildroot}