Index: /trunk/src/VBox/Installer/linux/debian/rules
===================================================================
--- /trunk/src/VBox/Installer/linux/debian/rules	(revision 35935)
+++ /trunk/src/VBox/Installer/linux/debian/rules	(revision 35936)
@@ -37,4 +37,5 @@
 #  NOWEBSVC=1       don't build the webservice API, default for OSE
 #  STAGEDISO=<path> don't build the VBoxAdditions, use the precompiled .iso
+#  PKGDIR=<path>    where to store the final package(s)
 #  BLEEDING_EDGE=xyz
 
@@ -43,5 +44,5 @@
 current  := $(shell pwd)
 vboxroot := $(shell cd ../../../..; pwd)
-pkgdir   := $(shell cd ../../../../..; pwd)
+pkgdir   := $(if $(PKGDIR),$(PKGDIR),$(shell cd ../../../../..; pwd))
 builddir := $(current)/debian/builddir
 moddir   := $(current)/debian/modules
Index: /trunk/src/VBox/Installer/linux/rpm/rules
===================================================================
--- /trunk/src/VBox/Installer/linux/rpm/rules	(revision 35935)
+++ /trunk/src/VBox/Installer/linux/rpm/rules	(revision 35936)
@@ -33,5 +33,5 @@
 current  := $(shell pwd)
 vboxroot := $(shell cd ../../../../; pwd)
-pkgdir   := $(shell cd ../../../../..; pwd)
+pkgdir   := $(if $(PKGDIR),$(PKGDIR),$(shell cd ../../../../..; pwd))
 builddir := $(current)/rpm/builddir
 rpmlib   := $(shell if [ `uname -m` = "x86_64" ]; then echo "lib64"; else echo "lib"; fi)
@@ -188,5 +188,5 @@
 	rm -f /usr/src/packages/SPECS/*
 	rpmbuild -tb --clean rpm/VirtualBox.tar.bz2
-	mv /usr/src/packages/RPMS/*/$(verpkg)-debug* $(vboxroot)/.. || true
+	mv /usr/src/packages/RPMS/*/$(verpkg)-debug* $(pkgdir) || true
 	file=`find /usr/src/packages/RPMS -name $(verpkg)*rpm -print`; \
 	    mv $$file $(pkgdir)
