13a7c500f9
OBS-URL: https://build.opensuse.org/request/show/51118 OBS-URL: https://build.opensuse.org/package/show/Base:System/sysstat?expand=0&rev=11
161 lines
5.2 KiB
RPMSpec
161 lines
5.2 KiB
RPMSpec
#
|
|
# spec file for package sysstat (Version 9.0.6.1)
|
|
#
|
|
# 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
|
|
|
|
|
|
Name: sysstat
|
|
Version: 9.0.6.1
|
|
Release: 9
|
|
Summary: Sar and Iostat Commands for Linux
|
|
Source: http://pagesperso-orange.fr/sebastien.godard/%{name}-%{version}.tar.bz2
|
|
Source1: isag.desktop
|
|
Source2: sysstat.cron.suse
|
|
Source3: sysstat.init.suse
|
|
# PATCH-FIX-OPENSUSE should be upstreamed
|
|
# add locking to scripts sa1 and sa2 (bnc#7861)
|
|
Patch0: sysstat-8.1.6-sa1sa2lock.diff
|
|
# PATCH-FIX-OPENSUSE should be upstreamed
|
|
# use getpagesize() instead of kb_shift for hugetable archs
|
|
Patch2: sysstat-8.0.4-pagesize.diff
|
|
# PATCH-FIX-OPENSUSE use /etc/sysstat for config files
|
|
# instead of /etc/sysconfig since the files do not match
|
|
# the format used there (should be configure option)
|
|
Patch3: sysstat-8.0.4-sysconfdir.diff
|
|
# PATCH-FIX-OPENSUSE remove the unconditional stripping
|
|
# we possibly want a debuginfo package
|
|
Patch4: sysstat-do-not-strip.patch
|
|
# PATCH-FIX-OPENSUSE avoid build dates in generated files
|
|
Patch5: sysstat-9.0.4-no-build-date.patch
|
|
Url: http://pagesperso-orange.fr/sebastien.godard/
|
|
Group: System/Monitoring
|
|
License: GNU General Public License version 2 or later (GPL v2 or later)
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
Requires: procmail gettext
|
|
PreReq: %insserv_prereq
|
|
PreReq: %fillup_prereq
|
|
|
|
BuildRequires: findutils sed update-desktop-files
|
|
|
|
%description
|
|
Sar and Iostat commands for Linux. The sar command collects and reports
|
|
system activity information. The iostat command reports CPU statistics
|
|
and I/O statistics for TTY devices and disks. The information
|
|
collected by sar and iostat can be saved in a binary file for future
|
|
inspection. Both commands now support SMP machines when displaying CPU
|
|
utilization.
|
|
|
|
|
|
Authors:
|
|
--------
|
|
Sebastien Godard <sebastien.godard@wanadoo.fr>
|
|
|
|
%package isag
|
|
License: GNU General Public License version 2 or later (GPL v2 or later)
|
|
Summary: Interactive System Activity Grapher for sysstat
|
|
Requires: sysstat = %{version}
|
|
Requires: gnuplot tk
|
|
Group: System/Monitoring
|
|
|
|
%description isag
|
|
This package includes the isag command, which graphically displays the
|
|
system activity data stored in a binary data produced by a sar command
|
|
from a sysstat package.
|
|
|
|
|
|
Authors:
|
|
--------
|
|
Sebastien Godard <sebastien.godard@wanadoo.fr>
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch0
|
|
%patch2
|
|
%patch3
|
|
%patch4 -p1
|
|
%patch5
|
|
cp %{SOURCE1} %{SOURCE2} %{SOURCE3} .
|
|
|
|
%build
|
|
export conf_dir="%{_sysconfdir}/sysstat"
|
|
export sa_lib_dir="%{_libdir}/sa"
|
|
export cron_owner=root
|
|
export LFLAGS="-L. -lsyscom"
|
|
%configure \
|
|
--enable-nls \
|
|
--disable-smp-race \
|
|
--enable-man-group
|
|
make %{?jobs:-j%jobs}
|
|
|
|
%install
|
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/sa $RPM_BUILD_ROOT%{_sbindir}
|
|
make DESTDIR=$RPM_BUILD_ROOT install
|
|
install -D -m 0644 isag.desktop $RPM_BUILD_ROOT%{_datadir}/applications/isag.desktop
|
|
%suse_update_desktop_file isag
|
|
cp contrib/isag/isag $RPM_BUILD_ROOT%{_bindir}
|
|
cp contrib/isag/isag.1 $RPM_BUILD_ROOT%{_mandir}/man1
|
|
rm -rf $RPM_BUILD_ROOT/usr/share/doc/sysstat*
|
|
install -D -m 0755 sysstat.cron.suse $RPM_BUILD_ROOT%{_sysconfdir}/sysstat/sysstat.cron
|
|
install -D -m 0755 sysstat.init.suse $RPM_BUILD_ROOT%{_sysconfdir}/init.d/boot.sysstat
|
|
# change /usr/lib to /usr/lib64 or something else when needed
|
|
if [ "%{_libdir}" != "/usr/lib" ]; then
|
|
sed -i 's:/usr/lib/:%{_libdir}/:g' $RPM_BUILD_ROOT%{_sysconfdir}/init.d/boot.sysstat $RPM_BUILD_ROOT%{_sysconfdir}/sysstat/sysstat.cron
|
|
fi
|
|
ln -s %{_sysconfdir}/init.d/boot.sysstat $RPM_BUILD_ROOT%{_sbindir}/rcsysstat
|
|
%find_lang %{name}
|
|
install -d $RPM_BUILD_ROOT%{_localstatedir}/lock/sa
|
|
|
|
%preun
|
|
%{stop_on_removal boot.sysstat}
|
|
[ "$1" -gt 0 ] || rm -f %{_localstatedir}/log/sa/*
|
|
|
|
%post
|
|
%{fillup_and_insserv boot.sysstat}
|
|
|
|
%postun
|
|
%{insserv_cleanup}
|
|
|
|
%clean
|
|
%__rm -rf "%{buildroot}"
|
|
|
|
%files -f "%{name}.lang"
|
|
%defattr(-,root,root)
|
|
%doc CHANGES COPYING CREDITS FAQ README TODO
|
|
%doc %{_mandir}/man1/*
|
|
%doc %{_mandir}/man8/*
|
|
%exclude %{_mandir}/man1/isag*
|
|
%dir %{_sysconfdir}/sysstat
|
|
%config %{_sysconfdir}/sysstat/sysstat
|
|
%attr(644,root,root) %config(noreplace) %{_sysconfdir}/sysstat/sysstat.cron
|
|
%attr(644,root,root) %config(noreplace) %{_sysconfdir}/sysstat/sysstat.ioconf
|
|
%attr(755,root,root) %{_sysconfdir}/init.d/boot.sysstat
|
|
%{_bindir}/*
|
|
%{_sbindir}/*
|
|
%exclude %{_bindir}/isag
|
|
%{_libdir}/sa
|
|
%dir %{_localstatedir}/lock/sa
|
|
%dir %{_localstatedir}/log/sa
|
|
|
|
%files isag
|
|
%defattr(-,root,root)
|
|
%doc contrib/isag/README-isag
|
|
%doc %{_mandir}/man1/isag*
|
|
%{_bindir}/isag
|
|
%{_datadir}/applications/isag.desktop
|
|
|
|
%changelog
|