Blob Blame Raw
Name:           cmpi-bindings
Version:        0.9.5
Release:        19%{?dist}
Summary:        Adapter to write and run CMPI-type CIM providers

License:        BSD
URL:            http://github.com/kkaempf/cmpi-bindings
Source0:        https://github.com/kkaempf/%{name}/archive/v%{version}.tar.gz

#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: fixes placement of *.py[co] file
Patch2:         cmpi-bindings-0.9.5-python-lib-dir.patch
#Patch3: Fix comments for SWIG 3.0.3 and higher
Patch3:         cmpi-bindings-Fix_comments_for_swig_3.0.3.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
Requires:       pywbem
 
%description -n cmpi-bindings-pywbem
CMPI-compliant provider interface for Python


%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1 -b .python-lib-dir
%patch3 -p1

# change hardcoded path from /usr/lib/pycim/ to something better
sed -i 's@/usr/lib/pycim/@'`echo %{python2_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:
%{python2_sitelib}/pycim/

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


%build
mkdir build
cd build
%cmake ..
%make_build


%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%{python2_sitelib}/pycim/
rmdir $RPM_BUILD_ROOT%{_datadir}/cmpi



%files -n cmpi-bindings-pywbem
%doc README ANNOUNCE COPYING LICENSE.BSD README.Fedora
%dir %{_libdir}/cmpi
%{_libdir}/cmpi/libpyCmpiProvider.so
%{python2_sitearch}/cmpi_pywbem_bindings.py*
%{python2_sitearch}/cmpi.py*
%dir %{python2_sitelib}/pycim/

%changelog
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.5-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Mon Jul 23 2018 Vitezslav Crhonek <vcrhonek@redhat.com> - 0.9.5-18
- Fix FTBFS
  Resolves: #1603666

* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.5-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Thu Feb 22 2018 Florian Weimer <fweimer@redhat.com> - 0.9.5-16
- Use %%cmake, following cmake packaging policy (includes LDFLAGS)

* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.5-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.5-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.5-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.5-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5-11
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.5-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jun 18 2015 Jitka Plesnikova <jplesnik@redhat.com> - 0.9.5-9
- Fix comments for SWIG 3.0.3 and higher (BZ#1196712)

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Thu Mar 20 2014 Vitezslav Crhonek <vcrhonek@redhat.com> - 0.9.5-5
- Fix cflags propagation

* Tue Aug 06 2013 Vitezslav Crhonek <vcrhonek@redhat.com> - 0.9.5-4
- Fix placement of *.py[co] files
- Remove /usr/share/cmpi - it's used by ruby binding that we don't build

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Wed Jul 17 2013 Vitezslav Crhonek <vcrhonek@redhat.com> - 0.9.5-2
- Fix URL, fix sources

* Thu Apr 11 2013 Jan Safranek <jsafrane@redhat.com> - 0.9.5-1
- Update to 0.9.5

* Thu Apr 11 2013 Jan Safranek <jsafrane@redhat.com> - 0.9.4-1
- Update to 0.9.4

* Thu Mar 28 2013 Jan Safranek <jsafrane@redhat.com> - 0.5.2-6
- Fixed 'env' parameter value in 'get_providers()' function
  Resolves: #919082
- Fixed embedded instance properties
  Resolves: #919081

* 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)