# # spec file for package logrotate (Version 3.7.9) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild Url: https://fedorahosted.org/releases/l/o/logrotate Name: logrotate BuildRequires: popt-devel BuildRequires: libselinux-devel Summary: Rotate, Compress, Remove, and Mail System Log Files Version: 3.7.9 Release: 1 License: GPLv2+ Group: System/Base Source: %{name}-%{version}.tar.bz2 Source100: %{name}-rpmlintrc Patch: logrotate-3.7.8-suse.patch Patch1: logrotate-3.7.8-conf.patch Patch2: logrotate-3.7.8-autoext.patch Patch3: logrotate-3.7.8-addextension.patch Patch4: logrotate-3.7.8-mess_err.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %fillup_prereq /bin/rm /bin/mv Requires: bzip2 cron %description The logrotate utility is designed to simplify the administration of log files on a system that generates a lot of log files. Logrotate allows 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 reaches a certain size. Normally, logrotate runs as a daily cron job. Authors: -------- Erik Troan Matt Wilson Preston Brown %prep %setup -q %patch %patch1 %patch2 %patch3 %patch4 %build make %{?_smp_mflags} RPM_OPT_FLAGS="$RPM_OPT_FLAGS" WITH_SELINUX=yes %check make test %install make PREFIX=$RPM_BUILD_ROOT install mkdir -p $RPM_BUILD_ROOT/etc/{logrotate.d,cron.daily} mkdir -p $RPM_BUILD_ROOT/usr/sbin install -m 644 examples/logrotate-default $RPM_BUILD_ROOT/etc/logrotate.conf install -m 755 examples/logrotate.cron $RPM_BUILD_ROOT/etc/cron.daily/logrotate install -m 644 examples/logrotate.wtmp $RPM_BUILD_ROOT/etc/logrotate.d/wtmp %post %{remove_and_set MAX_DAYS_FOR_LOG_FILES} if [ -f /etc/logrotate.d/aaa_base ] ; then echo "Saving old logrotate system confguration" mv -v /etc/logrotate.d/aaa_base /etc/logrotate.d.aaa_base.save fi %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc CHANGES %{_sbindir}/logrotate %{_mandir}/man8/logrotate.8* %{_mandir}/man5/logrotate.conf.5* /etc/cron.daily/logrotate %config /etc/logrotate.conf %config(noreplace)/etc/logrotate.d/wtmp %changelog