File procinfo.spec of Package procinfo

#
# spec file for package procinfo (Version 18)
#
# Copyright (c) 2009 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:           procinfo
BuildRequires:  ncurses-devel
Url:            ftp://ftp.cistron.nl/pub/people/00-OLD/svm/
License:        GPL v2 or later
Group:          System/Monitoring
AutoReqProv:    on
Version:        18
Release:        201
Summary:        Display System Status Gathered from /proc
Provides:       ps:/usr/bin/lsdev
Source:         ftp://ftp.cistron.nl/pub/people/svm/%{name}-%{version}.tar.bz2
Patch0:         procinfo-%{version}.dif
Patch1:         procinfo-ia64.diff
Patch2:         procinfo-hz
Patch3:         procinfo-TERM.dif
Patch4:         procinfo-26.diff
Patch5:         procinfo-gccver.diff
Patch6:         procinfo-irq.dif
Patch7:         procinfo-loadavg.dif
Patch8:         procinfo-lsdev.dif
Patch9:         procinfo-socklist.dif
Patch10:        procinfo-float.dif
Patch11:        procinfo-intr.dif
Patch12:        procinfo-gcc.dif
Patch13:        procinfo-tickless.dif
Patch14:        procinfo-termcap.diff
Patch15:        procinfo-disks.dif
Patch16:        procinfo-gccver2.dif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
The "procinfo" command gathers some system data from the /proc
directory and prints it nicely formatted on the standard output device.



Authors:
--------
    Sander van Malssen <svm@kozmix.cistron.nl>

%prep
%setup -q
%patch0
%patch1
%patch2
%patch3
%patch4 -p1
%patch5 -p1
%patch6
%patch7
%patch8
%patch9
%patch10
%patch11
%patch12
%patch13
%if %suse_version > 1100
%patch14 -p1
%endif
%patch15
%patch16

%build
CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 ${RPM_OPT_FLAGS} -pipe"
CC=gcc
export CFLAGS CC
make LDFLAGS=
#
TERM=vt100
LANG=POSIX
unset ${!LC_*}
export TERM LANG
#
./procinfo -ai > output
! grep "can't parse" output
cat output

%install
make prefix=$RPM_BUILD_ROOT/usr install

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr (-,root,root,755)
%doc README CHANGES
%{_bindir}/procinfo
%{_bindir}/lsdev
%{_bindir}/socklist
%{_mandir}/man8/procinfo.8*
%{_mandir}/man8/lsdev.8*
%{_mandir}/man8/socklist.8*

%changelog
* Tue Jan 20 2009 werner@suse.de
- Don't be fooled by uncommon terminal settings during checks
* Mon Jan 12 2009 werner@suse.de
- Add check to avoid bug like bnc#464081
* Fri Jan 09 2009 werner@suse.de
- Do not be fooled by the newest gcc version string (bnc#464081)
* Tue Nov 11 2008 werner@suse.de
- Do not fail on long devices names in diskstats (bnc#441967)
* Fri Aug 22 2008 garloff@suse.de
- termcap.h has moved to ncurses/termcap.h.
* Thu Jul 10 2008 werner@suse.de
- Make it work even on tickless kernels (bnc#399342)
* Mon Apr 28 2008 werner@suse.de
- Use smaller buffer to parse long "intr" line from /proc/stat
* Fri Apr 25 2008 werner@suse.de
- Fix parsing strange gcc line within /proc/version (bnc#383721)
- Expand line buffer to fetch more the 4000 interrupts (bnc#383721)
* Tue Oct 23 2007 werner@suse.de
- Don't overwrite already allocted memory if the system has
  a huge number of interrupts (bug #335102)
- Copy only the labels of the used interrupts to save stack size
  (bug #335102)
* Mon Oct 22 2007 werner@suse.de
- Count number of interrupts even if line buffer is smaller than
  "intr" line of /proc/stat (bug #335102)
* Tue Jul 31 2007 werner@suse.de
- Modified version of last patch: include fractions of seconds
* Mon Jul 30 2007 werner@suse.de
- During time delay calculation cast result not parts to float and
  avoid sprint overflows (bug #295501)
* Tue Jun 05 2007 werner@suse.de
- Correct patch depth
* Mon Jun 04 2007 werner@suse.de
- Expand socklist to TCP/IPv6 (bug #280032)
* Tue Apr 17 2007 werner@suse.de
- Fix lsdev for ia64: there is no /proc/dma (bug #263740)
* Thu Mar 29 2007 rguenther@suse.de
- Add ncurses-devel BuildRequires
* Wed Dec 06 2006 werner@suse.de
- Fix buffer overflow due high load (bug #226253)
* Mon Nov 27 2006 werner@suse.de
- XEN kernels do not use timer irq  (bug #222035)
* Fri Nov 17 2006 werner@suse.de
- /proc/sys/kernel/HZ is gone use clock_getres with CLOCK_REALTIME
  for getting kernel space HZ (bug #222035)
* Mon Aug 07 2006 werner@suse.de
- For more than three disks show the last one only once (#196774)
* Mon Jul 17 2006 werner@suse.de
- Use sysconf(_SC_CLK_TCK) instead of HZ of user space
* Fri Jun 02 2006 werner@suse.de
- The members of the array used for storing irq are unsigned longs,
  many thansk to Harald Koenig.
* Fri Jun 02 2006 werner@suse.de
- The timer ticks on ix86 are given in kernel space HZ, use correct
  factor to get them into user space HZ (bug #56081)
* Fri May 26 2006 schwab@suse.de
- Don't strip binaries.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Mar 07 2005 mmj@suse.de
- Detect our gcc version correctly [#70954]
- Add disk stat hunks removed wrongly before
* Thu Mar 03 2005 mmj@suse.de
- Get info about pages and swap from /proc/vmstat [#64620]
  (Partly from procinfo@meisel.cc)
* Thu Feb 24 2005 garloff@suse.de
- The times in /proc/stat are in user HZ, not the kernel internal
  one (#56081 aka suse#41081).
* Tue Nov 09 2004 draht@suse.de
- procinfo should not refuse to run if TERM is not set, such as
  when running non-interactively from ssh.
* Fri Sep 24 2004 garloff@suse.de
- Read HZ from /proc/sys/kernel/HZ if existing, otherwise assume
  1000 for kernel 2.6, 100 for older ones. (#45707)
- Us it in calculation of load percentages. (#45707)
- Fix overflow in uptime output. (#41081)
* Mon Mar 01 2004 stepan@suse.de
- procinfo-ia64.diff: fix time conversion problem on ia64
* Sat Feb 14 2004 kukuk@suse.de
- Split from ps package
openSUSE Build Service is sponsored by