2 # Install the xapian binaries into the lib folder of the gem
7 source_dir = 'xapian_source'
8 bindings = Dir["#{source_dir}/xapian-bindings-*"].first
9 bindings = File.basename(bindings, ".tar.xz")
12 sh "tar -xJf #{source_dir}/#{bindings}.tar.xz"
15 ENV['LDFLAGS'] = "-L#{prefix}/lib"
20 ENV['RUBY'] ||= "#{c['bindir']}/#{c['RUBY_INSTALL_NAME']}"
21 sh "./configure --prefix=#{prefix} --exec-prefix=#{prefix} --with-ruby"
25 sh "cp -r #{bindings}/ruby/.libs/_xapian.* lib"
26 sh "cp #{bindings}/ruby/xapian.rb lib"
31 sh "rm -R #{bindings}"
32 sh "rm -R #{source_dir}"