6206abc
#
c8234dd
# spec file for package openwsman (Version 2.2.3)
6206abc
#
6206abc
6206abc
# norootforbuild
6206abc
2cdcef9
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
6206abc
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
6206abc
%{!?ruby_sitelib: %global ruby_sitelib %(ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"] ')}
2cdcef9
%{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"] ')}
srinivas ramanatha 702dc6c
eb3d4c4
Name:           openwsman
6206abc
BuildRequires:  swig
6206abc
BuildRequires:  libcurl-devel libxml2-devel pam-devel sblim-sfcc-devel
6206abc
BuildRequires:  python python-devel ruby ruby-devel perl
6206abc
BuildRequires:  perl-devel pkgconfig openssl-devel
6206abc
BuildRequires:  libtool
6206abc
Requires:       net-tools
eb3d4c4
Version:        2.2.3
c8234dd
Release:        3%{?dist}
srinivas ramanatha 702dc6c
Url:            http://www.openwsman.org/
6206abc
License:        BSD
6206abc
Group:          Applications/System
6206abc
Summary:        Opensource Implementation of WS-Management
c8234dd
Source:         http://downloads.sourceforge.net/project/openwsman/%{name}/%{version}/%{name}-%{version}.tar.bz2
srinivas ramanatha 702dc6c
Patch0:         %{name}-initscript.patch
6206abc
Patch1:         %{name}-randfile.patch
c8234dd
Patch2:         %{name}-authors.patch
srinivas ramanatha 702dc6c
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXXX)
srinivas ramanatha 702dc6c
srinivas ramanatha 702dc6c
%description
srinivas ramanatha 702dc6c
Openwsman is a project intended to provide an open-source
6206abc
implementation of the Web Services Management specipication
srinivas ramanatha 702dc6c
(WS-Management) and to expose system management information on the
srinivas ramanatha 702dc6c
Linux operating system using the WS-Management protocol. WS-Management
srinivas ramanatha 702dc6c
is based on a suite of web services specifications and usage
srinivas ramanatha 702dc6c
requirements that exposes a set of operations focused on and covers
srinivas ramanatha 702dc6c
all system management aspects.
srinivas ramanatha 702dc6c
srinivas ramanatha 702dc6c
6206abc
6206abc
6206abc
%package -n libwsman1
6206abc
License:        BSD
6206abc
Group:          System Environment/Libraries
6206abc
Summary:        Opensource Implementation of WS-Management
6206abc
Provides:       %{name} = %{version}
6206abc
Obsoletes:      %{name} < %{version}
6206abc
6206abc
%description -n libwsman1
6206abc
Openwsman library for packages dependent on openwsman
6206abc
6206abc
6206abc
6206abc
6206abc
%package -n libwsman-devel
6206abc
License:        BSD
srinivas ramanatha 702dc6c
Group:          Development/Libraries
6206abc
Summary:        Opensource Implementation of WS-Management
6206abc
Provides:       %{name}-devel = %{version}
6206abc
Obsoletes:      %{name}-devel < %{version}
6206abc
Requires:       libwsman1 = %{version}
6206abc
Requires:       %{name}-server = %{version}
6206abc
Requires:       %{name}-client = %{version}
6206abc
Requires:       sblim-sfcc-devel libxml2-devel pam-devel
6206abc
Requires:       libcurl-devel
6206abc
6206abc
%description -n libwsman-devel
6206abc
Development files for openwsman
6206abc
6206abc
6206abc
6206abc
%package client
6206abc
License:        BSD
6206abc
Group:          System Environment/Libraries
6206abc
Summary:        Openwsman Client libraries
6206abc
6206abc
%description client
6206abc
Openwsman Client libraries
6206abc
6206abc
6206abc
6206abc
6206abc
%package server
6206abc
License:        BSD
6206abc
Group:          System Environment/Daemons
6206abc
Requires:       net-tools
6206abc
Requires(post):       chkconfig
6206abc
Requires(preun):      chkconfig
6206abc
Requires(postun):     initscripts
6206abc
Summary:        Openwsman Server and service libraries
6206abc
6206abc
%description server
6206abc
Openwsman Server and service libraries
6206abc
6206abc
6206abc
srinivas ramanatha 702dc6c
srinivas ramanatha 702dc6c
%package python
6206abc
License:        BSD
srinivas ramanatha 702dc6c
Group:          Development/Libraries
6206abc
Summary:        Python bindings for openwsman client API
6206abc
Requires:       python
6206abc
srinivas ramanatha 702dc6c
%description python
6206abc
This package provides Python bindings to access the openwsman client
6206abc
API.
6206abc
6206abc
srinivas ramanatha 702dc6c
6206abc
6206abc
%package ruby
6206abc
License:        BSD
srinivas ramanatha 702dc6c
Group:          Development/Libraries
6206abc
Requires:       ruby
srinivas ramanatha 702dc6c
Requires:       ruby(abi) = 1.8
6206abc
Summary:        Ruby bindings for openwsman client API
srinivas ramanatha 702dc6c
6206abc
%description ruby
6206abc
This package provides Ruby bindings to access the openwsman client API.
6206abc
6206abc
6206abc
6206abc
6206abc
%package perl
6206abc
License:        BSD
6206abc
Group:          Development/Libraries
6206abc
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
6206abc
Summary:        Perl bindings for openwsman client API
6206abc
6206abc
%description perl
6206abc
This package provides Perl bindings to access the openwsman client API.
6206abc
6206abc
6206abc
srinivas ramanatha 702dc6c
srinivas ramanatha 702dc6c
%prep
6206abc
%setup -q
6206abc
%patch0 -p1
6206abc
%patch1 -p1
c8234dd
%patch2 -p1
srinivas ramanatha 702dc6c
srinivas ramanatha 702dc6c
%build
6206abc
sh autoconfiscate.sh
6206abc
# Removing executable permissions on .c and .h files to fix rpmlint warnings. 
6206abc
chmod -x src/cpp/WsmanClient.h
6206abc
chmod -x src/lib/wsman-filter.c
6206abc
chmod -x include/wsman-filter.h
6206abc
%configure \
6206abc
    --disable-more-warnings \
6206abc
    --disable-static \
6206abc
    --enable-python \
6206abc
    --enable-ruby \
6206abc
    --enable-perl \
6206abc
    --enable-ipv6
6206abc
#make clean
srinivas ramanatha 702dc6c
6206abc
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -DFEDORA"
6206abc
make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_flags}
srinivas ramanatha 702dc6c
srinivas ramanatha 702dc6c
%install
srinivas ramanatha 702dc6c
rm -rf %{buildroot}
c8234dd
make DESTDIR=%{buildroot} install
c8234dd
rm -f %{buildroot}/%{_libdir}/*.la
c8234dd
rm -f %{buildroot}/%{_libdir}/openwsman/plugins/*.la
c8234dd
rm -f %{buildroot}/%{_libdir}/openwsman/authenticators/*.la
c8234dd
mkdir -p %{buildroot}/%{_sysconfdir}/init.d
c8234dd
install -m 644 etc/openwsman.conf %{buildroot}/%{_sysconfdir}/openwsman
c8234dd
install -m 644 etc/ssleay.cnf %{buildroot}/%{_sysconfdir}/openwsman
c8234dd
install -m 755 etc/init/openwsmand.sh %{buildroot}/%{_sysconfdir}/init.d/openwsmand
c8234dd
ln -sf %{_sysconfdir}/init.d/openwsmand %{buildroot}/%{_sbindir}/rcopenwsmand
srinivas ramanatha 702dc6c
srinivas ramanatha 702dc6c
%clean
c8234dd
rm -rf %{buildroot}
6206abc
6206abc
%post -n libwsman1 -p /sbin/ldconfig
srinivas ramanatha 702dc6c
6206abc
%postun -n libwsman1 -p /sbin/ldconfig
6206abc
6206abc
%post server
6206abc
/sbin/ldconfig
6206abc
chkconfig --add  openwsmand
6206abc
6206abc
%preun server
c8234dd
if [ $1 = 0 ] ; then
c8234dd
       /sbin/service %{name}d stop >/dev/null 2>&1
c8234dd
       /sbin/chkconfig --del openwsmand
c8234dd
fi
6206abc
6206abc
%postun server
6206abc
rm -f /var/log/wsmand.log
c8234dd
c8234dd
if [ "$1" -ge "1" ] ; then
c8234dd
     /sbin/service %{name}d condrestart >/dev/null 2>&1 || :
c8234dd
fi
6206abc
/sbin/ldconfig
6206abc
6206abc
%post client -p /sbin/ldconfig
6206abc
6206abc
%postun client -p /sbin/ldconfig
6206abc
6206abc
%files -n libwsman1
c8234dd
%defattr(-,root,root,-)
6206abc
%doc AUTHORS COPYING ChangeLog README TODO
6206abc
%{_libdir}/libwsman.so.*
6206abc
%{_libdir}/libwsman_client.so.*
6206abc
%{_libdir}/libwsman_curl_client_transport.so.*
srinivas ramanatha 702dc6c
6206abc
%files -n libwsman-devel
c8234dd
%defattr(-,root,root,-)
srinivas ramanatha 702dc6c
%{_includedir}/*
6206abc
%{_libdir}/pkgconfig/*
srinivas ramanatha 702dc6c
%{_libdir}/*.so
6206abc
%doc AUTHORS COPYING ChangeLog README
srinivas ramanatha 702dc6c
srinivas ramanatha 702dc6c
%files python
c8234dd
%defattr(-,root,root,-)
2cdcef9
%{python_sitearch}/*.so
6206abc
%{python_sitelib}/*.py
6206abc
%{python_sitelib}/*.pyc
6206abc
%{python_sitelib}/*.pyo
6206abc
%doc AUTHORS COPYING ChangeLog README
srinivas ramanatha 702dc6c
6206abc
%files ruby
c8234dd
%defattr(-,root,root,-)
6206abc
%{ruby_sitearch}/openwsman.so
6206abc
%dir %{ruby_sitelib}/openwsman
6206abc
%{ruby_sitelib}/openwsman/openwsman.rb
6206abc
%{ruby_sitelib}/openwsman/xmlnode.rb
6206abc
%doc AUTHORS COPYING ChangeLog README
srinivas ramanatha 702dc6c
6206abc
%files perl
c8234dd
%defattr(-,root,root,-)
6206abc
%{perl_vendorarch}/openwsman.so
6206abc
%{perl_vendorlib}/openwsman.pm
6206abc
%doc AUTHORS COPYING ChangeLog README
srinivas ramanatha 702dc6c
6206abc
%files server
6206abc
# Don't remove *.so files from the server package.
6206abc
# the server fails to start without these files.
c8234dd
%defattr(-,root,root,-)
6206abc
%dir %{_sysconfdir}/openwsman
6206abc
%config(noreplace) %{_sysconfdir}/openwsman/openwsman.conf
6206abc
%config(noreplace) %{_sysconfdir}/openwsman/ssleay.cnf
6206abc
%attr(0755,root,root) %{_sysconfdir}/openwsman/owsmangencert.sh
6206abc
%config(noreplace) %{_sysconfdir}/pam.d/openwsman
6206abc
%attr(0755,root,root) %{_sysconfdir}/init.d/openwsmand
6206abc
%dir %{_libdir}/openwsman
6206abc
%dir %{_libdir}/openwsman/authenticators
6206abc
%{_libdir}/openwsman/authenticators/*.so
6206abc
%{_libdir}/openwsman/authenticators/*.so.*
6206abc
%dir %{_libdir}/openwsman/plugins
6206abc
%{_libdir}/openwsman/plugins/*.so
6206abc
%{_libdir}/openwsman/plugins/*.so.*
6206abc
%{_sbindir}/openwsmand
6206abc
%{_sbindir}/rcopenwsmand
6206abc
%{_libdir}/libwsman_server.so.*
6206abc
%doc AUTHORS COPYING ChangeLog README
srinivas ramanatha 702dc6c
6206abc
%files client
c8234dd
%defattr(-,root,root,-)
6206abc
%{_libdir}/libwsman_clientpp.so.*
6206abc
%doc AUTHORS COPYING ChangeLog README
srinivas ramanatha 702dc6c
srinivas ramanatha 702dc6c
srinivas ramanatha 702dc6c
%changelog
c8234dd
* Tue Apr 22 2010 Praveen K Paladugu <praveen_paladugu@dell.com> - 2.2.3-3
c8234dd
- authors.patch: Moved all the AUTHORS info to AUTHORS file.
c8234dd
- Corrected the Source tag.
c8234dd
- Corrected the package dependencies to break cyclic dependencies.
c8234dd
- Fixed the default attributes.
c8234dd
- Fixed the preun & postun scripts, to make sure the openwsmand service
c8234dd
-    is stopped before the package is removed.
c8234dd
- Added 'condrestart' function to the init script.
c8234dd
- Had to let the *.so files be part of the openwsman-server becuase
c8234dd
-    some of the source files explicitly call out for *.so files.
c8234dd
c8234dd
6206abc
* Thu Apr 15 2010 Praveen K Paladugu <praveen_paladugu@dell.com> - 2.2.3-2
6206abc
- Updated the spec file to adhere to the upstream standard of breaking
6206abc
- the package in server, client, lib modules 
6206abc
- randfile.patch: when openwsmand daemon creates a certificate the
6206abc
- first time it needs a file which have random content it. This
6206abc
- is pointed to $HOME/.rnd in /etc/openwsman/ssleay.cnf. Changed this
6206abc
- random file to /dev/urandom. 
6206abc
- initscript.patch: patch to edit the init script so that the services
6206abc
- are not started by default.
6206abc
6206abc
eb3d4c4
* Wed Mar  3 2010 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.2.3-1
eb3d4c4
- Update to openwsman-2.2.3
eb3d4c4
c8234dd
2cdcef9
* Wed Sep 23 2009 Praveen K Paladugu <praveen_paladugu@dell.com> - 2.2.0-1
2cdcef9
- Added the new 2.2.0 sources.
2cdcef9
- Changed the release and version numbers.
eb3d4c4
f5a1498
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 2.1.0-4
f5a1498
- rebuilt with new openssl
f5a1498
d87c14e
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.0-3
d87c14e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
d87c14e
f35985a
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.0-2
f35985a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
f35985a
srinivas ramanatha 702dc6c
* Mon Sep 22 2008 Matt Domsch <Matt_Domsch@dell.com> - 2.1.0-1
srinivas ramanatha 702dc6c
- update to 2.1.0, resolves security issues
srinivas ramanatha 702dc6c
srinivas ramanatha 702dc6c
* Tue Aug 19 2008  <srinivas_ramanatha@dell.com> - 2.0.0-1%{?dist}
srinivas ramanatha 702dc6c
- Modified the spec file to adhere to fedora packaging guidelines.