install share files under ${PREFIX}/share/svi

This commit is contained in:
Josh Holtrop 2018-01-29 16:16:39 -05:00
parent 8777e3f758
commit e3c11407c3

View File

@ -1,8 +1,11 @@
import re
def options(opt): def options(opt):
opt.load("compiler_cxx") opt.load("compiler_cxx")
def configure(conf): def configure(conf):
conf.load("compiler_cxx") conf.load("compiler_cxx")
conf.define("SHARE_DIR", re.sub(r'/$', "", conf.options.prefix) + "/share/svi")
conf.check(header_name = "getopt.h") conf.check(header_name = "getopt.h")
conf.check_cfg(package = "ruby", args = "--cflags --libs", uselib_store = "ruby") conf.check_cfg(package = "ruby", args = "--cflags --libs", uselib_store = "ruby")
@ -12,3 +15,6 @@ def build(bld):
source = bld.path.ant_glob("src/**/*.cc"), source = bld.path.ant_glob("src/**/*.cc"),
cxxflags = ["-Wall", "-std=gnu++14"], cxxflags = ["-Wall", "-std=gnu++14"],
uselib = ["ruby"]) uselib = ["ruby"])
share_dir = bld.path.find_dir("share/svi")
bld.install_files("${PREFIX}/share/svi", share_dir.ant_glob("**/*"),
cwd = share_dir, relative_trick = True)