]> git.pld-linux.org Git - SPECS.git/blob - sigar.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / sigar.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4
5 Summary:        SIGAR - System Information Gatherer And Reporter
6 Summary(pl.UTF-8):      SIGAR - narzędzie do zbierania i raportowania informacji systemowych
7 Name:           sigar
8 Version:        1.6.5
9 Release:        2
10 License:        Apache v2.0
11 Group:          Libraries
12 Source0:        %{name}-%{version}-58097d9.tbz2
13 # Source0-md5:  a8dfe38ed914a364943f746489b79539
14 URL:            http://sigar.hyperic.com/
15 BuildRequires:  ant >= 1.6.5
16 BuildRequires:  cmake
17 BuildRequires:  jdk >= 1.3
18 BuildRequires:  perl-base >= 5.6.1
19 BuildRequires:  sed >= 4.0
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
23 The Sigar API provides a portable interface for gathering system
24 information such as:
25 - System memory, swap, CPU, load average, uptime, logins
26 - Per-process memory, CPU, credential info, state, arguments,
27   environment, open files
28 - File system detection and metrics
29 - Network interface detection, configuration info and metrics
30 - Network route and connection tables
31
32 This information is available in most operating systems, but each OS
33 has their own way(s) providing it. SIGAR provides developers with one
34 API to access this information regardless of the underlying platform.
35 The core API is implemented in pure C with bindings currently
36 implemented for Java, Perl and C#.
37
38 %description -l pl.UTF-8
39 Sigar API udostępnia przenośny interfejs do zbierania informacji
40 systemowych, takich jak:
41 - systemowa pamięć, swap, procesor, obciążenie, czas pracy, logowania
42 - informacje dla procesów: pamięć, wykorzystanie procesora,
43   uprawnienia, stan, argumenty, środowisko, otwarte pliki
44 - wykrywanie i pomiary systemów plików
45 - wykrywanie informacji sieciowych, informacje o konfiguracji i
46   pomiary
47 - tablice tras i połączeń sieciowych
48
49 Informacje te są dostępne w większości systemów operacyjnych, ale
50 każdy system ma własny sposób udostępniania ich. SIGAR udostępnia
51 programistom jedno API pozwalające na dostęp dotych informacji
52 niezależnie od platformy. Podstawowe API jest zaimplementowane w
53 czystym C, z wiązaniami dla Javy, Perla i C#.
54
55 %package devel
56 Summary:        SIGAR Development package - System Information Gatherer And Reporter
57 Group:          Development/Libraries
58 Requires:       %{name} = %{version}-%{release}
59
60 %description devel
61 Header files for developing against the Sigar API
62
63 %package -n java-%{name}
64 Summary:        Java bindings to sigar library
65 Group:          Libraries/Java
66 # does not use base library
67
68 %description -n java-%{name}
69 Java bindings to Sigar library.
70
71 %prep
72 %setup -q
73
74 %{__sed} -i -e 's,DESTINATION lib$,DESTINATION %{_lib},' src/CMakeLists.txt
75
76 %build
77 install -d build
78 cd build
79 %cmake ..
80 %{__make}
81
82 cd ../bindings/java
83 %ant
84 chmod a+rx sigar-bin/lib/lib*.so
85
86 %if %{with tests}
87 %java -jar sigar-bin/lib/sigar.jar test
88 %endif
89 cd ../..
90
91 %install
92 rm -rf $RPM_BUILD_ROOT
93 install -d $RPM_BUILD_ROOT
94 %{__make} -C build install \
95         DESTDIR=$RPM_BUILD_ROOT
96
97 install -d $RPM_BUILD_ROOT%{_javadir}
98 install -p bindings/java/sigar-bin/lib/libsigar-*-*.so $RPM_BUILD_ROOT%{_libdir}
99 cp -p bindings/java/sigar-bin/lib/sigar.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
100 ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
101
102 %clean
103 rm -rf $RPM_BUILD_ROOT
104
105 # no SONAME, but run ldconfig to update ld.so.cache
106 %post   -p /sbin/ldconfig
107 %postun -p /sbin/ldconfig
108
109 %post   -n java-%{name} -p /sbin/ldconfig
110 %postun -n java-%{name} -p /sbin/ldconfig
111
112 %files
113 %defattr(644,root,root,755)
114 %doc AUTHORS ChangeLog NOTICE README
115 %attr(755,root,root) %{_libdir}/libsigar.so
116
117 %files devel
118 %defattr(644,root,root,755)
119 %{_includedir}/sigar*.h
120
121 %files -n java-%{name}
122 %defattr(644,root,root,755)
123 %{_javadir}/sigar-%{version}.jar
124 %{_javadir}/sigar.jar
125 %attr(755,root,root) %{_libdir}/libsigar-*-*.so
This page took 0.132146 seconds and 3 git commands to generate.