summaryrefslogtreecommitdiffstats
path: root/libstatgrab.spec
blob: 2f69c638a68844d2d20cba6a48c4ac3faec75980 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
%global pkgname statgrab

Name:           libstatgrab
Version:        0.17
Release:        7%{?dist}.2
Epoch:		1
Summary:        A library that provides cross platform access to statistics about the system
License:        LGPLv2+
URL:            http://www.i-scream.org/libstatgrab
Source0:        http://ftp.i-scream.org/pub/i-scream/%{name}/%{name}-%{version}.tar.gz
Patch0:		%{name}.nochmod.patch
BuildRequires:  libtool ncurses-devel

%description
Libstatgrab is a library that provides cross platform access to statistics
about the system on which it's run. It's written in C and presents a selection
of useful interfaces which can be used to access key system statistics. The
current list of statistics includes CPU usage, memory utilisation, disk usage,
process counts, network traffic, disk I/O, and more. 

The current list of platforms is Solaris 2.x, Linux, and FreeBSD 4.x/5.x.
The aim is to extend this to include as many operating systems as possible. 

The package also includes a couple of useful tools. The first, saidar,
provides a curses-based interface to viewing the current state of the 
system. The second, statgrab, gives a sysctl-style interface to the
statistics gathered by libstatgrab. This extends the use of libstatgrab
to people writing scripts or anything else that can't easily make C 
function calls. Included with statgrab is a script to generate an MRTG
configuration file to use statgrab. 

%package   -n   %{pkgname}-tools
Summary:        Tools from %{name} to monitoring the system
License:        GPLv2+

%description -n %{pkgname}-tools
This package contains a few tools shiped with libstatgrab.
Eg. A tool called saidar, which shows various system
information like top, but - of course - OTHER informations.

%package        devel
Summary:        The development files from %{name}
Requires:       %{name}%{?_isa} = %{epoch}:%{version}-%{release}

%description    devel
This package contains header files and man pages for those
use to develop libstatgrab based applications.

%package        examples
Summary:        The example files from %{name}
License:        GPLv2+
Requires:       %{name}%{?_isa} = %{epoch}:%{version}-%{release}

%description    examples
This package contains various examples used to show how
to develop libstatgrab based applications.

%prep
%setup -q
%patch0 -p0

%build
%configure --with-ncurses --disable-static
# remove rpath from libtool
sed -i.rpath 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i.rpath 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}

%install
make install DESTDIR=%{buildroot}
cd examples/.libs
install -m 755 cpu_usage disk_traffic load_stats network_iface_stats \
	network_traffic os_info page_stats process_snapshot \
	process_stats user_list vm_stats %{buildroot}%{_bindir}
chmod 755 %{buildroot}%{_bindir}/statgrab-make-mrtg-config
chmod 755 %{buildroot}%{_bindir}/saidar
chmod 755 %{buildroot}%{_bindir}/statgrab
find %{buildroot} -name '*.la' -delete

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%doc AUTHORS README ChangeLog NEWS COPYING.LGPL
%{_libdir}/*.so.*

%files devel
%doc examples/*.c
%{_libdir}/*.so
%{_includedir}/*.h
%{_libdir}/pkgconfig/%{name}.pc
%{_mandir}/*/sg_*

%files examples
%doc COPYING
%{_bindir}/cpu_usage
%{_bindir}/disk_traffic
%{_bindir}/load_stats
%{_bindir}/network_iface_stats
%{_bindir}/network_traffic
%{_bindir}/os_info
%{_bindir}/page_stats
%{_bindir}/process_snapshot
%{_bindir}/process_stats
%{_bindir}/user_list
%{_bindir}/vm_stats

%files -n %{pkgname}-tools
%doc COPYING
%{_bindir}/saidar
%{_bindir}/statgrab
%{_bindir}/statgrab-make-mrtg-config
%{_bindir}/statgrab-make-mrtg-index
%{_mandir}/*/*statgrab*
%{_mandir}/*/saidar*

%changelog
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:0.17-7.2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:0.17-6.2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Tue Sep 17 2013 Oliver Falk <oliver@linux-kernel.at> - 1:0.17-5.2
- Fix requires (epoch)

* Tue Sep 17 2013 Oliver Falk <oliver@linux-kernel.at> - 1:0.17-5.1
- Fix BZ#1008491 - too many broken deps

* Fri Aug 16 2013 Christopher Meng <rpm@cicku.me> - 0.90-2
- SPEC Cleanup.
- Remove unneeded Requires.

* Tue Aug 13 2013 Oliver Falk <oliver@linux-kernel.at> - 0.90-1
- Update
- Should fix BZ#925891

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.17-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Wed Jul 17 2013 Petr Pisar <ppisar@redhat.com> - 0.17-5
- Perl 5.18 rebuild

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.17-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.17-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.17-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Sun Apr 10 2011 Sven Lankes <sven@lank.es> - 0.17-1
- new upstream release 

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.16-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Thu Jan 27 2011 Oliver Falk <oliver@linux-kernel.at> 0.16-5
- Rebuild for new perl-5.12.3

* Fri Feb 12 2010 Oliver Falk <oliver@linux-kernel.at> 0.16-4
- Disable building of static libs #556075

* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.16-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.16-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Thu Mar 20 2008 Oliver Falk <oliver@linux-kernel.at> 0.16-1
- Update

* Wed Feb 13 2008 Patrick "Jima" Laughton <jima@beer.tclug.org> 0.15-2
- Bump-n-build for GCC 4.3

* Mon Aug 20 2007 Patrick "Jima" Laughton <jima@beer.tclug.org> 0.15-1
- New upstream version
- License clarification
- Fixed License tags for statgrab-tools and libstatgrab-examples
- Fix for rpath (problem found in previous versions, as well)

* Wed Jan 24 2007 Patrick "Jima" Laughton <jima@beer.tclug.org> 0.14-1
- New upstream version
- Minor cleanup for rpmlint warning

* Wed Oct 04 2006 Patrick "Jima" Laughton <jima@beer.tclug.org> 0.13-3
- Bump-n-build

* Tue Sep 19 2006 Patrick "Jima" Laughton <jima@beer.tclug.org>	- 0.13-2
- Bump for FC6 rebuild

* Thu Apr 20 2006 Oliver Falk <oliver@linux-kernel.at> - 0.13-1
- Update

* Wed Aug 10 2005 Oliver Falk <oliver@linux-kernel.at> - 0.12-1
- Update
- Added saidar manpage

* Fri Jul 08 2005 Oliver Falk <oliver@linux-kernel.at> - 0.11.1-3
- Included examples/*.c in doc

* Wed Jul  6 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.11.1-2
- a lot of fixes for Fedora Extras

* Thu May 19 2005 Oliver Falk <oliver@linux-kernel.at> - 0.11.1-1.1
- Specfile cleanup

* Sun Apr 03 2005 Oliver Falk <oliver@linux-kernel.at> - 0.11.1-1
- Update

* Fri Mar 25 2005 Oliver Falk <oliver@linux-kernel.at> - 0.11-2.1
- Fix rpmlint warnings

* Tue Feb 15 2005 Oliver Falk <oliver@linux-kernel.at> - 0.11-2
- Don't require coreutils. They are normally installed on Fedora, but
  not available on RH 8, where the tools are usually also installed.
  Yes, rebuilding with nodeps would also do it, but it's not fine...

* Tue Feb 15 2005 Oliver Falk <oliver@linux-kernel.at> - 0.11-1
- Initial build for Fedora Core