forked from Clearcover/rdkafka-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
20 lines (18 loc) · 768 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require File.expand_path('../../lib/rdkafka/version', __FILE__)
require "fileutils"
task :default => :clean do
mac_os = (/darwin/ =~ RUBY_PLATFORM) != nil
if mac_os
ENV["CPPFLAGS"] = "-I/usr/local/opt/openssl/include"
ENV["LDFLAGS"] = "-L/usr/local/opt/openssl/lib"
lib_path = File.join('/','usr','local','opt','librdkafka','lib','librdkafka.1.dylib')
FileUtils.cp(lib_path, File.join(File.dirname(__FILE__), "librdkafka.dylib"))
else
lib_path = File.join('/','usr','lib','librdkafka.so.1')
FileUtils.cp(lib_path, File.join(File.dirname(__FILE__), "librdkafka.so"))
end
end
task :clean do
FileUtils.rm_f File.join(File.dirname(__FILE__), "librdkafka.so")
FileUtils.rm_f File.join(File.dirname(__FILE__), "librdkafka.dylib")
end