fix spec
authorMichael Schroeder <mls@suse.de>
Mon, 18 Jul 2011 12:13:09 +0000 (14:13 +0200)
committerMichael Schroeder <mls@suse.de>
Mon, 18 Jul 2011 12:13:09 +0000 (14:13 +0200)
bindings/ruby/CMakeLists.txt
package/libsolv.spec.in

index e536ca2..3edbd11 100644 (file)
@@ -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)
index decffc2..0dc1897 100644 (file)
@@ -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