logrotate/logrotate.spec
OBS User autobuild fafa86457b Accepting request 29004 from Base:System
Copy from Base:System/logrotate based on submit request 29004 from user coolo

OBS-URL: https://build.opensuse.org/request/show/29004
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/logrotate?expand=0&rev=14
2010-01-14 15:32:06 +00:00

100 lines
3.0 KiB
RPMSpec

#
# spec file for package logrotate (Version 3.7.8)
#
# 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.8
Release: 2
License: GPL v2 or later
Group: System/Base
Source: %{name}-%{version}.tar.bz2
Patch: %{name}-%{version}-suse.patch
Patch1: %{name}-%{version}-conf.patch
Patch2: %{name}-%{version}-autoext.patch
Patch3: %{name}-%{version}-addextension.patch
Patch4: %{name}-%{version}-mess_err.patch
Patch5: %{name}-%{version}-cron-check-for-another-instance.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 <ewt@redhat.com>
Matt Wilson <msw@redhat.com>
Preston Brown <pbrown@redhat.com>
%prep
%setup -q
%patch
%patch1
%patch2
%patch3
%patch4
%patch5
%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*
/etc/cron.daily/logrotate
%config /etc/logrotate.conf
%config(noreplace)/etc/logrotate.d/wtmp
%changelog