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
|
require 'rbconfig'
require 'ftools'
DEBPREFIX = ARGV.shift
ARCHDIR = DEBPREFIX.to_s + Config::CONFIG["archdir"]
LIBDIR = DEBPREFIX.to_s + Config::CONFIG["rubylibdir"]
DATADIR = DEBPREFIX.to_s + Config::CONFIG["datadir"]
QLDATADIR = DATADIR + "/quantlib-ruby"
SWIGDIR = QLDATADIR + "/SWIG"
DOCDIR = DATADIR + "/doc/quantlib-ruby"
TESTDIR = DOCDIR + "/examples"
File.makedirs ARCHDIR
File.makedirs LIBDIR
File.makedirs SWIGDIR
File.makedirs TESTDIR
File.install "./QuantLibc.so", ARCHDIR+"/QuantLibc.so", 0555, true
File.install "./QuantLib.rb", LIBDIR+"/QuantLib.rb", 0555, true
# use glob for the time being - integrate with makedist sometime
Dir['*.txt'].each { |file| File.install file, DOCDIR+"/#{file}", nil, true }
Dir['SWIG/*.i'].each { |file| File.install file, QLDATADIR+"/#{file}", nil, true }
Dir.chdir 'test'
Dir['*.rb'].each { |file| File.install file, "../"+TESTDIR+"/#{file}", nil, true }
|