require "rbconfig.rb"
require "ftools"
include Config

if ARGV[0]
   prefix = ARGV[0]
   libdir = prefix+"/lib/ruby/"+CONFIG["MAJOR"]+"."+CONFIG["MINOR"]+'/numru'
   bindir = prefix+"/bin"
else
   libdir = CONFIG["sitelibdir"] + '/numru'
   bindir = CONFIG["bindir"]
end
File.makedirs(libdir+'/gpv') if ! File.exist?(libdir+'/gpv')
File.makedirs(bindir) if ! File.exist?(bindir)

File.install 'gpv.rb', libdir, 0644, true
Dir.glob("lib/*.rb").each do |f|
   File.install f, libdir+'/gpv', 0644, true
end

File.install 'bin/gpv2nc.rb', bindir+'/gpv2nc', 0755, true
