]> git.pld-linux.org Git - packages/nmon.git/blobdiff - nmon.spec
- use minimal makefile
[packages/nmon.git] / nmon.spec
index 92c13524a6a554454e417e9ddc357178c0671482..f7ad531fbaa78b83a8062eae1cc5bd8662781902 100644 (file)
--- a/nmon.spec
+++ b/nmon.spec
@@ -1,7 +1,3 @@
-# $Id: nmon.spec,v 1.1 2009-11-26 17:34:53 blekot Exp $
-# Authority: dag
-# Upstream: Nigel Griffiths <nag$uk,ibm,com>
-
 Summary:       Performance analysis tool
 Name:          nmon
 Version:       12f
@@ -9,12 +5,11 @@ Release:      0.1
 License:       GPL
 Group:         Applications/System
 URL:           http://nmon.sourceforge.net/pmwiki.php
-Source0:       http://sourceforge.net/projects/nmon/files/lmon12f.c/download
-# Source0-md5:
-Source1:       http://sourceforge.net/projects/nmon/files/makefile/download
-# Source1-md5:
-Source2:       http://sourceforge.net/projects/nmon/files/Documentation.txt/download
-# Source2-md5:
+BuildRequires: ncurses-devel
+Source0:       http://downloads.sourceforge.net/project/nmon/lmon%{version}.c
+# Source0-md5: 36da7485cc16dccbd6f840359c76ad83
+Source1:       http://downloads.sourceforge.net/project/nmon/Documentation.txt
+# Source1-md5: dbb13658cf55d687c4f2ff771a696d4a
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 ExclusiveArch: %{ix86} %{x8664} ppc ppc64
@@ -24,31 +19,30 @@ nmon is designed for performance specialists to use for monitoring and
 analyzing performance data.
 
 %prep
-%setup -q -c -a1 -a2
+%setup -q -T -c
+install %{SOURCE0} nmon.c
+install %{SOURCE1} .
+
+cat <<'EOF' > Makefile
+nmon: nmon.o
+       $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
+EOF
 
 %build
+%{__make} nmon \
+       CC="%{__cc}" \
+       CFLAGS="%{rpmcflags} -Wall -I/usr/include/ncurses -D JFS -D GETUSER -D LARGEMEM" \
+       LDFLAGS="%{rpmldflags}" \
+       LIBS="-lncurses"
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%ifarch i386
-%{?fc5:%{__install} -Dp -m0755 nmon_x86_fedora5 $RPM_BUILD_ROOT%{_bindir}/nmon}
-%{?el4:%{__install} -Dp -m0755 nmon_x86_rhel4 $RPM_BUILD_ROOT%{_bindir}/nmon}
-%{?el3:%{__install} -Dp -m0755 nmon_x86_rhel3 $RPM_BUILD_ROOT%{_bindir}/nmon}
-%{?el2:%{__install} -Dp -m0755 nmon_x86_rhel2 $RPM_BUILD_ROOT%{_bindir}/nmon}
-%{?rh9:%{__install} -Dp -m0755 nmon_x86_redhat9 $RPM_BUILD_ROOT%{_bindir}/nmon}
-%endif
-%ifarch x86_64
-%{?fc6:%{__install} -Dp -m0755 nmon_x86_64_fedora6 $RPM_BUILD_ROOT%{_bindir}/nmon}
-%{?el4:%{__install} -Dp -m0755 nmon_x86_64_rhel4u4 $RPM_BUILD_ROOT%{_bindir}/nmon}
-%endif
-%ifarch ppc ppc64
-%{?el4:%{__install} -Dp -m0755 nmon_power_rhel4 $RPM_BUILD_ROOT%{_bindir}/nmon}
-%{?el3:%{__install} -Dp -m0755 nmon_power_rhel3 $RPM_BUILD_ROOT%{_bindir}/nmon}
-%endif
+install -D nmon $RPM_BUILD_ROOT%{_bindir}/nmon
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
+%doc Documentation.txt
 %attr(755,root,root) %{_bindir}/nmon
This page took 0.039664 seconds and 4 git commands to generate.