Sha256: 85a2142c5d14ce677ee11a80ff26b7239082af4aca7593fa7fcf886fc76b9735

Contents?: true

Size: 1003 Bytes

Versions: 8

Compression:

Stored size: 1003 Bytes

Contents

# encoding: utf-8
# Install the xapian binaries into the lib folder of the gem

require 'rbconfig'
c = Config::CONFIG

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

ver = '1.2.4'
source_dir = 'xapian_source'
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 #{source_dir}/#{x}.tar.gz"
	end

	prefix = Dir.pwd
	ENV['LDFLAGS'] = "-R#{prefix}/lib"

	system! "mkdir -p lib"

	Dir.chdir core do
		system! "./configure --prefix=#{prefix} --exec-prefix=#{prefix}"
		system! "make clean all"
		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"
		system! "make clean all"
	end

	system! "cp -r #{bindings}/ruby/.libs/_xapian.* lib"
	system! "cp #{bindings}/ruby/xapian.rb lib"
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
xapian_db-0.5.9 Rakefile
xapian_db-0.5.8 Rakefile
xapian_db-0.5.7 Rakefile
xapian_db-0.5.6 Rakefile
xapian_db-0.5.5 Rakefile
xapian_db-0.5.4 Rakefile
xapian_db-0.5.3 Rakefile
xapian_db-0.5.2 Rakefile