]>
Commit | Line | Data |
---|---|---|
dd65872b JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without log4cplus # log4cplus based logging | |
4 | ||
838f0d81 | 5 | Summary: Easy-to-use interface for accessing system statistics and information |
96f36ac2 | 6 | Summary(pl.UTF-8): Łatwy w użyciu interfejs dostępu do statystyk i informacji o systemie |
b559fb12 | 7 | Name: libstatgrab |
dd65872b | 8 | Version: 0.92.1 |
28bc4097 | 9 | Release: 1 |
e0491669 | 10 | License: LGPL v2.1+ |
b559fb12 | 11 | Group: Libraries |
58eaa90e | 12 | #Source0Download: https://github.com/libstatgrab/libstatgrab/releases/ |
dd65872b JB |
13 | Source0: https://github.com/libstatgrab/libstatgrab/releases/download/LIBSTATGRAB_0_92_1/%{name}-%{version}.tar.gz |
14 | # Source0-md5: af685494e985229e0ac46365bc0cd50e | |
1c21af1f | 15 | Patch0: %{name}-Makefile_fix.patch |
58eaa90e JB |
16 | URL: https://libstatgrab.org/ |
17 | BuildRequires: autoconf >= 2.69 | |
2bfd88c2 | 18 | BuildRequires: automake |
58eaa90e | 19 | BuildRequires: libtool >= 2:2 |
291619e3 | 20 | BuildRequires: linux-libc-headers >= 7:2.6.11.1-2 |
dd65872b JB |
21 | %{?with_log4cplus:BuildRequires: log4cplus-devel >= 1.0.5} |
22 | %{?with_log4cplus:Requires: log4cplus >= 1.0.5} | |
b559fb12 AG |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
24 | ||
25 | %description | |
2bfd88c2 JB |
26 | The libstatgrab library provides an easy-to-use interface for |
27 | accessing system statistics and information. Available statistics | |
28 | include CPU, Load, Memory, Swap, Disk I/O, and Network I/O. It was | |
29 | developed to work on Linux, FreeBSD, and Solaris. The package also | |
30 | includes two tools: saidar provides a curses-based interface for | |
31 | viewing live system statistics, and statgrab is a sysctl-like | |
32 | interface to the statistics. | |
33 | ||
51d3b709 JR |
34 | %description -l pl.UTF-8 |
35 | Biblioteka libstatgrab dostarcza łatwego w użyciu interfejsu dostępu | |
36 | do informacji i statystyk systemowych. Dostępne statystyki obejmują | |
37 | CPU, obciążenie, pamięć swap, dyskowe i sieciowe operacje we./wy. . | |
38 | libstatgrab został stworzony by działać na linuksie, FreeBSD i | |
39 | Solarisie. Pakiet zawiera także dwa narzędzia: saidar dostarcza | |
40 | bazującego na curses interfejsu do przeglądania statystyk systemu i | |
41 | statgrab, który jest interfejsem podobnym do sysctl dla statystyk. | |
b559fb12 AG |
42 | |
43 | %package devel | |
44 | Summary: Header files for libstatgrab library | |
96f36ac2 | 45 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libstatgrab |
b559fb12 | 46 | Group: Development/Libraries |
2bfd88c2 | 47 | Requires: %{name} = %{version}-%{release} |
dd65872b | 48 | %{?with_log4cplus:Requires: log4cplus-devel >= 1.0.5} |
b559fb12 AG |
49 | |
50 | %description devel | |
51 | Header files for libstatgrab library. | |
52 | ||
51d3b709 JR |
53 | %description devel -l pl.UTF-8 |
54 | Pliki nagłówkowe biblioteki libstatgrab. | |
b559fb12 AG |
55 | |
56 | %package static | |
57 | Summary: Static libstatgrab library | |
96f36ac2 | 58 | Summary(pl.UTF-8): Statyczna biblioteka libstatgrab |
b559fb12 | 59 | Group: Development/Libraries |
2bfd88c2 | 60 | Requires: %{name}-devel = %{version}-%{release} |
b559fb12 AG |
61 | |
62 | %description static | |
63 | Static libstatgrab library. | |
64 | ||
51d3b709 | 65 | %description static -l pl.UTF-8 |
b559fb12 AG |
66 | Statyczna biblioteka libstatgrab. |
67 | ||
70424a39 AF |
68 | %package -n statgrab |
69 | Summary: sysctl-style interface to system statistics | |
96f36ac2 | 70 | Summary(pl.UTF-8): Podobny do sysctl interfejs do statystyk systemu |
e0491669 | 71 | License: GPL v2+ |
70424a39 AF |
72 | Group: Applications/System |
73 | Requires: %{name} = %{version}-%{release} | |
74 | ||
75 | %description -n statgrab | |
5637b383 JB |
76 | statgrab provides a sysctl-style interface to all the system |
77 | statistics available through libstatgrab. This is useful for | |
78 | applications that don't want to make library calls, but still want to | |
79 | access the statistics. | |
70424a39 | 80 | |
5637b383 JB |
81 | An example of such an application is mrtg, for which scripts are |
82 | provided to generate configuration files. | |
83 | ||
51d3b709 JR |
84 | %description -n statgrab -l pl.UTF-8 |
85 | statgrab udostępnia podobny do sysctl interfejs do wszystkich | |
86 | statystyk systemu dostępnych poprzez libstatgrab. Jest to przydatne | |
87 | dla aplikacji nie chcących wykonywać wywołań bibliotecznych, ale | |
88 | chcących mieć dostęp do statystyk. | |
5637b383 | 89 | |
51d3b709 JR |
90 | Przykładem takiej aplikacji jest mrtg, dla którego dostępne są |
91 | skrypty do generowania plików konfiguracyjnych. | |
70424a39 AF |
92 | |
93 | %package -n saidar | |
94 | Summary: A curses-based tool for viewing system statistics | |
96f36ac2 | 95 | Summary(pl.UTF-8): Oparte na curses narzędzie do oglądania statystyk systemu |
e0491669 | 96 | License: GPL v2+ |
70424a39 AF |
97 | Group: Applications/System |
98 | Requires: %{name} = %{version}-%{release} | |
99 | ||
100 | %description -n saidar | |
5637b383 JB |
101 | saidar is a curses-based tool for viewing the system statistics |
102 | available through libstatgrab. Statistics include CPU, processes, | |
103 | load, memory, swap, network I/O, disk I/O, and file system | |
104 | information. | |
105 | ||
51d3b709 JR |
106 | %description -n saidar -l pl.UTF-8 |
107 | saidar to oparte na curses narzędzie do oglądania statystyk systemu | |
108 | dostępnych poprzez libstatgrab. Statystyki obejmują informacje o | |
109 | procesorach, procesach, obciążeniu, pamięci, swapie, operacjach we/wy | |
110 | sieciowych i dyskowych oraz systemach plików. | |
70424a39 | 111 | |
b559fb12 AG |
112 | %prep |
113 | %setup -q | |
1c21af1f | 114 | %patch0 -p1 |
b559fb12 AG |
115 | |
116 | %build | |
117 | %{__libtoolize} | |
118 | %{__aclocal} | |
119 | %{__autoconf} | |
120 | %{__autoheader} | |
121 | %{__automake} | |
70424a39 AF |
122 | %configure \ |
123 | --with-curses-prefix=/usr \ | |
124 | --with-ncurses \ | |
125 | --disable-setgid-binaries \ | |
dd65872b JB |
126 | --disable-setuid-binaries \ |
127 | %{?with_log4cplus:--enable-logging} | |
128 | ||
b559fb12 AG |
129 | %{__make} |
130 | ||
131 | %install | |
132 | rm -rf $RPM_BUILD_ROOT | |
b559fb12 AG |
133 | |
134 | %{__make} install \ | |
135 | DESTDIR=$RPM_BUILD_ROOT | |
136 | ||
dd65872b JB |
137 | # obsoleted by pkg-config |
138 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libstatgrab.la | |
139 | ||
b559fb12 AG |
140 | %clean |
141 | rm -rf $RPM_BUILD_ROOT | |
142 | ||
143 | %post -p /sbin/ldconfig | |
144 | %postun -p /sbin/ldconfig | |
145 | ||
146 | %files | |
147 | %defattr(644,root,root,755) | |
b2057784 | 148 | %doc AUTHORS ChangeLog NEWS README PLATFORMS |
e0491669 | 149 | %attr(755,root,root) %{_libdir}/libstatgrab.so.*.*.* |
28bc4097 | 150 | %attr(755,root,root) %ghost %{_libdir}/libstatgrab.so.10 |
b559fb12 AG |
151 | |
152 | %files devel | |
153 | %defattr(644,root,root,755) | |
70424a39 | 154 | %doc examples/*.c |
e0491669 | 155 | %attr(755,root,root) %{_libdir}/libstatgrab.so |
e0491669 JB |
156 | %{_includedir}/statgrab*.h |
157 | %{_pkgconfigdir}/libstatgrab.pc | |
28bc4097 AM |
158 | %{_mandir}/man3/libstatgrab.3* |
159 | %{_mandir}/man3/sg_*.3* | |
e0491669 | 160 | %{_mandir}/man3/statgrab.3* |
70424a39 | 161 | |
b559fb12 AG |
162 | %files static |
163 | %defattr(644,root,root,755) | |
e0491669 | 164 | %{_libdir}/libstatgrab.a |
70424a39 AF |
165 | |
166 | %files -n statgrab | |
167 | %defattr(644,root,root,755) | |
168 | %attr(755,root,root) %{_bindir}/statgrab* | |
dd65872b JB |
169 | %if %{with log4cplus} |
170 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/statgrab.properties | |
171 | %endif | |
e0491669 | 172 | %{_mandir}/man1/statgrab*.1* |
70424a39 AF |
173 | |
174 | %files -n saidar | |
175 | %defattr(644,root,root,755) | |
176 | %attr(755,root,root) %{_bindir}/saidar | |
dd65872b JB |
177 | %if %{with log4cplus} |
178 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/saidar.properties | |
179 | %endif | |
70424a39 | 180 | %{_mandir}/man1/saidar.1* |