srinivas ramanatha e73238c
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
57284a6
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
733776e
%{!?ruby_sitelib: %global ruby_sitelib %(ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"] ')}
733776e
%{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"] ')}
srinivas ramanatha e73238c
srinivas ramanatha e73238c
Name:          openwsman
57284a6
Version:       2.2.0
733776e
Release:        7%{?dist}
srinivas ramanatha e73238c
License:        BSD
srinivas ramanatha e73238c
Url:            http://www.openwsman.org/
srinivas ramanatha e73238c
Source:         http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
57284a6
Source2:        python-config
srinivas ramanatha e73238c
Patch0:         %{name}-initscript.patch
d04168a
Patch1:         %{name}-pam-auth.patch
d04168a
Patch2:         perl-bindings.patch
894aa94
Patch3:         openwsman-randfile.patch
srinivas ramanatha e73238c
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXXX)
srinivas ramanatha e73238c
Group:          System Environment/Daemons
d04168a
Summary:        Opensource Implementation of WS-Management
79fc7f1
BuildRequires:  sblim-sfcc-devel curl-devel libxml2-devel pkgconfig pam-devel openssl-devel swig python python-devel ruby ruby-devel libtool
79fc7f1
BuildRequires:  perl pkgconfig openssl-devel net-tools
srinivas ramanatha e73238c
Requires(post): chkconfig
srinivas ramanatha e73238c
Requires(preun): chkconfig
srinivas ramanatha e73238c
Requires(postun): initscripts
srinivas ramanatha e73238c
srinivas ramanatha e73238c
%description
srinivas ramanatha e73238c
Openwsman is a project intended to provide an open-source
srinivas ramanatha e73238c
implementation of the Web Services Management specification
srinivas ramanatha e73238c
(WS-Management) and to expose system management information on the
srinivas ramanatha e73238c
Linux operating system using the WS-Management protocol. WS-Management
srinivas ramanatha e73238c
is based on a suite of web services specifications and usage
srinivas ramanatha e73238c
requirements that exposes a set of operations focused on and covers
srinivas ramanatha e73238c
all system management aspects.
srinivas ramanatha e73238c
d04168a
%package -n libwsman1
d04168a
License:        BSD
d04168a
Group:          System Environment/Libraries
d04168a
Summary:        Opensource Implementation of WS-Management
d04168a
Provides:       %{name} = %{version}
d04168a
Obsoletes:      %{name} < %{version}
d04168a
Requires:       %{name}-client
srinivas ramanatha e73238c
d04168a
%description -n libwsman1
d04168a
Openwsman library for packages dependent on openwsman
d04168a
%package -n libwsman-devel
d04168a
License:        BSD
srinivas ramanatha e73238c
Group:          Development/Libraries
d04168a
Summary:        Opensource Implementation of WS-Management
d04168a
Provides:       %{name}-devel = %{version}
d04168a
Obsoletes:      %{name}-devel < %{version}
d04168a
Requires:       libwsman1 = %{version}
d04168a
Requires:       %{name}-server = %{version}
d04168a
Requires:       %{name}-client = %{version}
d04168a
Requires:       sblim-sfcc-devel libxml2-devel pam-devel
733776e
Requires:       curl-devel
d04168a
d04168a
%description -n libwsman-devel
d04168a
Development files for openwsman
d04168a
d04168a
%package client
d04168a
License:        BSD
d04168a
Group:          System Environment/Libraries
d04168a
Summary:        Openwsman Client libraries
d04168a
d04168a
%description client
d04168a
Openwsman Client libraries
d04168a
d04168a
%package server
d04168a
License:        BSD
d04168a
Group:          System Environment/Daemons
d04168a
Requires:       net-tools
d04168a
Requires:       openwsman-client
d04168a
Requires(post):       chkconfig
d04168a
Requires(preun):      chkconfig
d04168a
Requires(postun):     initscripts
d04168a
Summary:        Openwsman Server and service libraries
d04168a
d04168a
%description server
d04168a
Openwsman Server and service libraries
d04168a
srinivas ramanatha e73238c
srinivas ramanatha e73238c
%package python
d04168a
License:        BSD
srinivas ramanatha e73238c
Group:          Development/Libraries
d04168a
Summary:        Python bindings for openwsman client API
d04168a
Requires:       python
d04168a
srinivas ramanatha e73238c
%description python
d04168a
This package provides Python bindings to access the openwsman client
d04168a
API.
srinivas ramanatha e73238c
d04168a
%package ruby
d04168a
License:        BSD
srinivas ramanatha e73238c
Group:          Development/Libraries
d04168a
Requires:       ruby
srinivas ramanatha e73238c
Requires:       ruby(abi) = 1.8
d04168a
Summary:        Ruby bindings for openwsman client API
d04168a
d04168a
%description ruby
d04168a
This package provides Ruby bindings to access the openwsman client API.
d04168a
d04168a
%package perl
d04168a
License:        BSD
d04168a
Group:          Development/Libraries
d04168a
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
d04168a
Summary:        Perl bindings for openwsman client API
d04168a
d04168a
%description perl
d04168a
This package provides Perl bindings to access the openwsman client API.
d04168a
d04168a
d04168a
srinivas ramanatha e73238c
srinivas ramanatha e73238c
srinivas ramanatha e73238c
%prep
srinivas ramanatha e73238c
%setup -q 
srinivas ramanatha e73238c
%patch0 -p1
d04168a
%patch1 -p1
d04168a
%patch2 -p1
894aa94
%patch3 -p1
57284a6
cp -p %{SOURCE2} %{_builddir}/%{name}-%{version}
57284a6
sed -i -e 's|#!/usr/bin/python2.5|#!%{__python}|' %{_builddir}/%{name}-%{version}/python-config
srinivas ramanatha e73238c
srinivas ramanatha e73238c
%build
d04168a
sh autoconfiscate.sh
srinivas ramanatha e73238c
chmod a-x src/lib/*.[ch]
srinivas ramanatha e73238c
chmod a-x src/cpp/*.[ch]
srinivas ramanatha e73238c
chmod a-x include/*.[ch]
srinivas ramanatha e73238c
srinivas ramanatha e73238c
# disable eventing, as Fedora libcurl isn't linked against openssl
srinivas ramanatha e73238c
# disable tests in 2.1.0, http://www.openwsman.org/bug/263
d04168a
%configure  --enable-python=yes --enable-ruby=yes --enable-eventing=no --disable-more-warnings --disable-static --enable-perl --enable-ipv6 PATH=$PATH:.
d04168a
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -DFEDORA"
d04168a
make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_flags}
srinivas ramanatha e73238c
srinivas ramanatha e73238c
%install
srinivas ramanatha e73238c
rm -rf %{buildroot}
srinivas ramanatha e73238c
make DESTDIR=%{buildroot} install
d04168a
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
d04168a
rm -f $RPM_BUILD_ROOT%{_libdir}/openwsman/plugins/*.la
d04168a
rm -f $RPM_BUILD_ROOT%{_libdir}/openwsman/authenticators/*.la
d04168a
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/init.d
d04168a
install -m 644 etc/openwsman.conf $RPM_BUILD_ROOT%{_sysconfdir}/openwsman
d04168a
install -m 644 etc/ssleay.cnf $RPM_BUILD_ROOT%{_sysconfdir}/openwsman
d04168a
install -m 755 etc/init/openwsmand.sh $RPM_BUILD_ROOT%{_sysconfdir}/init.d/openwsmand
d04168a
ln -sf %{_sysconfdir}/init.d/openwsmand $RPM_BUILD_ROOT%{_sbindir}/rcopenwsmand
srinivas ramanatha e73238c
srinivas ramanatha e73238c
%clean
srinivas ramanatha e73238c
rm -rf %{buildroot}
d04168a
%post -n libwsman1 -p /sbin/ldconfig
d04168a
d04168a
%postun -n libwsman1 -p /sbin/ldconfig
d04168a
d04168a
%post server
d04168a
/sbin/ldconfig
d04168a
chkconfig --add  openwsmand
d04168a
d04168a
%preun server
d04168a
chkconfig --del openwsmand
d04168a
d04168a
%postun server
d04168a
rm -f /var/log/wsmand.log
d04168a
/sbin/ldconfig
d04168a
d04168a
%post client -p /sbin/ldconfig
d04168a
d04168a
%postun client -p /sbin/ldconfig
srinivas ramanatha e73238c
d04168a
%files -n libwsman1
srinivas ramanatha e73238c
%defattr(-,root,root)
d04168a
%doc AUTHORS COPYING ChangeLog README TODO
d04168a
%{_libdir}/libwsman.so.*
d04168a
%{_libdir}/libwsman_client.so.*
d04168a
%{_libdir}/libwsman_curl_client_transport.so.*
srinivas ramanatha e73238c
d04168a
%files -n libwsman-devel
srinivas ramanatha e73238c
%defattr(-,root,root)
srinivas ramanatha e73238c
%{_includedir}/*
d04168a
%{_libdir}/pkgconfig/*
srinivas ramanatha e73238c
%{_libdir}/*.so
d04168a
%doc AUTHORS COPYING ChangeLog README
srinivas ramanatha e73238c
srinivas ramanatha e73238c
%files python
srinivas ramanatha e73238c
%defattr(-,root,root)
57284a6
%{python_sitearch}/*.so
d04168a
%{python_sitelib}/*.py
d04168a
#%{python_sitelib}/*.pyc
d04168a
#%{python_sitelib}/*.pyo
d04168a
%doc AUTHORS COPYING ChangeLog README
srinivas ramanatha e73238c
d04168a
%files ruby
srinivas ramanatha e73238c
%defattr(-,root,root)
d04168a
%{ruby_sitearch}/openwsman.so
d04168a
%dir %{ruby_sitelib}/openwsman
d04168a
%{ruby_sitelib}/openwsman/openwsman.rb
d04168a
%{ruby_sitelib}/openwsman/wsxmlnode.rb
d04168a
%doc AUTHORS COPYING ChangeLog README
srinivas ramanatha e73238c
d04168a
%files perl
d04168a
%defattr(-,root,root)
d04168a
%{perl_vendorarch}/openwsman.so
d04168a
%{perl_vendorlib}/openwsman.pm
d04168a
%doc AUTHORS COPYING ChangeLog README
srinivas ramanatha e73238c
d04168a
%files server
d04168a
# Don't remove *.so files from the server package.
d04168a
# the server fails to start without these files.
d04168a
%defattr(-,root,root)
d04168a
%dir %{_sysconfdir}/openwsman
d04168a
%config(noreplace) %{_sysconfdir}/openwsman/openwsman.conf
d04168a
%config(noreplace) %{_sysconfdir}/openwsman/ssleay.cnf
d04168a
%attr(0755,root,root) %{_sysconfdir}/openwsman/owsmangencert.sh
d04168a
%config(noreplace) %{_sysconfdir}/pam.d/openwsman
d04168a
%attr(0755,root,root) %{_sysconfdir}/init.d/openwsmand
d04168a
%dir %{_libdir}/openwsman
d04168a
%dir %{_libdir}/openwsman/authenticators
d04168a
%{_libdir}/openwsman/authenticators/*.so
d04168a
%{_libdir}/openwsman/authenticators/*.so.*
d04168a
%dir %{_libdir}/openwsman/plugins
d04168a
%{_libdir}/openwsman/plugins/*.so
d04168a
%{_libdir}/openwsman/plugins/*.so.*
d04168a
%{_sbindir}/openwsmand
d04168a
%{_sbindir}/rcopenwsmand
d04168a
%{_libdir}/libwsman_server.so.*
d04168a
%doc AUTHORS COPYING ChangeLog README
srinivas ramanatha e73238c
d04168a
%files client
d04168a
%defattr(-,root,root)
d04168a
%{_libdir}/libwsman_clientpp.so.*
d04168a
%doc AUTHORS COPYING ChangeLog README
srinivas ramanatha e73238c
srinivas ramanatha e73238c
srinivas ramanatha e73238c
%changelog
733776e
* Thu Dec 31 2009 Praveen K Paladugu <praveen_paladugu@dell.com> - 2.2.0-7
733776e
- Removed the dependency on libcurl-devel and added curl-devel.
733776e
- remove the hard coding of ruby while determing the sitearch and sitelibs.
733776e
733776e
* Mon Dec 28 2009 Praveen K Paladugu <praveen_paladugu@dell.com> - 2.2.0-6
894aa94
- Changed the random file used for creating an openssl cert
894aa94
733776e
* Mon Dec 28 2009 Praveen K Paladugu <praveen_paladugu@dell.com> - 2.2.0-5
79fc7f1
- Added a few Build dependencies
79fc7f1
733776e
* Mon Dec 28 2009 Praveen K Paladugu <praveen_paladugu@dell.com> - 2.2.0-4
d04168a
- Following the upstream packaging, updated the spec file to break the
d04168a
- package into server, client, lib components.
d04168a
84c45e4
* Tue Nov  3 2009 Praveen K Paladugu <praveen_paladugu@dell.com> - 2.2.0-3
84c45e4
- Changed the python-config script for it to be working on el4
d04168a
5517a66
* Thu Oct  1 2009 Praveen K Paladugu <praveen_paladugu@dell.com> - 2.2.0-2
5517a66
- Increasing the release number to make another tag 
d04168a
57284a6
* Thu Oct  1 2009 Praveen K Paladugu <praveen_paladugu@dell.com> - 2.2.0-1
57284a6
- Updated the sources to 2.2.0. Couple of major changes are as follows:
57284a6
- Major changes:
57284a6
- 	Adapt IANA ports of 5985 (http) and 5986 (https)
57284a6
- 	Change the Ruby bindings module name to 'Openwsman'
57284a6
- 	Change the Ruby plugin module name to 'Openwsman'
57284a6
- 	IPv6 support (A_Venkatachalam@Dell.com)
57284a6
- 	preliminary support for wbem intrinsic operations
57284a6
-           'EnumerateClassNames' and 'GetClass' (kkaempf@suse.de)
57284a6
-            (needs fixed sblim-sfcc, see www.openwsman.org for details)
57284a6
- Added a few more files in %files 
57284a6
srinivas ramanatha e73238c
* Mon Sep 22 2008 Matt Domsch <Matt_Domsch@dell.com> - 2.1.0-1
srinivas ramanatha e73238c
- update to 2.1.0, resolves security issues
srinivas ramanatha e73238c
d04168a
* Tue Aug 19 2008  <srinivas_ramanatha@dell.com> - 2.0.0-1
srinivas ramanatha e73238c
- Modified the spec file to adhere to fedora packaging guidelines.