build: Configure scripts to use the correct lib directory

When installing through the PKGBUILD, a non-blank DESTDIR is used and
the ocarina-* scripts are configured to use the package directory rather
than the installed directory.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
Bryan Schumaker 2012-02-17 22:06:45 -05:00
parent f6fd7915c9
commit ed0ace5366
1 changed files with 3 additions and 2 deletions

View File

@ -66,7 +66,8 @@ env.Alias("tests", [version_h] + [test_list]);
# Install Ocarina
scripts = os.listdir("scripts/")
lib = DESTDIR + PREFIX + "/lib/ocarina" + POSTFIX
baselib = PREFIX + "/lib/ocarina" + POSTFIX
lib = DESTDIR + baselib
bin = DESTDIR + PREFIX + "/bin/"
images = lib + "/images"
env.Install(lib, ocarina)
@ -81,7 +82,7 @@ def process_script(target, source, env):
ocarina = ocarina + "-debug"
saria = saria + "-debug"
for line in open(source[0].rfile().abspath):
line = line.replace("%%BIN%%", lib + "/ocarina.bin")
line = line.replace("%%BIN%%", baselib + "/ocarina.bin")
line = line.replace("%%OCARINA%%", ocarina)
line = line.replace("%%SARIA%%", saria)
f.write(line)