Fix RPM squidanalyzer.spec file. Thanks to NuxRo for the report.

This commit is contained in:
Gilles Darold 2019-01-01 18:27:09 +01:00
parent 90a1306fc9
commit 3b2b86f3f7
1 changed files with 12 additions and 11 deletions

View File

@ -3,15 +3,14 @@
Summary: Squid proxy log analyzer and report generator
Name: squidanalyzer
Version: 6.6
Release: 3
License: GPLv3
Release: 1%{?dist}
License: GPLv3+
Group: Monitoring
URL: http://%{name}.darold.net/
URL: http://squidanalyzer.darold.net/
Source: http://prdownloads.sourceforge.net/squid-report/%{name}-%{version}.tar.gz
BuildRequires: perl
BuildArch: noarch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: perl-ExtUtils-MakeMaker, perl-ExtUtils-Install, perl-ExtUtils-Manifest, perl-ExtUtils-ParseXS, perl-Time-HiRes
BuildRequires: gdbm-devel, libdb-devel, perl-devel, systemtap-sdt-devel
@ -32,27 +31,28 @@ or more often with heavy proxy usage.
%setup -q
%build
perl Makefile.PL DESTDIR=%{buildroot} LOGFILE=%{_logdir}/squid/access.log BINDIR=%{_bindir} HTMLDIR=%{contentdir}/%{name} BASEURL=/%{name} MANDIR=%{_mandir}/man3 QUIET=yes
%{__perl} Makefile.PL DESTDIR=%{buildroot} LOGFILE=%{_logdir}/squid/access.log BINDIR=%{_bindir} HTMLDIR=%{contentdir}/%{name} BASEURL=/%{name} MANDIR=%{_mandir}/man3 QUIET=yes
make
%install
rm -rf %{buildroot}
%{__rm} -rf %{buildroot}
make DESTDIR=%{buildroot} install
%{__make} install DESTDIR=%{buildroot}
install etc/* %{buildroot}%{_sysconfdir}/%{name}/
install -d %{buildroot}%{_sysconfdir}/cron.daily
echo -e "#!/bin/sh\n%{_bindir}/squid-analyzer" > %{buildroot}%{_sysconfdir}/cron.daily/0%{name}
# Remove unpackaged files.
%{__rm} -f `find %{buildroot}/%{_libdir}/perl*/ -name .packlist -type f`
%{__rm} -f `find %{buildroot}/%{_libdir}/perl*/ -name perllocal.pod -type f`
%files
%defattr(-,root,root)
%defattr(-, root, root, 0755)
%doc README ChangeLog
%{_mandir}/man3/*
%{perl_vendorlib}/SquidAnalyzer.pm
%attr(0755,root,root) %{_bindir}/squid-analyzer
%attr(0755,root,root) %{_libdir}/perl5/perllocal.pod
%attr(0755,root,root) %{_libdir}/perl5/vendor_perl/auto/SquidAnalyzer/.packlist
%attr(0755,root,root) %dir %{_sysconfdir}/%{name}
%attr(0664,root,root) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/%{name}/excluded
@ -70,4 +70,5 @@ echo -e "#!/bin/sh\n%{_bindir}/squid-analyzer" > %{buildroot}%{_sysconfdir}/cron
%{contentdir}/%{name}/images/*.png
%clean
rm -rf %{buildroot}
%{__rm} -rf %{buildroot}