Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 9c4eb4a0ff
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 43 lines (34 sloc) 0.962 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
require 'rbconfig'
c = Config::CONFIG

def system!(cmd)
puts cmd
system(cmd) or raise
end

ver = '1.2.3'
core = "xapian-core-#{ver}"
bindings = "xapian-bindings-#{ver}"
xapian_config = "#{Dir.pwd}/#{core}/xapian-config"

task :default do
[core,bindings].each do |x|
system! "tar -xzvf #{x}.tar.gz"
end

prefix = Dir.pwd

system! "mkdir -p lib"

Dir.chdir core do
system! "./configure --prefix=#{prefix} --exec-prefix=#{prefix}"
ENV['LDFLAGS'] = "-R#{prefix}/lib"
system! "make clean all"
ENV['LDFLAGS'] = ""
system! "cp -r .libs/* ../lib/"
end

Dir.chdir bindings do
ENV['RUBY'] ||= "#{c['bindir']}/#{c['RUBY_INSTALL_NAME']}"
ENV['XAPIAN_CONFIG'] = xapian_config
system! "./configure --prefix=#{prefix} --exec-prefix=#{prefix} --with-ruby"
ENV['LDFLAGS'] = "-R#{prefix}/lib"
system! "make clean all"
ENV['LDFLAGS'] = ""
end

system! "cp -r #{bindings}/ruby/.libs/_xapian.* lib"
system! "cp #{bindings}/ruby/xapian.rb lib"
end
Something went wrong with that request. Please try again.