| # |
| # spec file for package openwsman (Version @VERSION@) |
| # |
| # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. |
| # |
| # All modifications and additions to the file contributed by third parties |
| # remain the property of their copyright owners, unless otherwise agreed |
| # upon. The license for this file, and modifications and additions to the |
| # file, is the same license as for the pristine package itself (unless the |
| # license for the pristine package is not an Open Source License, in which |
| # case the license is the MIT License). An "Open Source License" is a |
| # license that conforms to the Open Source Definition (Version 1.9) |
| # published by the Open Source Initiative. |
| |
| # Please submit bugfixes or comments via http://bugs.opensuse.org/ |
| # |
| |
| # norootforbuild |
| |
| |
| Name: openwsman |
| BuildRequires: gcc-c++ swig >= 1.3.30 |
| BuildRequires: libxml2-devel pam-devel sblim-sfcc-devel |
| BuildRequires: cmake |
| |
| BuildRequires: perl python-devel java-devel |
| |
| %if 0%{?rhel_version} > 0 |
| BuildRequires: -vim |
| %endif |
| |
| %if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel} |
| BuildRequires: curl-devel openssl-devel pkgconfig ruby ruby-devel ruby-rdoc |
| %if 0%{?fedora} > 0 |
| BuildRequires: perl-devel |
| %endif |
| %endif |
| |
| %if 0%{?suse_version} > 0 |
| |
| # No jni_md.h on SLE10 :-/ |
| #%if 0%{?suse_version} < 1100 |
| #BuildRequires: java-1_5_0-ibm-devel |
| #BuildRequires: libgcj-devel |
| #BuildRequires: update-alternatives |
| #%endif |
| |
| %if 0%{?suse_version} > 1010 |
| BuildRequires: fdupes libopenssl-devel |
| BuildRequires: libcurl-devel |
| %else |
| # SLE10 |
| BuildRequires: libidn-devel openssl-devel |
| BuildRequires: curl-devel |
| %endif |
| |
| %if 0%{?suse_version} > 910 |
| BuildRequires: ruby-devel |
| BuildRequires: pkg-config |
| %else |
| # SLE9 |
| BuildRequires: pkgconfig ruby |
| %endif |
| |
| %endif |
| |
| Requires(Pre): sed coreutils grep /bin/hostname |
| Version: @VERSION@ |
| Release: 1 |
| # Mandriva: |
| # Release %mkrel 1 |
| Url: http://www.openwsman.org/ |
| License: BSD3c(or similar) |
| Group: System/Management |
| Summary: Opensource Implementation of WS-Management |
| Source: %{name}-%{version}.tar.bz2 |
| Source1: %{name}.rpmlintrc |
| %if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel} |
| Source2: %{name}.pam.rh |
| Patch1: openwsman-initscript.patch |
| %else |
| Source2: %{name}.pam |
| %endif |
| Source3: %{name}.SuSEfirewall2 |
| Patch0: %{name}-pam-auth.patch |
| BuildRoot: %{_tmppath}/%{name}-%{version}-build |
| |
| %description |
| Opensource Implementation of WS-Management |
| |
| |
| |
| Authors: |
| -------- |
| Anas Nashif <anas.nashif@intel.com> |
| Vadim Revyakin <vadim.revyakin@intel.com> |
| Denis Sadykov <denis.sadykov@intel.com> |
| |
| %package -n libwsman1 |
| License: BSD3c(or similar) |
| Group: System/Management |
| Summary: Opensource Implementation of WS-Management |
| Provides: openwsman = %{version} |
| Obsoletes: openwsman < %{version} |
| |
| %description -n libwsman1 |
| Opensource Implementation of WS-Management |
| |
| |
| |
| Authors: |
| -------- |
| Anas Nashif <anas.nashif@intel.com> |
| Vadim Revyakin <vadim.revyakin@intel.com> |
| Denis Sadykov <denis.sadykov@intel.com> |
| |
| %package -n libwsman-devel |
| License: BSD3c(or similar) |
| Group: Development/Libraries/C and C++ |
| Summary: Opensource Implementation of WS-Management |
| Provides: openwsman-devel = %{version} |
| Obsoletes: openwsman-devel < %{version} |
| Requires: libwsman1 = %{version} |
| Requires: %{name}-server = %{version} |
| Requires: %{name}-client = %{version} |
| Requires: sblim-sfcc-devel libxml2-devel pam-devel |
| |
| %description -n libwsman-devel |
| Opensource Implementation of WS-Management |
| |
| |
| |
| Authors: |
| -------- |
| Anas Nashif <anas.nashif@intel.com> |
| Vadim Revyakin <vadim.revyakin@intel.com> |
| Denis Sadykov <denis.sadykov@intel.com> |
| |
| %package client |
| License: BSD3c(or similar) |
| Group: System/Management |
| Summary: Openwsman Client libraries |
| |
| %description client |
| Openwsman Client libraries |
| |
| |
| |
| Authors: |
| -------- |
| Anas Nashif <anas.nashif@intel.com> |
| Vadim Revyakin <vadim.revyakin@intel.com> |
| Denis Sadykov <denis.sadykov@intel.com> |
| |
| %package server |
| License: BSD3c(or similar) |
| Group: System/Management |
| Requires(Pre): sed coreutils grep diffutils /bin/hostname |
| %if 0%{?suse_version} |
| Requires(Pre): fillup |
| %endif |
| Summary: Openwsman Server and service libraries |
| |
| %description server |
| Openwsman Server and service libraries |
| |
| |
| |
| Authors: |
| -------- |
| Anas Nashif <anas.nashif@intel.com> |
| Vadim Revyakin <vadim.revyakin@intel.com> |
| Denis Sadykov <denis.sadykov@intel.com> |
| |
| |
| %package python |
| License: BSD3c(or similar) |
| Group: Development/Libraries/Python |
| Summary: Python bindings for openwsman client API |
| %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} |
| %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} |
| %{!?py_requires: %define py_requires Requires: python} |
| %{py_requires} |
| |
| %description python |
| This package provides Python bindings to access the openwsman client |
| API. |
| |
| |
| |
| Authors: |
| -------- |
| Klaus Kaempf <kkaempf@suse.de> |
| |
| %package ruby |
| License: BSD3c(or similar) |
| Group: System/Management |
| Requires: ruby |
| %if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel} |
| Requires: ruby(abi) = 1.8 |
| %endif |
| %if 0%{?suse_version} > 1120 |
| Requires: ruby(abi) = 1.8 |
| %endif |
| %if 0%{?ruby_sitelib} == 0 |
| %{!?ruby_sitelib: %global ruby_sitelib %(ruby -r rbconfig -e 'vd = Config::CONFIG["vendorlibdir"]; print(vd ? vd : Config::CONFIG["sitelibdir"])')} |
| %{!?ruby_sitearch: %global ruby_sitearch %(ruby -r rbconfig -e 'vad = Config::CONFIG["vendorarchdir"]; print(vad ? vad : Config::CONFIG["sitearchdir"])')} |
| %endif |
| Summary: Ruby bindings for openwsman client API |
| |
| %description ruby |
| This package provides Ruby bindings to access the openwsman client API. |
| |
| |
| |
| Authors: |
| -------- |
| Klaus Kaempf <kkaempf@suse.de> |
| |
| %package perl |
| License: BSD3c(or similar) |
| Group: System/Management |
| %if 0%{?fedora} |
| Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) |
| %else |
| Requires: perl = %{perl_version} |
| %endif |
| Summary: Perl bindings for openwsman client API |
| |
| %description perl |
| This package provides Perl bindings to access the openwsman client API. |
| |
| |
| |
| Authors: |
| -------- |
| Klaus Kaempf <kkaempf@suse.de> |
| |
| %if 0%{?suse_version} == 0 || 0%{?suse_version} >= 1100 |
| %package java |
| License: BSD3c(or similar) |
| Group: System/Management |
| Requires: java |
| Requires: libwsman1 |
| Summary: Java bindings for openwsman client API |
| |
| %description java |
| This package provides Java bindings to access the openwsman client API. |
| |
| |
| |
| Authors: |
| -------- |
| Klaus Kaempf <kkaempf@suse.de> |
| %endif |
| |
| %prep |
| %setup -q |
| %patch0 |
| %if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel} |
| %patch1 -p1 |
| %endif |
| |
| %build |
| rm -rf build |
| mkdir build |
| %if 0%{?fedora} |
| # [ curl-Bugs-1924441 ] SSL callback option with NSS-linked libcurl |
| # CURLOPT_SSL_CTX_FUNCTION is defined, but does not work on e.g. Fedora |
| export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -DNO_SSL_CALLBACK" |
| %endif |
| export SSL_LIB=`readlink %{_libdir}/libssl.so` |
| cd build |
| cmake \ |
| -DCMAKE_INSTALL_PREFIX=/usr \ |
| -DCMAKE_VERBOSE_MAKEFILE=TRUE \ |
| -DCMAKE_BUILD_TYPE=Release \ |
| -DCMAKE_C_FLAGS_RELEASE:STRING="$RPM_OPT_FLAGS -fno-strict-aliasing" \ |
| -DCMAKE_CXX_FLAGS_RELEASE:STRING="$RPM_OPT_FLAGS" \ |
| -DCMAKE_SKIP_RPATH=1 \ |
| -DPACKAGE_ARCHITECTURE=`uname -m` \ |
| -DLIB=%{_lib} \ |
| .. |
| |
| make CFLAGS="-DSSL_LIB='\"$SSL_LIB\"'" |
| |
| %install |
| cd build |
| make DESTDIR=$RPM_BUILD_ROOT install |
| cd .. |
| rm -f $RPM_BUILD_ROOT%{_libdir}/*.la |
| rm -f $RPM_BUILD_ROOT%{_libdir}/openwsman/plugins/*.la |
| rm -f $RPM_BUILD_ROOT%{_libdir}/openwsman/authenticators/*.la |
| [ -d $RPM_BUILD_ROOT%{ruby_sitelib} ] && rm -f $RPM_BUILD_ROOT%{ruby_sitelib}/openwsmanplugin.rb |
| [ -d $RPM_BUILD_ROOT%{ruby_vendorlib} ] && rm -f $RPM_BUILD_ROOT%{ruby_vendorlib}/openwsmanplugin.rb |
| mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/init.d |
| install -m 644 etc/openwsman.conf $RPM_BUILD_ROOT%{_sysconfdir}/openwsman |
| install -m 644 etc/openwsman_client.conf $RPM_BUILD_ROOT%{_sysconfdir}/openwsman |
| install -m 755 build/etc/init/openwsmand.sh $RPM_BUILD_ROOT%{_sysconfdir}/init.d/openwsmand |
| install -m 644 etc/ssleay.cnf $RPM_BUILD_ROOT%{_sysconfdir}/openwsman |
| install -m 644 %{S:2} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/openwsman |
| ln -sf %{_sysconfdir}/init.d/openwsmand $RPM_BUILD_ROOT%{_sbindir}/rcopenwsmand |
| %if 0%{?suse_version} > 1010 |
| install -D -m 644 %{S:3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/openwsman |
| %endif |
| |
| %clean |
| rm -rf $RPM_BUILD_ROOT |
| |
| %post -n libwsman1 -p /sbin/ldconfig |
| |
| %postun -n libwsman1 -p /sbin/ldconfig |
| |
| %post server |
| /sbin/ldconfig |
| %if 0%{?suse_version} |
| %{fillup_and_insserv openwsmand} |
| %else |
| # FIXME: chkconfig?! |
| %endif |
| |
| %preun server |
| %if 0%{?suse_version} |
| %{stop_on_removal openwsmand} |
| %else |
| # FIXME: chkconfig?! |
| %endif |
| |
| %postun server |
| %if 0%{?suse_version} |
| %{insserv_cleanup openwsmand} |
| %else |
| # FIXME: chkconfig?! |
| %endif |
| rm -f /var/log/wsmand.log |
| /sbin/ldconfig |
| |
| %post client -p /sbin/ldconfig |
| |
| %postun client -p /sbin/ldconfig |
| |
| %files -n libwsman1 |
| %defattr(-,root,root) |
| %doc AUTHORS COPYING ChangeLog README TODO |
| %{_libdir}/libwsman.so.* |
| %{_libdir}/libwsman_client.so.* |
| %{_libdir}/libwsman_curl_client_transport.so.* |
| |
| %files -n libwsman-devel |
| %defattr(-,root,root) |
| %{_includedir}/* |
| %{_libdir}/pkgconfig/* |
| %{_libdir}/*.so |
| |
| %files python |
| %defattr(-,root,root) |
| %{python_sitearch}/*.so |
| %{python_sitearch}/*.py |
| |
| %files ruby |
| %defattr(-,root,root) |
| %if 0%{?suse_version} |
| %{ruby_sitearch}/openwsman.so |
| %dir %{ruby_sitelib}/openwsman |
| %{ruby_sitelib}/openwsman/*.rb |
| %endif |
| %if 0%{?mandriva_version} |
| %{ruby_sitearchdir}/openwsman.so |
| %dir %{ruby_sitelibdir}/openwsman |
| %{ruby_sitelibdir}/openwsman/*.rb |
| %endif |
| %if 0%{?fedora} > 0 || 0%{?rhel_version} > 0 |
| %{ruby_sitearch}/openwsman.so |
| %dir %{ruby_sitelib}/openwsman |
| %{ruby_sitelib}/openwsman/*.rb |
| %endif |
| |
| %files perl |
| %defattr(-,root,root) |
| %{perl_vendorarch}/openwsman.so |
| %{perl_vendorlib}/openwsman.pm |
| |
| %if 0%{?suse_version} == 0 || 0%{?suse_version} >= 1100 |
| %files java |
| %defattr(-,root,root) |
| %{_javadir}/*jar |
| %endif |
| |
| %files server |
| %defattr(-,root,root) |
| %dir %{_sysconfdir}/openwsman |
| %config(noreplace) %{_sysconfdir}/openwsman/openwsman.conf |
| %config(noreplace) %{_sysconfdir}/openwsman/ssleay.cnf |
| %attr(0755,root,root) %{_sysconfdir}/openwsman/owsmangencert.sh |
| %config %{_sysconfdir}/pam.d/openwsman |
| %if 0%{?suse_version} > 1010 |
| %config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/openwsman |
| %endif |
| %attr(0755,root,root) %{_sysconfdir}/init.d/openwsmand |
| %dir %{_libdir}/openwsman |
| %dir %{_libdir}/openwsman/authenticators |
| %{_libdir}/openwsman/authenticators/*.so |
| %{_libdir}/openwsman/authenticators/*.so.* |
| %dir %{_libdir}/openwsman/plugins |
| %{_libdir}/openwsman/plugins/*.so |
| %{_libdir}/openwsman/plugins/*.so.* |
| %{_sbindir}/openwsmand |
| %{_sbindir}/rcopenwsmand |
| %{_libdir}/libwsman_server.so.* |
| |
| %files client |
| %defattr(-,root,root) |
| %{_libdir}/libwsman_clientpp.so.* |
| %config(noreplace) %{_sysconfdir}/openwsman/openwsman_client.conf |
| |
| %changelog |