Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "leveldb"]
path = leveldb
url = https://github.com/google/leveldb.git
7 changes: 6 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec = Gem::Specification.new do |s|
s.summary = "a Ruby binding to LevelDB"
s.homepage = "http://github.com/wmorgan/leveldb-ruby"
s.files = %w(README LICENSE ext/leveldb/extconf.rb ext/leveldb/platform.rb lib/leveldb.rb ext/leveldb/leveldb.cc leveldb/Makefile leveldb/build_detect_platform)
Find.find("leveldb") { |x| s.files += [x] if x =~ /\.(cc|h)$/}
Find.find("leveldb") { |x| s.files += [x] if x =~ /\.(cc|h|c)$/}
s.extensions = %w(ext/leveldb/extconf.rb)
s.executables = []
s.extra_rdoc_files = %w(README ext/leveldb/leveldb.cc)
Expand All @@ -37,4 +37,9 @@ task :build do |t|
sh "cd ext/leveldb && ruby extconf.rb && make"
end

task :clean do |t|
sh "cd leveldb && make clean"
sh "cd ext/leveldb && make clean"
end

# vim: syntax=ruby
4 changes: 2 additions & 2 deletions ext/leveldb/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
require "./platform.rb"

Dir.chdir "../../leveldb"
system "OPT=\"-O2 -DNDEBUG -fPIC\" make libleveldb.a" or abort
system "OPT=\"-O2 -DNDEBUG -fPIC\" make" or abort
Dir.chdir "../ext/leveldb"

set_platform_specific_variables!

$CFLAGS << " -I../../leveldb/include"
$LIBS << " -L../../leveldb -lleveldb"
$LIBS << " -L../../leveldb -lleveldb -lsnappy"

create_makefile "leveldb/leveldb"
1 change: 1 addition & 0 deletions leveldb
Submodule leveldb added at a53934
5 changes: 0 additions & 5 deletions leveldb/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions leveldb/AUTHORS

This file was deleted.

27 changes: 0 additions & 27 deletions leveldb/LICENSE

This file was deleted.

200 changes: 0 additions & 200 deletions leveldb/Makefile

This file was deleted.

17 changes: 0 additions & 17 deletions leveldb/NEWS

This file was deleted.

51 changes: 0 additions & 51 deletions leveldb/README

This file was deleted.

13 changes: 0 additions & 13 deletions leveldb/TODO

This file was deleted.

Loading