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