File: install.rb

package info (click to toggle)
quantlib-ruby 0.2.1.cvs20020322-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 972 kB
  • ctags: 1,309
  • sloc: cpp: 16,141; ruby: 2,578; makefile: 59
file content (27 lines) | stat: -rw-r--r-- 929 bytes parent folder | download | duplicates (2)
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 }