diff mbox

[3/5] dupdate: Add USE flag for setting unpack dir

Message ID 19def0b7a5f7cde860663621ee49ea2b1afd263e.1388663997.git.christian.braunersorensen@prevas.dk
State Superseded
Delegated to: Esben Haabendal
Headers show

Commit Message

christian.braunersorensen@prevas.dk Jan. 2, 2014, 12:01 p.m. UTC
From: Christian Sørensen <christian.braunersorensen@prevas.dk>

USE_dupdate_unpack_dir may be set to the location to where dupdate packages
are unpacked.
---
 recipes/dupdate/dupdate_2.0.0.oe | 13 +++++++++++++
 1 file changed, 13 insertions(+)
diff mbox

Patch

diff --git a/recipes/dupdate/dupdate_2.0.0.oe b/recipes/dupdate/dupdate_2.0.0.oe
index 7e9f1ca..666d25d 100644
--- a/recipes/dupdate/dupdate_2.0.0.oe
+++ b/recipes/dupdate/dupdate_2.0.0.oe
@@ -3,3 +3,16 @@  require dupdate.inc
 SRC_REV ?= "tag=v${PV}"
 
 SRC_URI:>USE_sysvinit += " file://splash_progress.patch"
+
+RECIPE_FLAGS += "dupdate_unpack_dir"
+DEFAULT_USE_dupdate_unpack_dir = "none"
+ADD_MOVE_ARG = ""
+ADD_MOVE_ARG:USE_dupdate_unpack_dir = "do_configure_unpack_dir"
+
+do_configure[postfuncs] += "do_configure_unpack_dir"
+do_configure_unpack_dir () {
+	if [ "${USE_dupdate_unpack_dir}" != "none" ]; then
+		sed -i -e 's/\(ARGS=".*\)\"/\1 -u ${USE_dupdate_unpack_dir}\"/' \
+			${S}/src/dupdate.sh
+	fi
+}