From a765006c02784c66974d902972294117bf03cf08 Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Mon, 18 Jul 2011 14:13:09 +0200 Subject: [PATCH] fix spec --- bindings/ruby/CMakeLists.txt | 2 ++ package/libsolv.spec.in | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/bindings/ruby/CMakeLists.txt b/bindings/ruby/CMakeLists.txt index e536ca2..3edbd11 100644 --- a/bindings/ruby/CMakeLists.txt +++ b/bindings/ruby/CMakeLists.txt @@ -15,6 +15,8 @@ ADD_CUSTOM_COMMAND ( WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DEPENDS ${CMAKE_SOURCE_DIR}/bindings/solv.i ) + +ADD_DEFINITIONS(-Wno-unused) INCLUDE_DIRECTORIES (${RUBY_INCLUDE_PATH}) ADD_LIBRARY (bindings_ruby SHARED solv_ruby.c) diff --git a/package/libsolv.spec.in b/package/libsolv.spec.in index decffc2..0dc1897 100644 --- a/package/libsolv.spec.in +++ b/package/libsolv.spec.in @@ -8,6 +8,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build Group: Development/Libraries/C and C++ Prefix: /usr +%bcond_with enable_static +%bcond_with disable_shared %bcond_without perl_binding %bcond_without python_binding %bcond_without ruby_binding @@ -39,13 +41,16 @@ BuildRequires: zlib-devel %if %{with perl_binding} BuildRequires: perl +BuildRequires: swig %endif %if %{with ruby_binding} -%global ruby_vendorarch %(ruby -rrbconfig -e 'puts Config::CONFIG["vendorarchdir"] ')} +%global ruby_vendorarch %(ruby -rrbconfig -e 'puts Config::CONFIG["vendorarchdir"]') BuildRequires: ruby-devel +BuildRequires: swig %endif %if %{with python_binding} BuildRequires: python-devel +BuildRequires: swig %endif Summary: A new approach to package dependency solving @@ -158,9 +163,11 @@ cmake $CMAKE_FLAGS \ -DLIB=%{_lib} \ -DCMAKE_VERBOSE_MAKEFILE=TRUE \ -DCMAKE_BUILD_TYPE=Release \ + %{?with_enable_static:-DENABLE_STATIC=1} \ + %{?with_disable_shared:-DDISABLE_SHARED=1} \ %{?with_perl_binding:-DENABLE_PERL=1} \ %{?with_python_binding:-DENABLE_PYTHON=1} \ - %{?with_ruby_binding:-DENABLE_RUBYL=1} \ + %{?with_ruby_binding:-DENABLE_RUBY=1} \ -DUSE_VENDORDIRS=1 \ -DCMAKE_SKIP_RPATH=1 make %{?jobs:-j %jobs} @@ -210,7 +217,6 @@ rm -rf "$RPM_BUILD_ROOT" %if %{with python_binding} %files -n python-solv -%{ruby_vendorarch}/* %defattr(-,root,root) %{py_sitedir}/* %endif -- 2.7.4