summaryrefslogtreecommitdiffstats
path: root/package/pseudo
diff options
context:
space:
mode:
Diffstat (limited to 'package/pseudo')
-rw-r--r--package/pseudo/pseudo-wrapper12
-rw-r--r--package/pseudo/pseudo.mk6
2 files changed, 18 insertions, 0 deletions
diff --git a/package/pseudo/pseudo-wrapper b/package/pseudo/pseudo-wrapper
new file mode 100644
index 0000000000..feaa7fcecb
--- /dev/null
+++ b/package/pseudo/pseudo-wrapper
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+export PSEUDO_PREFIX="$(dirname "${0%/*}")"
+export PSEUDO_OPTS="-t0"
+if [ -n "${TARGET_DIR}" ]; then
+ export PSEUDO_PASSWD="${TARGET_DIR}"
+fi
+if [ -n "${BASE_DIR}" ]; then
+ export PSEUDO_LOCALSTATEDIR="${BASE_DIR}/build/.pseudodb"
+fi
+
+exec "${0%-wrapper}" "${@}"
diff --git a/package/pseudo/pseudo.mk b/package/pseudo/pseudo.mk
index a924e10c45..7701825343 100644
--- a/package/pseudo/pseudo.mk
+++ b/package/pseudo/pseudo.mk
@@ -26,6 +26,12 @@ HOST_PSEUDO_CONF_OPTS = \
--libdir=$(HOST_DIR)/usr/lib \
--with-sqlite=$(HOST_DIR)/usr
+define HOST_PSEUDO_INSTALL_WRAPPER
+ $(INSTALL) -D -m 0755 $(HOST_PSEUDO_PKGDIR)/pseudo-wrapper \
+ $(HOST_DIR)/usr/bin/pseudo-wrapper
+endef
+HOST_PSEUDO_POST_INSTALL_HOOKS += HOST_PSEUDO_INSTALL_WRAPPER
+
define HOST_PSEUDO_FAKEROOT_SYMLINK
ln -sf pseudo $(HOST_DIR)/usr/bin/fakeroot
endef
OpenPOWER on IntegriCloud