From 19c2ae6af1979cbb20d1ace6eff1e3911db189d5 Mon Sep 17 00:00:00 2001
From: Chris Lamb <lamby@debian.org>
Date: Fri, 24 Jul 2009 18:57:49 +0200
Subject: [PATCH 13/22] Allow installation of preload libraries into a non $(PREFIX)/lib directory

The justification here is that Debian policy only allows libraries in
the standard library paths if they are named according to their soname.
We could do this, but it's easier just to allow fiu-run to look in a
custom directory.

Signed-off-by: Chris Lamb <lamby@debian.org>
---
 preload/run/Makefile   |    5 ++++-
 preload/run/fiu-run.in |    2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/preload/run/Makefile b/preload/run/Makefile
index f69e035..ec419ea 100644
--- a/preload/run/Makefile
+++ b/preload/run/Makefile
@@ -14,6 +14,9 @@ endif
 # prefix for installing the binaries
 PREFIX=/usr/local
 
+# location of preload libraries
+PLIBPATH=$(PREFIX)/lib
+
 # install utility, we assume it's GNU/BSD compatible
 INSTALL=install
 
@@ -55,7 +58,7 @@ fiu_run_preload.so: build-flags $(OBJS)
 		-o fiu_run_preload.so
 
 fiu-run: build-flags fiu-run.in
-	cat fiu-run.in | sed "s+@@PREFIX@@+$(PREFIX)+g" > fiu-run
+	cat fiu-run.in | sed "s+@@PLIBPATH@@+$(PLIBPATH)+g" > fiu-run
 	chmod +x fiu-run
 
 install: fiu_run_preload.so fiu-run
diff --git a/preload/run/fiu-run.in b/preload/run/fiu-run.in
index 4870097..db33777 100644
--- a/preload/run/fiu-run.in
+++ b/preload/run/fiu-run.in
@@ -8,7 +8,7 @@
 FIFO_PREFIX="${TMPDIR:-/tmp}/fiu-ctrl"
 
 # default library path to look for preloader libraries
-PLIBPATH="@@PREFIX@@/lib"
+PLIBPATH="@@PLIBPATH@@"
 
 # the enable string to pass to the preload library (via the FIU_ENABLE
 # environment variable)
-- 
1.6.2.2.646.gb214

