]>
Commit | Line | Data |
---|---|---|
5db175a1 | 1 | # TODO: |
5db175a1 | 2 | # - daemon init script |
ce0d47d3 | 3 | # - where should arch-dependent .jar be packaged? |
6961ea6a | 4 | # - add -module to plugins build? |
a06ea685 ER |
5 | # |
6 | # Conditional build: | |
fd5cd5a5 JB |
7 | %bcond_without cim # CIM plugin (sblim-sfcc based) |
8 | %bcond_without java # Java bindings | |
9 | %bcond_without perl # Perl bindings | |
d73560d5 JB |
10 | %bcond_without python # Python bindings (any) |
11 | %bcond_without python2 # Python 2.x bindings | |
12 | %bcond_without python3 # Python 3.x bindings | |
fd5cd5a5 | 13 | %bcond_without ruby # Ruby bindings |
a06ea685 | 14 | |
d73560d5 JB |
15 | %if %{without python} |
16 | %undefine with_python2 | |
17 | %undefine with_python3 | |
18 | %endif | |
afeccb92 JP |
19 | |
20 | %{?with_java:%{?use_default_jdk}} | |
21 | ||
5db175a1 | 22 | Summary: Implementation of the Web Services Management specification (WS-Management) |
15f3efed | 23 | Summary(pl.UTF-8): Implementacja specyfikacji Web Services Management (WS-Management) |
5db175a1 | 24 | Name: openwsman |
be438323 | 25 | Version: 2.7.2 |
ede0d4fe | 26 | Release: 2 |
5db175a1 AM |
27 | License: BSD |
28 | Group: Libraries | |
884d03c4 | 29 | #Source0Download: https://github.com/Openwsman/openwsman/tags |
6961ea6a | 30 | Source0: https://github.com/Openwsman/openwsman/archive/v%{version}/%{name}-%{version}.tar.gz |
be438323 | 31 | # Source0-md5: 98b3cb081eb387998565ce23fed4f7ec |
747b7da9 MK |
32 | Patch0: rdoc-rubygems.patch |
33 | Patch1: %{name}-python.patch | |
6961ea6a | 34 | URL: https://github.com/Openwsman |
84dc1240 | 35 | BuildRequires: cmake >= 2.8.12 |
396be572 | 36 | BuildRequires: curl-devel >= 7.12.0 |
fd5cd5a5 JB |
37 | %if %{with ruby} |
38 | %if %(locale -a | grep -q '^en_US$'; echo $?) | |
39 | BuildRequires: glibc-localedb-all | |
40 | %endif | |
41 | %endif | |
afeccb92 | 42 | %{?with_java:%{?use_jdk:%buildrequires_jdk}%{!?use_jdk:BuildRequires: jdk}} |
993872f2 | 43 | BuildRequires: libstdc++-devel |
396be572 | 44 | BuildRequires: libxml2-devel >= 2.0 |
5db175a1 | 45 | BuildRequires: openssl-devel |
993872f2 | 46 | BuildRequires: pam-devel |
fd5cd5a5 | 47 | %{?with_perl:BuildRequires: perl-devel} |
993872f2 | 48 | BuildRequires: pkgconfig |
d73560d5 | 49 | %{?with_python2:BuildRequires: python-devel >= 2} |
84753349 | 50 | %{?with_python2:BuildRequires: python-modules >= 2} |
d73560d5 | 51 | %{?with_python3:BuildRequires: python3-devel >= 1:3.2} |
84753349 | 52 | %{?with_python3:BuildRequires: python3-modules >= 1:3.2} |
afeccb92 | 53 | BuildRequires: rpmbuild(macros) >= 2.021 |
fd5cd5a5 JB |
54 | %{?with_ruby:BuildRequires: ruby-devel >= 1.9} |
55 | %{?with_cim:BuildRequires: sblim-sfcc-devel} | |
15f3efed | 56 | BuildRequires: sed >= 4.0 |
138a0c32 JB |
57 | BuildRequires: swig >= 2.0.5 |
58 | %{?with_perl:BuildRequires: swig-perl >= 2.0.5} | |
59 | %{?with_python:BuildRequires: swig-python >= 2.0.5} | |
60 | %{?with_ruby:BuildRequires: swig-ruby >= 2.0.5} | |
685db724 | 61 | Requires: %{name}-libs = %{version}-%{release} |
5db175a1 AM |
62 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
63 | ||
396be572 | 64 | # plugins use symbols from libraries, client libs have circular dependencies with libwsman |
a8b066fd | 65 | %define skip_post_check_so .*%{_libdir}/openwsman/.* libwsman_client.so.* libwsman_curl_client_transport.so.* libwsman_server.so.1.0.0 libwsman_clientpp.so.1.0.0 libwsman.so.1.0.0 |
396be572 | 66 | |
5db175a1 AM |
67 | %description |
68 | Openwsman is a project intended to provide an open-source | |
69 | implementation of the Web Services Management specification | |
70 | (WS-Management) and to expose system management information on the | |
71 | Linux operating system using the WS-Management protocol. WS-Management | |
72 | is based on a suite of web services specifications and usage | |
73 | requirements that exposes a set of operations focused on and covers | |
74 | all system management aspects. | |
75 | ||
15f3efed JB |
76 | %description -l pl.UTF-8 |
77 | Openwsman to projekt, którego celem jest zapewnienie mającej otwarte | |
78 | źródła implementacji specyfikacji Web Services Management | |
79 | (WS-Management) i udostępnienie informacji związanych z zarządzaniem | |
80 | systemem pod Linuksem poprzez protokół WS-Management. WS-Management | |
81 | jest oparty na zbiorze specyfikacji i wymaganiach usług WWW, | |
82 | udostępniających zbiór operacji pokrywających wszystkie aspekty | |
83 | zarządzania systemem. | |
84 | ||
685db724 JB |
85 | %package libs |
86 | Summary: Shared openwsman libraries | |
87 | Summary(pl.UTF-8): Biblioteki współdzielone openwsman | |
88 | Group: Libraries | |
89 | Conflicts: openwsman < 2.2.6 | |
90 | ||
91 | %description libs | |
92 | Shared openwsman libraries. | |
93 | ||
94 | %description libs -l pl.UTF-8 | |
95 | Biblioteki współdzielone openwsman. | |
96 | ||
5db175a1 | 97 | %package devel |
15f3efed JB |
98 | Summary: Header files for openwsman |
99 | Summary(pl.UTF-8): Pliki nagłówkowe openwsman | |
5db175a1 | 100 | Group: Development/Libraries |
685db724 | 101 | Requires: %{name}-libs = %{version}-%{release} |
884d03c4 | 102 | Obsoletes: openwsman-static < 2.2 |
5db175a1 AM |
103 | |
104 | %description devel | |
15f3efed JB |
105 | Header files for openwsman. |
106 | ||
107 | %description devel -l pl.UTF-8 | |
108 | Pliki nagłówkowe openwsman. | |
5db175a1 | 109 | |
ce0d47d3 JB |
110 | %package -n java-openwsman |
111 | Summary: Java bindings for openwsman libraries | |
112 | Summary(pl.UTF-8): Wiązania Javy do bibliotek openwsman | |
113 | Group: Libraries/Java | |
114 | Requires: %{name}-libs = %{version}-%{release} | |
115 | Requires: jre | |
116 | ||
117 | %description -n java-openwsman | |
118 | Java bindings for openwsman libraries. | |
119 | ||
120 | %description -n java-openwsman -l pl.UTF-8 | |
121 | Wiązania Javy do bibliotek openwsman. | |
122 | ||
685db724 JB |
123 | %package -n perl-openwsman |
124 | Summary: Perl bindings for openwsman libraries | |
125 | Summary(pl.UTF-8): Wiązania Perla do bibliotek openwsman | |
126 | Group: Development/Languages/Perl | |
127 | Requires: %{name}-libs = %{version}-%{release} | |
128 | ||
129 | %description -n perl-openwsman | |
130 | Perl bindings for openwsman libraries. | |
131 | ||
132 | %description -n perl-openwsman -l pl.UTF-8 | |
133 | Wiązania Perla do bibliotek openwsman. | |
134 | ||
135 | %package -n python-openwsman | |
d73560d5 JB |
136 | Summary: Python 2 bindings for openwsman libraries |
137 | Summary(pl.UTF-8): Wiązania Pythona 2 do bibliotek openwsman | |
ce0d47d3 | 138 | Group: Libraries/Python |
685db724 | 139 | Requires: %{name}-libs = %{version}-%{release} |
6961ea6a | 140 | Requires: python-libs |
685db724 JB |
141 | |
142 | %description -n python-openwsman | |
d73560d5 | 143 | Python 2 bindings for openwsman libraries. |
685db724 JB |
144 | |
145 | %description -n python-openwsman -l pl.UTF-8 | |
d73560d5 JB |
146 | Wiązania Pythona 2 do bibliotek openwsman. |
147 | ||
148 | %package -n python3-openwsman | |
149 | Summary: Python 3 bindings for openwsman libraries | |
150 | Summary(pl.UTF-8): Wiązania Pythona 3 do bibliotek openwsman | |
151 | Group: Libraries/Python | |
152 | Requires: %{name}-libs = %{version}-%{release} | |
153 | Requires: python3-libs >= 1:3.2 | |
154 | ||
155 | %description -n python3-openwsman | |
156 | Python 3 bindings for openwsman libraries. | |
157 | ||
158 | %description -n python3-openwsman -l pl.UTF-8 | |
159 | Wiązania Pythona 3 do bibliotek openwsman. | |
685db724 | 160 | |
ce0d47d3 JB |
161 | %package -n ruby-openwsman |
162 | Summary: Ruby bindings for openwsman libraries | |
163 | Summary(pl.UTF-8): Wiązania języka Ruby do bibliotek openwsman | |
164 | Group: Development/Languages | |
165 | Requires: %{name}-libs = %{version}-%{release} | |
166 | Requires: ruby | |
167 | ||
168 | %description -n ruby-openwsman | |
169 | Ruby bindings for openwsman libraries. | |
170 | ||
171 | %description -n ruby-openwsman -l pl.UTF-8 | |
172 | Wiązania języka Ruby do bibliotek openwsman. | |
173 | ||
5db175a1 AM |
174 | %prep |
175 | %setup -q | |
396be572 JB |
176 | %undos src/cpp/CMakeLists.txt |
177 | %patch0 -p1 | |
ce0d47d3 | 178 | %patch1 -p1 |
ce0d47d3 | 179 | |
5db175a1 | 180 | %build |
396be572 JB |
181 | install -d build |
182 | cd build | |
183 | %cmake .. \ | |
a06ea685 | 184 | %if %{with java} |
afeccb92 | 185 | -DJAVA_HOME:PATH="%{java_home}" \ |
a06ea685 ER |
186 | -DJAVA_INCLUDE_PATH=%{java_home}/include \ |
187 | %else | |
d73560d5 | 188 | -DBUILD_JAVA=OFF \ |
a06ea685 | 189 | %endif |
d73560d5 JB |
190 | %{!?with_cim:-DBUILD_LIBCIM=OFF} \ |
191 | %{!?with_perl:-DBUILD_PERL=OFF} \ | |
192 | %{!?with_python2:-DBUILD_PYTHON=OFF} \ | |
193 | -DBUILD_PYTHON3=OFF \ | |
194 | -DBUILD_RUBY=%{!?with_ruby:OFF}%{?with_ruby:ON} \ | |
d59a0e35 | 195 | -DPACKAGE_ARCHITECTURE=%{_target_cpu} \ |
d73560d5 | 196 | %{?with_python2:-DPYTHON_EXECUTABLE=%{__python}} \ |
93eab964 | 197 | -DRUBY_HAS_VENDOR_RUBY:BOOL=ON |
5db175a1 | 198 | |
fd5cd5a5 JB |
199 | # ruby .gemspec contains non-ascii characters, build fails with C locale |
200 | %{?with_ruby:LC_ALL=en_US} \ | |
9f80c555 | 201 | %{__make} -j1 |
6961ea6a | 202 | |
d73560d5 JB |
203 | cd .. |
204 | ||
205 | %if %{with python3} | |
206 | install -d build-python3 | |
207 | cd build-python3 | |
208 | %cmake .. \ | |
209 | -DBUILD_JAVA=OFF \ | |
210 | %{!?with_cim:-DBUILD_LIBCIM=ON} \ | |
211 | -DBUILD_PERL=OFF \ | |
212 | -DBUILD_PYTHON=OFF \ | |
213 | -DBUILD_PYTHON3=ON \ | |
214 | -DBUILD_RUBY=OFF \ | |
215 | -DPACKAGE_ARCHITECTURE=%{_target_cpu} \ | |
216 | -DPYTHON_EXECUTABLE=%{__python3} | |
217 | ||
218 | %{__make} -j1 | |
219 | %endif | |
220 | ||
5db175a1 AM |
221 | %install |
222 | rm -rf $RPM_BUILD_ROOT | |
396be572 | 223 | install -d $RPM_BUILD_ROOT/var/lib/openwsman/subscriptions |
5db175a1 | 224 | |
d73560d5 JB |
225 | %if %{with python3} |
226 | %{__make} -C build-python3 install \ | |
227 | DESTDIR=$RPM_BUILD_ROOT | |
228 | ||
229 | %py3_comp $RPM_BUILD_ROOT%{py3_sitedir} | |
230 | %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir} | |
231 | %endif | |
232 | ||
396be572 | 233 | %{__make} -C build install \ |
5db175a1 AM |
234 | DESTDIR=$RPM_BUILD_ROOT |
235 | ||
d73560d5 | 236 | %if %{with python2} |
685db724 JB |
237 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
238 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
239 | %py_postclean | |
d73560d5 | 240 | %endif |
685db724 | 241 | |
5db175a1 AM |
242 | %clean |
243 | rm -rf $RPM_BUILD_ROOT | |
244 | ||
685db724 JB |
245 | %post libs -p /sbin/ldconfig |
246 | %postun libs -p /sbin/ldconfig | |
5db175a1 AM |
247 | |
248 | %files | |
249 | %defattr(644,root,root,755) | |
6961ea6a | 250 | %doc AUTHORS ChangeLog README.md TODO |
5db175a1 | 251 | %attr(755,root,root) %{_sbindir}/openwsmand |
5db175a1 AM |
252 | %dir %{_libdir}/openwsman |
253 | %dir %{_libdir}/openwsman/authenticators | |
396be572 | 254 | %attr(755,root,root) %{_libdir}/openwsman/authenticators/libwsman_*.so* |
5db175a1 | 255 | %dir %{_libdir}/openwsman/plugins |
396be572 | 256 | %attr(755,root,root) %{_libdir}/openwsman/plugins/libwsman_*.so* |
6961ea6a | 257 | %attr(755,root,root) %{_libdir}/openwsman/plugins/libredirect.so* |
396be572 JB |
258 | %dir %{_sysconfdir}/openwsman |
259 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/openwsman/openwsman.conf | |
93eab964 | 260 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/openwsman/openwsman_client.conf |
396be572 JB |
261 | %attr(754,root,root) %{_sysconfdir}/openwsman/owsmangencert.sh |
262 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/openwsman/ssleay.cnf | |
263 | %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/openwsman | |
6961ea6a | 264 | %dir /var/lib/openwsman |
83b69cfd | 265 | %dir /var/lib/openwsman/subscriptions |
5db175a1 | 266 | |
685db724 JB |
267 | %files libs |
268 | %defattr(644,root,root,755) | |
269 | %attr(755,root,root) %{_libdir}/libwsman.so.*.*.* | |
270 | %attr(755,root,root) %ghost %{_libdir}/libwsman.so.1 | |
271 | %attr(755,root,root) %{_libdir}/libwsman_client.so.*.*.* | |
3cecb8b7 | 272 | %attr(755,root,root) %ghost %{_libdir}/libwsman_client.so.5 |
685db724 JB |
273 | %attr(755,root,root) %{_libdir}/libwsman_clientpp.so.*.*.* |
274 | %attr(755,root,root) %ghost %{_libdir}/libwsman_clientpp.so.1 | |
275 | %attr(755,root,root) %{_libdir}/libwsman_curl_client_transport.so.*.*.* | |
276 | %attr(755,root,root) %ghost %{_libdir}/libwsman_curl_client_transport.so.1 | |
277 | %attr(755,root,root) %{_libdir}/libwsman_server.so.*.*.* | |
278 | %attr(755,root,root) %ghost %{_libdir}/libwsman_server.so.1 | |
279 | ||
5db175a1 AM |
280 | %files devel |
281 | %defattr(644,root,root,755) | |
396be572 JB |
282 | %attr(755,root,root) %{_libdir}/libwsman.so |
283 | %attr(755,root,root) %{_libdir}/libwsman_client.so | |
284 | %attr(755,root,root) %{_libdir}/libwsman_clientpp.so | |
285 | %attr(755,root,root) %{_libdir}/libwsman_curl_client_transport.so | |
286 | %attr(755,root,root) %{_libdir}/libwsman_server.so | |
5db175a1 | 287 | %{_includedir}/openwsman |
396be572 JB |
288 | %{_pkgconfigdir}/openwsman.pc |
289 | %{_pkgconfigdir}/openwsman++.pc | |
290 | %{_pkgconfigdir}/openwsman-server.pc | |
685db724 | 291 | |
a06ea685 | 292 | %if %{with java} |
ce0d47d3 JB |
293 | %files -n java-openwsman |
294 | %defattr(644,root,root,755) | |
3cecb8b7 | 295 | %{_javadir}/openwsman-%{_target_cpu}-%{version}.jar |
a06ea685 | 296 | %endif |
ce0d47d3 | 297 | |
685db724 JB |
298 | %files -n perl-openwsman |
299 | %defattr(644,root,root,755) | |
685db724 | 300 | %{perl_vendorlib}/openwsman.pm |
6961ea6a | 301 | %attr(755,root,root) %{perl_vendorarch}/openwsman.so |
685db724 | 302 | |
d73560d5 | 303 | %if %{with python2} |
685db724 JB |
304 | %files -n python-openwsman |
305 | %defattr(644,root,root,755) | |
685db724 | 306 | %{py_sitedir}/pywsman.py[co] |
6961ea6a | 307 | %attr(755,root,root) %{py_sitedir}/_pywsman.so |
d73560d5 JB |
308 | %endif |
309 | ||
310 | %if %{with python3} | |
311 | %files -n python3-openwsman | |
312 | %defattr(644,root,root,755) | |
313 | %{py3_sitedir}/pywsman.py | |
314 | %{py3_sitedir}/__pycache__/pywsman.cpython-*.py[co] | |
315 | %attr(755,root,root) %{py3_sitedir}/_pywsman.so | |
316 | %endif | |
ce0d47d3 | 317 | |
d59a0e35 | 318 | %if %{with ruby} |
ce0d47d3 JB |
319 | %files -n ruby-openwsman |
320 | %defattr(644,root,root,755) | |
b97ca65a | 321 | %attr(755,root,root) %{_bindir}/winrs |
8b81a7dd | 322 | %{ruby_vendorlibdir}/openwsmanplugin.rb |
6961ea6a | 323 | %{ruby_vendorlibdir}/openwsman.rb |
8b81a7dd | 324 | %{ruby_vendorlibdir}/openwsman |
6961ea6a | 325 | %attr(755,root,root) %{ruby_vendorarchdir}/_openwsman.so |
d59a0e35 | 326 | %endif |