87 lines
2.7 KiB
RPMSpec
87 lines
2.7 KiB
RPMSpec
%define ncv 30
|
|
%define ncn nmonchart
|
|
Name: nmon
|
|
Version: 16f
|
|
Release: 1%{?dist}
|
|
Summary: Nigel's performance Monitor for Linux
|
|
|
|
License: GPLv3
|
|
URL: http://nmon.sourceforge.net
|
|
Source0: https://sourceforge.net/projects/%{name}/files/lmon%{version}.c
|
|
Source1: https://sourceforge.net/projects/%{name}/files/Documentation.txt
|
|
# Manpage available from the patch archive:
|
|
# http://sourceforge.net/tracker/?func=detail&aid=2833213&group_id=271307&atid=1153693
|
|
Source2: %{name}.1
|
|
Source3: http://sourceforge.net/projects/%{name}/files/%{ncn}%{ncv}.tar
|
|
|
|
BuildRequires: ncurses-devel
|
|
|
|
%description
|
|
nmon is a systems administrator, tuner, benchmark tool, which provides
|
|
information about CPU, disks, network, etc., all in one view.
|
|
|
|
%package charts
|
|
Summary: Webpage graphs from nmon data
|
|
Requires: gawk
|
|
Requires: ksh
|
|
Provides: /usr/bin/ksh
|
|
|
|
%description charts
|
|
nmonchart is a Korn shell script for AIX or Linux to convert nmon collected
|
|
files to a webpage (.html) including Google Chart and JavaScript to display
|
|
the top 53+ AIX and Linux Performance Graphs and configuration details.
|
|
|
|
%prep
|
|
%setup -T -c -n %{name}
|
|
sed -e "s/\r//" %{SOURCE1} > Documentation.txt
|
|
touch -c -r %{SOURCE1} Documentation.txt
|
|
cp %{SOURCE0} .
|
|
|
|
%build
|
|
%ifarch ppc %{power64}
|
|
%{__cc} %{optflags} -D JFS -D GETUSER \
|
|
-D LARGEMEM -lncurses -lm lmon%{version}.c -D POWER -o %{name}
|
|
%else
|
|
%{__cc} %{optflags} -D JFS -D GETUSER \
|
|
-D LARGEMEM -D X86 -lncurses -lm lmon%{version}.c -o %{name}
|
|
%endif
|
|
|
|
%install
|
|
install -D -p -m 0755 %{name} %{buildroot}%{_bindir}/%{name}
|
|
install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_mandir}/man1/%{name}.1
|
|
|
|
# extract and install nmonchart:
|
|
mkdir %{ncn}%{ncv}
|
|
pushd %{ncn}%{ncv}
|
|
tar xf %{S:3}
|
|
install -D -p -m 0755 %{ncn} %{buildroot}%{_bindir}/%{ncn}
|
|
install -D -p -m 0644 README %{buildroot}%{_docdir}/%{ncn}/README
|
|
install -D -p -m 0644 nmonchart_cron %{buildroot}%{_docdir}/%{ncn}/nmonchart_cron
|
|
install -D -p -m 0644 sampleC.html %{buildroot}%{_docdir}/%{ncn}/sampleC.html
|
|
install -D -p -m 0644 sampleC.nmon %{buildroot}%{_docdir}/%{ncn}/sampleC.nmon
|
|
popd
|
|
|
|
%clean
|
|
[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}/*
|
|
[ "${RPM_BUILD_DIR}" != "/" ] && rm -rf ${RPM_BUILD_DIR}/*
|
|
|
|
%files
|
|
%doc Documentation.txt
|
|
%{_mandir}/man1/%{name}.1.*
|
|
%{_bindir}/%{name}
|
|
|
|
%files charts
|
|
%{_docdir}/%{ncn}/README
|
|
%{_docdir}/%{ncn}/nmonchart_cron
|
|
%{_docdir}/%{ncn}/sampleC.html
|
|
%{_docdir}/%{ncn}/sampleC.nmon
|
|
%{_bindir}/%{ncn}
|
|
|
|
%changelog
|
|
* Fri Sep 30 2016 Daniel Steiner <dsteiner@redhat.com> - 16f-1
|
|
- Update to latest version
|
|
|
|
* Fri Sep 30 2016 Daniel Steiner <dsteiner@redhat.com> - 16d-2
|
|
- First build for CentOS 7
|
|
|