Skip to content

Commit

Permalink
initial setup
Browse files Browse the repository at this point in the history
  • Loading branch information
gernotkogler committed Jul 7, 2011
0 parents commit ea4b621
Show file tree
Hide file tree
Showing 9 changed files with 94 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
*.tmproj
3 changes: 3 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,3 @@
##1.2.6 (July 8th, 2011)

Initial release
20 changes: 20 additions & 0 deletions LICENSE
@@ -0,0 +1,20 @@
Copyright (c) 2010 Gernot Kogler

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3 changes: 3 additions & 0 deletions README.rdoc
@@ -0,0 +1,3 @@
= Xapian-Ruby

Xapian-Ruby installs the current xapian libs and ruby bindings
52 changes: 52 additions & 0 deletions Rakefile
@@ -0,0 +1,52 @@
# 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.6'
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"

system! "rm lib/*.a"
system! "rm lib/*.la"
system! "rm lib/*.lai"

system! "rm -R #{bindings}"
system! "rm -R #{core}"
system! "rm -R #{source_dir}"

end
Binary file added xapian-ruby-1.2.6.gem
Binary file not shown.
15 changes: 15 additions & 0 deletions xapian-ruby.gemspec
@@ -0,0 +1,15 @@
# -*- encoding: utf-8 -*-
lib = File.expand_path('../lib/', __FILE__)
$:.unshift lib unless $:.include?(lib)

Gem::Specification.new do |s|
s.name = %q{xapian-ruby}
s.version = "1.2.6"
s.authors = ["Gernot Kogler"]
s.summary = %q{xapian libraries and ruby bindings}
s.email = %q{gernot.kogler (at) garaio (dot) com}
s.homepage = %q{https://github.com/garaio/xapian-ruby}
s.extensions = ["Rakefile"]
s.required_rubygems_version = ">=1.3.6"
s.files = Dir.glob("xapian_source/*") + %w(LICENSE README.rdoc CHANGELOG.md Rakefile)
end
Binary file added xapian_source/xapian-bindings-1.2.6.tar.gz
Binary file not shown.
Binary file added xapian_source/xapian-core-1.2.6.tar.gz
Binary file not shown.

0 comments on commit ea4b621

Please sign in to comment.