Changes of Revision 5
[-] | Added | libstatgrab.spec |
x 1
2 +# norootforbuild 3 + 4 +%define soname 6 5 + 6 +%if %suse_version >= 1030 7 +Name: libstatgrab%{soname} 8 +%else 9 +Name: libstatgrab 10 +%endif 11 +Version: 0.15 12 +Release: 0 13 +Summary: Interface to System Statistics 14 +URL: http://www.i-scream.org/libstatgrab/ 15 +Source: ftp://ftp.i-scream.org/pub/i-scream/libstatgrab/libstatgrab-%{version}.tar.gz 16 +Source1: statgrab.desktop 17 +Source2: saidar.desktop 18 +Patch1: libstatgrab-os-linux.diff 19 +Patch2: libstatgrab-link-ncurses.diff 20 +Patch3: libstatgrab-fix-include-ncurses.patch 21 +Group: Development/Libraries/C and C++ 22 +License: GNU Library General Public License (LGPL) 23 +BuildRoot: %{_tmppath}/build-%{name}-%{version} 24 +BuildRequires: make gcc glibc-devel ncurses-devel 25 +BuildRequires: autoconf automake libtool update-desktop-files 26 + 27 +%description 28 +The libstatgrab library provides an easy-to-use interface for accessing system 29 +statistics and information. 30 +Available statistics include CPU, Load, Memory, Swap, Disk I/O, and Network 31 +I/O. It was developed to work on Linux, FreeBSD, and Solaris. 32 + 33 +The package also includes two tools: saidar provides a curses-based interface 34 +for viewing live system statistics, and statgrab is a sysctl-like interface to 35 +the statistics. 36 + 37 +%package -n libstatgrab-devel 38 +Summary: Development Environment for %{name} 39 +Requires: %{name} = %{version}-%{release} 40 +Group: Development/Libraries/C and C++ 41 +License: GNU Library General Public License (LGPL) 42 + 43 +%description -n libstatgrab-devel 44 +Development environment for %{name} (headers, library links, static library). 45 + 46 +%package -n statgrab 47 +Summary: Portable System Statistics Tools 48 +Requires: %{name} = %{version}-%{release} 49 +Group: System/Monitoring 50 +License: GNU General Public License (GPL) 51 + 52 +%description -n statgrab 53 +This package includes a couple of useful tools that use the %{name} library. 54 +- statgrab: gives a sysctl-style interface to the statistics gathered by libstatgrab 55 +This extends the use of libstatgrab to people writing scripts or anything else 56 +that can't easily make C function calls. 57 +Included with this package is a script to generate an MRTG configuration file 58 +to use statgrab. 59 + 60 +%package -n saidar 61 +Summary: Portable System Statistics Tools 62 +Requires: %{name} = %{version}-%{release} 63 +Group: System/Monitoring 64 +License: GNU General Public License (GPL) 65 + 66 +%description -n saidar 67 +This package includes a couple of useful tools that use the %{name} library. 68 +- saidar: provides a curses-based interface to viewing the current state of the system 69 +This extends the use of libstatgrab to people writing scripts or anything else 70 +that can't easily make C function calls. 71 + 72 +%debug_package 73 +%prep 74 +%setup -q -n "libstatgrab-%{version}" 75 +%patch1 76 +%patch2 77 +%patch3 78 + 79 +%build 80 +autoreconf -fiv 81 + 82 +%configure \ 83 + --with-ncurses \ 84 + --disable-setuid-binaries \ 85 + --disable-setgid-binaries \ 86 + --disable-examples \ 87 + --enable-statgrab \ 88 + --enable-saidar \ 89 + --enable-manpages 90 + 91 +%__make %{?jobs:-j%{jobs}} 92 + 93 +%install 94 +%makeinstall 95 + 96 +%__install -d "%{buildroot}%{_datadir}/applications" 97 +%__install -m 0644 "%{SOURCE1}" "%{buildroot}%{_datadir}/applications/" 98 +%__install -m 0644 "%{SOURCE2}" "%{buildroot}%{_datadir}/applications/" 99 +%suse_update_desktop_file -r saidar System Monitor 100 +%suse_update_desktop_file -r statgrab System Monitor 101 + 102 +# prepare doc files 103 +%__install -d "%{buildroot}%{_docdir}/%{name}" 104 +echo "%doc %dir %{_docdir}/%{name}" > rpmdocfiles.lst 105 +for f in AUTHORS ChangeLog COPYING* README NEWS PLATFORMS; do 106 + %__install -m0644 "$f" "%{buildroot}%{_docdir}/%{name}/" 107 + echo "%doc %{_docdir}/%{name}/${f}" >> rpmdocfiles.lst 108 +done 109 + 110 +%__rm -rf examples/Makefile* examples/.deps 111 +%__mv examples "%{buildroot}%{_docdir}/%{name}/" 112 + 113 +%post -p /sbin/ldconfig 114 + 115 +%postun -p /sbin/ldconfig 116 + 117 +%clean 118 +%__rm -rf "%{buildroot}" 119 + 120 +%files -f rpmdocfiles.lst 121 +%defattr(-,root,root) 122 +%{_libdir}/libstatgrab.so.%{soname} 123 +%{_libdir}/libstatgrab.so.%{soname}.* 124 + 125 +%files -n libstatgrab-devel 126 +%doc %{_docdir}/%{name}/examples 127 +%defattr(-,root,root) 128 +%{_includedir}/statgrab.h 129 +%{_includedir}/statgrab_deprecated.h 130 +%{_libdir}/libstatgrab.so 131 +%{_libdir}/libstatgrab.la 132 +%{_libdir}/libstatgrab.a 133 +%{_libdir}/pkgconfig/libstatgrab.pc 134 +%doc %{_mandir}/man3/sg_*.3* 135 +%doc %{_mandir}/man3/statgrab.3* 136 + 137 +%files -n statgrab 138 +%defattr(-,root,root) 139 +%doc COPYING 140 +%{_bindir}/statgrab 141 +%{_bindir}/statgrab-make-mrtg-config 142 +%{_bindir}/statgrab-make-mrtg-index 143 +%doc %{_mandir}/man1/statgrab.1* 144 +%doc %{_mandir}/man1/statgrab-make-mrtg-config.1* 145 +%doc %{_mandir}/man1/statgrab-make-mrtg-index.1* 146 +%{_datadir}/applications/statgrab.desktop 147 + 148 +%files -n saidar 149 +%defattr(-,root,root) 150 +%doc COPYING 151 +%{_bindir}/saidar 152 +%doc %{_mandir}/man1/saidar.1* 153 +%{_datadir}/applications/saidar.desktop 154 + 155 +%changelog 156 +* Sun Dec 30 2007 Pascal Bleser <guru@unixtech.be> 0.15 157 +- new upstream version 158 + 159 +* Wed Sep 12 2007 Pascal Bleser <guru@unixtech.be> 0.14 160 +- shared library policy for 10.3 161 +- moved to openSUSE Build Service 162 + 163 +* Mon Jan 8 2007 Pascal Bleser <guru@unixtech.be> 0.14-1 164 +- moved examples to -devel 165 +- added binary stripping on SUSE < 9.3 166 +- removed Packager and Distribution, injected by rpmmacros 167 +- new upstream version 168 + 169 +* Mon Mar 20 2006 Pascal Bleser <guru@unixtech.be> 0.13-1 170 +- added -r flag to suse_update_desktop_file 171 +- added release in Requires signature for subpackages 172 +- removed explicit Requires 173 +- added -j to make 174 +- new upstream version 175 + 176 +* Mon Dec 26 2005 Pascal Bleser <guru@unixtech.be> 0.12-3 177 +- rewrote spec file 178 + 179 +* Mon Sep 19 2005 Pascal Bleser <guru@unixtech.be> 0.12-1 180 +- version 0.12 181 + 182 +* Mon Jul 26 2004 Pascal Bleser <guru@unixtech.be> 0.10.1-1 183 +- version 0.10.1 184 + 185 +* Sat Mar 20 2004 Pascal Bleser <guru@unixtech.be> 0.9-1 186 +- version 0.9 187 + 188 +* Wed Jan 21 2004 Pascal Bleser <guru@unixtech.be> 0.8.1-1 189 +- first RPM 190 + 191 +# Local Variables: 192 +# mode: rpm-spec 193 +# tab-width: 3 194 +# End: 195 |