logrotate/logrotate.spec

140 lines
4.6 KiB
RPMSpec
Raw Permalink Normal View History

Name: logrotate
Version: 3.8.7
Release: 1mamba
Summary: Rotates, compresses, removes and mails system log files
Group: System/Tools
Vendor: openmamba
Distribution: openmamba
Packager: Davide Madrisan <davide.madrisan@gmail.com>
URL: ftp://download.fedora.redhat.com/pub/fedora/linux/core/development/SRPMS
Source0: https://fedorahosted.org/releases/l/o/logrotate/logrotate-%{version}.tar.gz
Source1: %{name}.conf
Source2: %{name}.cron
Source3: %{name}-init
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libpopt-devel
BuildRequires: libselinux-devel
## AUTOBUILDREQ-END
Requires(pre): initscripts
Requires(post):chkconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
The logrotate utility is designed to simplify the administration of log files on a system which generates a lot of log files.
Logrotate allows for the automatic rotation compression, removal and mailing of log files.
Logrotate can be set to handle a log file daily, weekly, monthly or when the log file gets to a certain size.
Normally, logrotate runs as a daily cron job and once at boot time.
Install the logrotate package if you need a utility to deal with the log files on your system.
%prep
%setup -q
%build
%make WITH_SELINUX=yes CC=%{_host}-gcc
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
make install PREFIX=%{buildroot} MANDIR=%{_mandir}
install -D -m 644 %{S:1} %{buildroot}%{_sysconfdir}/logrotate.conf
install -D -m 755 %{S:2} %{buildroot}%{_sysconfdir}/cron.daily/logrotate
install -D -m 744 %{S:3} %{buildroot}%{_initrddir}/logrotate
install -d %{buildroot}%{_sysconfdir}/logrotate.d/
install -d %{buildroot}/var/lib
touch %{buildroot}/var/lib/logrotate.status
%post
if [ $1 -ge 1 ]; then
# new install
chkconfig --add logrotate
fi
exit 0
%preun
if [ $1 -eq 0 ]; then
# erase
chkconfig --del logrotate
fi
exit 0
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{_sbindir}/logrotate
%dir %{_sysconfdir}/logrotate.d
%{_sysconfdir}/cron.daily/logrotate
%config(noreplace) %{_sysconfdir}/logrotate.conf
%config(noreplace) %{_localstatedir}/lib/logrotate.status
%{_initrddir}/logrotate
%{_mandir}/man5/*
%{_mandir}/man8/*
%changelog
* Sat Oct 19 2013 Automatic Build System <autodist@mambasoft.it> 3.8.7-1mamba
- automatic version update by autodist
* Mon Aug 12 2013 Automatic Build System <autodist@mambasoft.it> 3.8.6-1mamba
- automatic update by autodist
* Thu Jun 13 2013 Automatic Build System <autodist@mambasoft.it> 3.8.5-1mamba
- automatic version update by autodist
* Fri May 03 2013 Automatic Build System <autodist@mambasoft.it> 3.8.4-1mamba
- automatic version update by autodist
* Fri Oct 12 2012 Automatic Build System <autodist@mambasoft.it> 3.8.3-1mamba
- automatic version update by autodist
* Fri Aug 10 2012 Automatic Build System <autodist@mambasoft.it> 3.8.2-1mamba
- automatic version update by autodist
* Sat Jun 25 2011 Automatic Build System <autodist@mambasoft.it> 3.8.0-1mamba
- automatic update by autodist
* Fri Aug 13 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 3.7.9-2mamba
- use macro %_initrddir to install initscript
* Mon Aug 09 2010 Automatic Build System <autodist@mambasoft.it> 3.7.9-1mamba
- automatic update by autodist
* Fri May 28 2010 Davide Madrisan <davide.madrisan@gmail.com> 3.7.8-1mamba
- update to 3.7.8
- update package Source and URL
* Sun Dec 27 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 3.7.5-4mamba
- rebuilt to remove executable requirements
* Sun Feb 22 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 3.7.5-3mamba
- fixed initscript header and added stop command
- use chkconfig command to enable/disable initscript on install/uninstall
- rename source script to logrotate-init
* Fri Jan 06 2009 Ercole 'ercolinux' Carpanetto <ercole69@gmail.com> 3.7.5-2mamba
- added a reference in rc.local to launch logrotate at boot time
* Tue Jan 15 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 3.7.5-1mamba
- update to 3.7.5
- do not create utmp group
- remove yearly_rotation patch applied upstream
- remove sharedscript patch applied upstream
* Wed Jun 13 2007 Aleph0 <aleph0@openmamba.org> 3.7.2-2mamba
- do not compress wtmp rotated files
* Tue Sep 13 2005 Davide Madrisan <davide.madrisan@qilinux.it> 3.7.2-1qilnx
- update to version 3.7.2 by autospec
- enabled selinux
- specfile fixes
- applied patches from fedora package
* Mon May 26 2003 Silvan Calarco <silvan.calarco> 3.6.8-2qilnx
- creation of needed group utmp
* Mon May 12 2003 Alessandro Ramazzina <alessandro.ramazzina@qinet.it> 3.6.8-1qilnx
- creation of logrotate package