0d06789
%define shortname	statgrab
0d06789
0d06789
Summary:		Make system statistics
0d06789
Name:			libstatgrab
0d06789
9e86ab9
Version:		0.16
38003c0
Release:		3%{?dist}
0d06789
5604e5b
Source0:		http://ftp.i-scream.org/pub/i-scream/%{name}/%{name}-%{version}.tar.gz
0d06789
Patch0:			%{name}.nochmod.patch
0d06789
ed4d6fe
License:		LGPLv2+
0d06789
Group:			System Environment/Libraries
0d06789
URL:			http://www.i-scream.org/%{name}/
0d06789
0d06789
BuildRoot:		%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
0d06789
BuildRequires:	libtool ncurses-devel
0d06789
0d06789
%description
0d06789
Libstatgrab is a library that provides cross platform access to statistics
0d06789
about the system on which it's run. It's written in C and presents a selection
0d06789
of useful interfaces which can be used to access key system statistics. The
0d06789
current list of statistics includes CPU usage, memory utilisation, disk usage,
0d06789
process counts, network traffic, disk I/O, and more. 
0d06789
0d06789
The current list of platforms is Solaris 2.x, Linux, and FreeBSD 4.x/5.x.
0d06789
The aim is to extend this to include as many operating systems as possible. 
0d06789
0d06789
The package also includes a couple of useful tools. The first, saidar,
0d06789
provides a curses-based interface to viewing the current state of the 
0d06789
system. The second, statgrab, gives a sysctl-style interface to the
0d06789
statistics gathered by libstatgrab. This extends the use of libstatgrab
0d06789
to people writing scripts or anything else that can't easily make C 
0d06789
function calls. Included with statgrab is a script to generate an MRTG
0d06789
configuration file to use statgrab. 
0d06789
0d06789
%package -n %{shortname}-tools
0d06789
Summary: Tools from %{name} to monitoring the system
ed4d6fe
License: GPLv2+
0d06789
Group: Applications/System
0d06789
0d06789
%description -n %{shortname}-tools
0d06789
This package contains a few tools shiped with libstatgrab.
0d06789
Eg. A tool called saidar, which shows various system
0d06789
information like top, but - of course - OTHER informations.
0d06789
0d06789
%package devel
0d06789
Summary: The development files from %{name}
0d06789
Group: Development/Libraries
0d06789
Requires: %{name} = %{version}-%{release}
0d06789
Requires: pkgconfig
0d06789
0d06789
%description devel
0d06789
This package contains header files and man pages for those
0d06789
use to develop libstatgrab based applications.
0d06789
0d06789
%package examples
0d06789
Summary: The example files from %{name}
ed4d6fe
License: GPLv2+
0d06789
Group: Development/Tools
0d06789
Requires: %{name} = %{version}-%{release}
0d06789
0d06789
%description examples
0d06789
This package contains various examples used to show how
0d06789
to develop libstatgrab based applications.
0d06789
0d06789
%prep
0d06789
%setup -q
0d06789
%patch0 -p0
0d06789
0d06789
%build
0d06789
%configure --with-ncurses
ed4d6fe
ed4d6fe
# remove rpath from libtool
ed4d6fe
# shamelessly stolen from cinepaint.spec (thanks!)
ed4d6fe
sed -i.rpath 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
ed4d6fe
sed -i.rpath 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
ed4d6fe
0d06789
make %{?_smp_mflags}
0d06789
0d06789
%install
0d06789
rm -rf $RPM_BUILD_ROOT
0d06789
make install DESTDIR=$RPM_BUILD_ROOT
0d06789
cd examples/.libs
0d06789
install -m 755 cpu_usage disk_traffic load_stats network_iface_stats \
b9f5879
	network_traffic os_info page_stats process_snapshot \
b9f5879
	process_stats user_list vm_stats $RPM_BUILD_ROOT%{_bindir}
0d06789
chmod 755 $RPM_BUILD_ROOT%{_bindir}/statgrab-make-mrtg-config
0d06789
chmod 755 $RPM_BUILD_ROOT%{_bindir}/saidar
0d06789
chmod 755 $RPM_BUILD_ROOT%{_bindir}/statgrab
0d06789
0d06789
%clean
0d06789
rm -rf $RPM_BUILD_ROOT
0d06789
0d06789
%post -p /sbin/ldconfig
0d06789
0d06789
%postun -p /sbin/ldconfig
0d06789
0d06789
%files -n %shortname-tools
0d06789
%defattr(-,root,root)
0d06789
%doc COPYING
0d06789
%{_bindir}/saidar
0d06789
%{_bindir}/statgrab
0d06789
%{_bindir}/statgrab-make-mrtg-config
0d06789
%{_bindir}/statgrab-make-mrtg-index
0d06789
%{_mandir}/*/statgrab*
e82d780
%{_mandir}/*/saidar*
0d06789
0d06789
%files
0d06789
%defattr(-,root,root)
0d06789
%doc AUTHORS INSTALL README ChangeLog NEWS COPYING.LGPL examples/*.c
0d06789
%{_libdir}/*.so.*
0d06789
0d06789
%files devel
0d06789
%defattr(-,root,root)
0d06789
%{_libdir}/*.so
0d06789
%{_libdir}/*.a
0d06789
%{_libdir}/*.la
0d06789
%{_includedir}/*.h
0d06789
%{_libdir}/pkgconfig/%name.pc
0d06789
%{_mandir}/*/sg_*
0d06789
0d06789
%files examples
0d06789
%defattr(-,root,root)
0d06789
%{_bindir}/cpu_usage
0d06789
%{_bindir}/disk_traffic
0d06789
%{_bindir}/load_stats
0d06789
%{_bindir}/network_iface_stats
0d06789
%{_bindir}/network_traffic
0d06789
%{_bindir}/os_info
0d06789
%{_bindir}/page_stats
0d06789
%{_bindir}/process_snapshot
0d06789
%{_bindir}/process_stats
0d06789
%{_bindir}/user_list
0d06789
%{_bindir}/vm_stats
0d06789
0d06789
%changelog
38003c0
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.16-3
38003c0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
38003c0
0cf5532
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.16-2
0cf5532
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
0cf5532
9e86ab9
* Thu Mar 20 2008 Oliver Falk <oliver@linux-kernel.at> 0.16-1
9e86ab9
- Update
9e86ab9
1e6950a
* Wed Feb 13 2008 Patrick "Jima" Laughton <jima@beer.tclug.org> 0.15-2
1e6950a
- Bump-n-build for GCC 4.3
1e6950a
ed4d6fe
* Mon Aug 20 2007 Patrick "Jima" Laughton <jima@beer.tclug.org> 0.15-1
ed4d6fe
- New upstream version
ed4d6fe
- License clarification
ed4d6fe
- Fixed License tags for statgrab-tools and libstatgrab-examples
ed4d6fe
- Fix for rpath (problem found in previous versions, as well)
ed4d6fe
b9f5879
* Wed Jan 24 2007 Patrick "Jima" Laughton <jima@beer.tclug.org> 0.14-1
b9f5879
- New upstream version
b9f5879
- Minor cleanup for rpmlint warning
b9f5879
fa1bbc3
* Wed Oct 04 2006 Patrick "Jima" Laughton <jima@beer.tclug.org> 0.13-3
fa1bbc3
- Bump-n-build
fa1bbc3
258e607
* Tue Sep 19 2006 Patrick "Jima" Laughton <jima@beer.tclug.org>	- 0.13-2
258e607
- Bump for FC6 rebuild
258e607
5604e5b
* Thu Apr 20 2006 Oliver Falk <oliver@linux-kernel.at>		- 0.13-1
5604e5b
- Update
5604e5b
e82d780
* Wed Aug 10 2005 Oliver Falk <oliver@linux-kernel.at>		- 0.12-1
e82d780
- Update
e82d780
- Added saidar manpage
e82d780
0d06789
* Fri Jul 08 2005 Oliver Falk <oliver@linux-kernel.at>		- 0.11.1-3
0d06789
- Included examples/*.c in doc
0d06789
0d06789
* Wed Jul  6 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.11.1-2
0d06789
- a lot of fixes for Fedora Extras
0d06789
0d06789
* Thu May 19 2005 Oliver Falk <oliver@linux-kernel.at>		- 0.11.1-1.1
0d06789
- Specfile cleanup
0d06789
0d06789
* Sun Apr 03 2005 Oliver Falk <oliver@linux-kernel.at>		- 0.11.1-1
0d06789
- Update
0d06789
0d06789
* Fri Mar 25 2005 Oliver Falk <oliver@linux-kernel.at>		- 0.11-2.1
0d06789
- Fix rpmlint warnings
0d06789
0d06789
* Tue Feb 15 2005 Oliver Falk <oliver@linux-kernel.at>		- 0.11-2
0d06789
- Don't require coreutils. They are normally installed on Fedora, but
0d06789
  not available on RH 8, where the tools are usually also installed.
0d06789
  Yes, rebuilding with nodeps would also do it, but it's not fine...
0d06789
0d06789
* Tue Feb 15 2005 Oliver Falk <oliver@linux-kernel.at>		- 0.11-1
0d06789
- Initial build for Fedora Core