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