From: <kk...@us...> - 2010-01-13 09:26:36
|
Revision: 1176 http://omc.svn.sourceforge.net/omc/?rev=1176&view=rev Author: kkaempf Date: 2010-01-13 09:26:30 +0000 (Wed, 13 Jan 2010) Log Message: ----------- fix build for Fedora and RHEL Modified Paths: -------------- cmpi-bindings/trunk/package/cmpi-bindings.changes cmpi-bindings/trunk/package/cmpi-bindings.spec.in Modified: cmpi-bindings/trunk/package/cmpi-bindings.changes =================================================================== --- cmpi-bindings/trunk/package/cmpi-bindings.changes 2009-11-04 17:25:48 UTC (rev 1175) +++ cmpi-bindings/trunk/package/cmpi-bindings.changes 2010-01-13 09:26:30 UTC (rev 1176) @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Wed Jan 13 10:25:15 CET 2010 - kk...@su... + +- Fix build for Fedora and RHEL + +------------------------------------------------------------------- Sun Aug 9 08:45:29 CEST 2009 - co...@no... - use new python macros Modified: cmpi-bindings/trunk/package/cmpi-bindings.spec.in =================================================================== --- cmpi-bindings/trunk/package/cmpi-bindings.spec.in 2009-11-04 17:25:48 UTC (rev 1175) +++ cmpi-bindings/trunk/package/cmpi-bindings.spec.in 2010-01-13 09:26:30 UTC (rev 1176) @@ -24,9 +24,44 @@ Summary: Adapter to write and run CMPI-type CIM providers Group: Development/Libraries/Other BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: cmake gcc-c++ + # We need swig threads support. -BuildRequires: cmake gcc-c++ python-devel ruby-devel swig >= 1.3.34 perl -BuildRequires: sblim-sfcb +BuildRequires: swig >= 1.3.34 + +BuildRequires: sblim-cmpi-devel + +BuildRequires: python-devel perl + +%if 0%{?rhel_version} > 0 +BuildRequires: -vim +%endif + +%if 0%{?fedora} + 0%{?rhel_version} > 0 +BuildRequires: curl-devel pkgconfig ruby ruby-devel +%if 0%{?fedora} > 0 +BuildRequires: perl-devel +%endif +%endif + +%if 0%{?suse_version} > 0 + +BuildRequires: libcurl-devel +%if 0%{?suse_version} > 1020 +BuildRequires: fdupes +%endif + +# SLE9 +%if 0%{?suse_version} < 920 +BuildRequires: pkgconfig ruby +%else +BuildRequires: ruby-devel +BuildRequires: pkg-config +%endif + +%endif + + Source: %{name}-%{version}.tar.bz2 Prefix: /usr @@ -34,7 +69,7 @@ - %prep -%setup -q +%setup -q %build mkdir build @@ -61,6 +96,16 @@ Group: Development/Languages/Ruby # for the debug package. we dont use debug_package_requires here as it would enforce to install both packages. Provides: %{name} = %{version}-%{release} +%if 0%{?fedora} + 0%{?rhel_version} > 0 +Requires: ruby(abi) = 1.8 +%endif +%if 0%{?suse_version} > 1110 +Requires: ruby(abi) = 1.8 +%endif +%if 0%{?ruby_sitelib} == 0 +%{!?ruby_sitelib: %global ruby_sitelib %(ruby -r rbconfig -e 'vd = Config::CONFIG["vendorlibdir"]; print(vd ? vd : Config::CONFIG["sitelibdir"])')} +%{!?ruby_sitearch: %global ruby_sitearch %(ruby -r rbconfig -e 'vad = Config::CONFIG["vendorarchdir"]; print(vad ? vad : Config::CONFIG["sitearchdir"])')} +%endif %description -n cmpi-bindings-ruby - @@ -68,23 +113,16 @@ %files -n cmpi-bindings-ruby %defattr(-,root,root,-) %{_libdir}/cmpi/librbCmpiProvider.so -%if 0%{?sles_version} == 10 -%{_libdir}/ruby/site_ruby/%{rb_ver}/cmpi_rbwbem_bindings.rb -%else -%{_libdir}/ruby/vendor_ruby/%{rb_ver}/cmpi_rbwbem_bindings.rb -%endif +%{ruby_sitelib}/cmpi_rbwbem_bindings.rb %package -n cmpi-bindings-pywbem Summary: Adapter to write and run CMPI-type CIM providers in Python Group: Development/Languages/Python # for the debug package. we dont use debug_package_requires here as it would enforce to install both packages. Provides: %{name} = %{version}-%{release} - -#define some macros missing on fedora -%if 0%{?fedora_version} -%{!?python_sitelib: %define py_sitedir %(%__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()")} +%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %{!?py_requires: %define py_requires Requires: python} -%endif %{py_requires} %description -n cmpi-bindings-pywbem This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |