Blame SPECS/cmpi-bindings.spec

3cd68e
Name:           cmpi-bindings
3cd68e
Version:        0.9.5
3cd68e
Release:        3%{?dist}
3cd68e
Summary:        Adapter to write and run CMPI-type CIM providers
3cd68e
3cd68e
Group:          Development/Libraries
3cd68e
License:        BSD
3cd68e
URL:            http://github.com/kkaempf/cmpi-bindings
3cd68e
Source0:        https://github.com/kkaempf/%{name}/archive/v%{version}.tar.gz
3cd68e
3cd68e
#Patch0: don't build ruby and perl bingings
3cd68e
Patch0:         cmpi-bindings-0.4.17-no-ruby-perl.patch
3cd68e
#Patch1: removes workaround no longer needed
3cd68e
Patch1:         cmpi-bindings-0.4.17-sblim-sigsegv.patch
3cd68e
#Patch2: fixes placement of *.py[co] file
3cd68e
Patch2:         cmpi-bindings-0.9.5-python-lib-dir.patch
3cd68e
3cd68e
BuildRequires:  cmake gcc-c++ swig >= 1.3.34
3cd68e
BuildRequires:  curl-devel pkgconfig sed
3cd68e
BuildRequires:  sblim-cmpi-devel
3cd68e
BuildRequires:  python2-devel
3cd68e
3cd68e
%description
3cd68e
CMPI-compliant provider interface for various languages via SWIG
3cd68e
3cd68e
3cd68e
%package -n cmpi-bindings-pywbem
3cd68e
Summary:        Adapter to write and run CMPI-type CIM providers in Python
3cd68e
Group:          Development/Languages
3cd68e
Requires:       pywbem
3cd68e
 
3cd68e
%description -n cmpi-bindings-pywbem
3cd68e
CMPI-compliant provider interface for Python
3cd68e
3cd68e
3cd68e
%prep
3cd68e
%setup -q
3cd68e
%patch0 -p1
3cd68e
%patch1 -p1
3cd68e
%patch2 -p1 -b .python-lib-dir
3cd68e
3cd68e
# change hardcoded path from /usr/lib/pycim/ to something better
3cd68e
sed -i 's@/usr/lib/pycim/@'`echo %{python_sitelib}/pycim/`'@' swig/python/cmpi_pywbem_bindings.py
3cd68e
# let user know where the providers have to be placed
3cd68e
cat > README.Fedora << EOS 
3cd68e
Python provider interface expects the providers to be placed in:
3cd68e
%{python_sitelib}/pycim/
3cd68e
3cd68e
You can customize the path - edit line 428 in:
3cd68e
%{python_sitelib}/cmpi_pywbem_bindings.py
3cd68e
EOS
3cd68e
3cd68e
3cd68e
%build
3cd68e
mkdir build
3cd68e
cd build
3cd68e
cmake -DCMAKE_INSTALL_PREFIX=%_prefix \
3cd68e
      -DLIB=%{_lib} \
3cd68e
      -DCMAKE_VERBOSE_MAKEFILE=TRUE \
3cd68e
      -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags}" \
3cd68e
      -DCMAKE_CXX_FLAGS_RELEASE:STRING="%{optflags}" \
3cd68e
      -DCMAKE_BUILD_TYPE=Release \
3cd68e
      -DCMAKE_SKIP_RPATH=1 \
3cd68e
      ..  
3cd68e
make %{?_smp_mflags}
3cd68e
3cd68e
3cd68e
%install
3cd68e
rm -rf $RPM_BUILD_ROOT
3cd68e
cd build
3cd68e
mkdir -p $RPM_BUILD_ROOT%{_datadir}/cmpi
3cd68e
make install DESTDIR=$RPM_BUILD_ROOT
3cd68e
# create directory for providers
3cd68e
mkdir -p $RPM_BUILD_ROOT%{python_sitelib}/pycim/
3cd68e
rmdir $RPM_BUILD_ROOT%{_datadir}/cmpi
3cd68e
3cd68e
3cd68e
%clean
3cd68e
rm -rf $RPM_BUILD_ROOT
3cd68e
3cd68e
3cd68e
%files -n cmpi-bindings-pywbem
3cd68e
%defattr(-,root,root,-)
3cd68e
%doc README ANNOUNCE COPYING LICENSE.BSD README.Fedora
3cd68e
%dir %{_libdir}/cmpi
3cd68e
%{_libdir}/cmpi/libpyCmpiProvider.so
3cd68e
%{python_sitearch}/cmpi_pywbem_bindings.py*
3cd68e
%{python_sitearch}/cmpi.py*
3cd68e
%dir %{python_sitelib}/pycim/
3cd68e
3cd68e
%changelog
3cd68e
* Tue Aug 13 2013 Vitezslav Crhonek <vcrhonek@redhat.com> - 0.9.5-3
3cd68e
- Fix placement of *.py[co] files
3cd68e
  Resolves: #921547
3cd68e
- Remove /usr/share/cmpi - it's used by ruby binding that we don't build
3cd68e
3cd68e
* Wed Jul 17 2013 Vitezslav Crhonek <vcrhonek@redhat.com> - 0.9.5-2
3cd68e
- Fix URL, fix sources
3cd68e
3cd68e
* Thu Apr 11 2013 Jan Safranek <jsafrane@redhat.com> - 0.9.5-1
3cd68e
- Update to 0.9.5
3cd68e
3cd68e
* Thu Apr 11 2013 Jan Safranek <jsafrane@redhat.com> - 0.9.4-1
3cd68e
- Update to 0.9.4
3cd68e
3cd68e
* Thu Mar 28 2013 Jan Safranek <jsafrane@redhat.com> - 0.5.2-6
3cd68e
- Fixed 'env' parameter value in 'get_providers()' function
3cd68e
  Resolves: #919082
3cd68e
- Fixed embedded instance properties
3cd68e
  Resolves: #919081
3cd68e
3cd68e
* Fri Feb 15 2013 Jan Safranek <jsafrane@redhat.com> - 0.5.2-5
3cd68e
- Fixed passing NULL array from get_instance
3cd68e
  Resolves: #883041
3cd68e
3cd68e
* Wed Jan 30 2013 Vitezslav Crhonek <vcrhonek@redhat.com> - 0.5.2-4
3cd68e
- Fix memory leaks
3cd68e
  Resolves: #902809
3cd68e
3cd68e
* Thu Jan 10 2013 Vitezslav Crhonek <vcrhonek@redhat.com> - 0.5.2-3
3cd68e
- Fixed passing NULL array from get_instance
3cd68e
- Add bindings for CMTraceMessage
3cd68e
  (patches by Jan Safranek)
3cd68e
3cd68e
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.2-2
3cd68e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
3cd68e
3cd68e
* Mon May  7 2012 Jan Safranek <jsafrane@redhat.com> - 0.5.2
3cd68e
- Update to 0.5.2
3cd68e
3cd68e
* Thu Mar 08 2012 Vitezslav Crhonek <vcrhonek@redhat.com> - 0.4.17-2
3cd68e
- Create and own "pycim" directory
3cd68e
- Add documentation and create README.Fedora
3cd68e
3cd68e
* Thu Mar 01 2012 Vitezslav Crhonek <vcrhonek@redhat.com> - 0.4.17-1
3cd68e
- Initial support (ruby and perl bindings are disabled)