Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 916f75e06b28fba4c6dc2bbdec8b0f4b > files > 8

cmpi-bindings-0.5.2-5.fc18.src.rpm

Name:           cmpi-bindings
Version:        0.5.2
Release:        5%{?dist}
Summary:        Adapter to write and run CMPI-type CIM providers

Group:          Development/Libraries
License:        BSD
URL:            http://github.com/kkaempf/cmpi-bindings
# The source for this package was pulled from upstream's vcs.  Use the
# following commands to generate the tarball:
#  git clone https://github.com/kkaempf/cmpi-bindings.git
#  cd cmpi-bindings
#  git archive --prefix=cmpi-bindings-%{version}/ v%{version} | bzip2 >cmpi-bindings-%{version}.tar.bz2
Source0:         %{name}-%{version}.tar.bz2

#Patch0: don't build ruby and perl bingings
Patch0:         cmpi-bindings-0.4.17-no-ruby-perl.patch
#Patch1: removes workaround no longer needed
Patch1:         cmpi-bindings-0.4.17-sblim-sigsegv.patch
#Patch2: bz#883041, fixes passing passing NULL array from get_instance
Patch2:         cmpi-bindings-0.5.2-null.patch
#Patch3: bz#883462, adds bindings for CMTraceMessage
Patch3:         cmpi-bindings-0.5.2-trace.patch
#Patch4: bz#902809, taken from upstream
Patch4:         cmpi-bindings-0.5.2-memory-leaks.patch
#Patch5: bz#902809 (again), taken from upstream
Patch5:         cmpi-bindings-0.5.2-null-array.patch

BuildRequires:  cmake gcc-c++ swig >= 1.3.34
BuildRequires:  curl-devel pkgconfig sed
BuildRequires:  sblim-cmpi-devel
BuildRequires:  python2-devel

%description
CMPI-compliant provider interface for various languages via SWIG


%package -n cmpi-bindings-pywbem
Summary:        Adapter to write and run CMPI-type CIM providers in Python
Group:          Development/Languages
Requires:       pywbem
 
%description -n cmpi-bindings-pywbem
CMPI-compliant provider interface for Python


%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1

# change hardcoded path from /usr/lib/pycim/ to something better
sed -i 's@/usr/lib/pycim/@'`echo %{python_sitelib}/pycim/`'@' swig/python/cmpi_pywbem_bindings.py
# let user know where the providers have to be placed
cat > README.Fedora << EOS 
Python provider interface expects the providers to be placed in:
%{python_sitelib}/pycim/

You can customize the path - edit line 428 in:
%{python_sitelib}/cmpi_pywbem_bindings.py
EOS


%build
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=%_prefix \
      -DLIB=%{_lib} \
      -DCMAKE_VERBOSE_MAKEFILE=TRUE \
      -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags}" \
      -DCMAKE_CXX_FLAGS_RELEASE:STRING="%{optflags}" \
      -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_SKIP_RPATH=1 \
      ..  
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
cd build
mkdir -p $RPM_BUILD_ROOT%{_datadir}/cmpi
make install DESTDIR=$RPM_BUILD_ROOT
# create directory for providers
mkdir -p $RPM_BUILD_ROOT%{python_sitelib}/pycim/


%clean
rm -rf $RPM_BUILD_ROOT


%files -n cmpi-bindings-pywbem
%defattr(-,root,root,-)
%doc README ANNOUNCE COPYING LICENSE.BSD README.Fedora
%dir %{_libdir}/cmpi
%{_libdir}/cmpi/libpyCmpiProvider.so
%dir %{_datadir}/cmpi
%{python_sitelib}/cmpi_pywbem_bindings.py*
%{python_sitelib}/cmpi.py*
%dir %{python_sitelib}/pycim/


%changelog
* Fri Feb 15 2013 Jan Safranek <jsafrane@redhat.com> - 0.5.2-5
- Fixed passing NULL array from get_instance
  Resolves: #883041

* Wed Jan 30 2013 Vitezslav Crhonek <vcrhonek@redhat.com> - 0.5.2-4
- Fix memory leaks
  Resolves: #902809

* Thu Jan 10 2013 Vitezslav Crhonek <vcrhonek@redhat.com> - 0.5.2-3
- Fixed passing NULL array from get_instance
- Add bindings for CMTraceMessage
  (patches by Jan Safranek)

* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Mon May  7 2012 Jan Safranek <jsafrane@redhat.com> - 0.5.2
- Update to 0.5.2

* Thu Mar 08 2012 Vitezslav Crhonek <vcrhonek@redhat.com> - 0.4.17-2
- Create and own "pycim" directory
- Add documentation and create README.Fedora

* Thu Mar 01 2012 Vitezslav Crhonek <vcrhonek@redhat.com> - 0.4.17-1
- Initial support (ruby and perl bindings are disabled)