Blob Blame History Raw
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"] ')}

Name:           openwsman
Version:        2.2.3
Release:        1%{?dist}
License:        BSD
Patch0:         %{name}-initscript.patch
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXXX)
Group:          System Environment/Daemons
Summary:        Web Services Management libraries
BuildRequires:  sblim-sfcc-devel curl-devel libxml2-devel pkgconfig pam-devel openssl-devel swig python python-devel ruby ruby-devel
Requires(post): chkconfig
Requires(preun): chkconfig
Requires(postun): initscripts

Openwsman is a project intended to provide an open-source
implementation of the Web Services Management specification
(WS-Management) and to expose system management information on the
Linux operating system using the WS-Management protocol. WS-Management
is based on a suite of web services specifications and usage
requirements that exposes a set of operations focused on and covers
all system management aspects.

%package devel
Summary:        Openwsman Development files
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       pkgconfig
%description devel
Openwsman Development files

%package python
Summary:        Openwsman Python bindings
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
%description python
Openwsman python bindings

%package -n ruby-%{name}
Summary:        Openwsman Ruby bindings
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       ruby(abi) = 1.8
Provides:       ruby(%{name}) = %{version}
%description -n ruby-%{name}
Openwsman ruby bindings

%setup -q 
%patch0 -p1 -b .initscript

chmod a-x src/lib/*.[ch]
chmod a-x src/cpp/*.[ch]
chmod a-x include/*.[ch]

# disable eventing, as Fedora libcurl isn't linked against openssl
# disable tests in 2.1.0,
%configure --with-examples=yes --with-tests=no --enable-python=yes --enable-ruby=yes --enable-eventing=no --disable-more-warnings
echo %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
make %{?_smp_flags}

rm -rf %{buildroot}
make DESTDIR=%{buildroot} install
install -m 0644 etc/openwsman.conf %{buildroot}/etc/openwsman
install -m 0644 etc/ssleay.cnf %{buildroot}/etc/openwsman
install -D -m 0755 etc/init/%{name} %{buildroot}/%{_initrddir}/%{name}d
# move this helper script out of /etc
mkdir -p %{buildroot}/%{_libexecdir}/%{name}/
chmod 0755 %{buildroot}/etc/%{name}/
mv %{buildroot}/etc/%{name}/ %{buildroot}/%{_libexecdir}/%{name}/
find %{buildroot} -type f -name \*.la -exec rm \{\} \;
find %{buildroot} -type f -name \*.a -exec rm \{\} \;

rm -rf %{buildroot}

%dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}/plugins
%dir %{_libdir}/%{name}/authenticators
%dir /etc/openwsman
%config(noreplace) /etc/openwsman/openwsman.conf
%config(noreplace) /etc/openwsman/ssleay.cnf
%config(noreplace) %{_sysconfdir}/pam.d/openwsman

%files devel
%doc COPYING examples/serialize.c doc/plugin* 

%files python

%files -n ruby-%{name}

/sbin/chkconfig --add %{name}d

if [ $1 = 0 ] ; then
    /sbin/service %{name}d stop >/dev/null 2>&1
    /sbin/chkconfig --del %{name}d

if [ "$1" -ge "1" ] ; then
    /sbin/service %{name}d condrestart >/dev/null 2>&1 || :

* Wed Mar  3 2010 Vitezslav Crhonek <> - 2.2.3-1
- Update to openwsman-2.2.3

* Wed Sep 23 2009 Praveen K Paladugu <> - 2.2.0-1
- Added the new 2.2.0 sources.
- Changed the release and version numbers.

* Fri Aug 21 2009 Tomas Mraz <> - 2.1.0-4
- rebuilt with new openssl

* Sat Jul 25 2009 Fedora Release Engineering <> - 2.1.0-3
- Rebuilt for

* Thu Feb 26 2009 Fedora Release Engineering <> - 2.1.0-2
- Rebuilt for

* Mon Sep 22 2008 Matt Domsch <> - 2.1.0-1
- update to 2.1.0, resolves security issues

* Tue Aug 19 2008  <> - 2.0.0-1%{?dist}
- Modified the spec file to adhere to fedora packaging guidelines.