Index: trunk/src/VBox/Installer/linux/debian/rules
===================================================================
--- trunk/src/VBox/Installer/linux/debian/rules	(revision 58385)
+++ trunk/src/VBox/Installer/linux/debian/rules	(revision 58386)
@@ -213,5 +213,4 @@
 	install -d -g 0 -o 0 $(prefix)/usr/lib
 	install -d -g 0 -o 0 $(prefix)/usr/bin
-	install -d -g 0 -o 0 $(prefix)/usr/lib/$(package)
 	install -d -g 0 -o 0 $(prefix)/usr/share/$(package)
 	install -d -g 0 -o 0 $(prefix)/usr/share/doc/$(verpkg)
@@ -236,5 +235,4 @@
 	done)
 	$(if $(NOQT),,rmdir $(archdir)/icons)
-	install -d -g 0 -o 0 $(prefix)/usr/lib/$(package)/ExtensionPacks
 	$(if $(NOQT),,mv $(archdir)/virtualbox.xml debian/$(verpkg).sharedmimeinfo)
 	install -d -g 0 -o 0 $(prefix)/usr/share/lintian/overrides
@@ -243,42 +241,12 @@
 	    debian/lintian-override.in > \
 	   $(prefix)/usr/share/lintian/overrides/$(verpkg)
-	mv $(archdir)/VBoxEFI32.fd $(prefix)/usr/lib/$(package)
-	mv $(archdir)/VBoxEFI64.fd $(prefix)/usr/lib/$(package)
 	mv $(archdir)/VBox.png \
 	   $(prefix)/usr/share/pixmaps/VBox.png
-	mv $(archdir)/*.rc $(prefix)/usr/lib/$(package)
-	mv $(archdir)/*.r0 $(prefix)/usr/lib/$(package)
-	mv $(archdir)/*.rel $(prefix)/usr/lib/$(package) || true
-	mv $(archdir)/VBoxNetDHCP $(prefix)/usr/lib/$(package)
-	mv $(archdir)/VBoxNetAdpCtl $(prefix)/usr/lib/$(package)
-	if [ -f $(archdir)/VBoxVolInfo ]; then \
-	    mv $(archdir)/VBoxVolInfo $(prefix)/usr/lib/$(package); \
-	fi
-	mv $(archdir)/VBoxXPCOMIPCD $(prefix)/usr/lib/$(package)
-	mv $(archdir)/components $(prefix)/usr/lib/$(package)/components
-	mv $(archdir)/*.so $(prefix)/usr/lib/$(package)
-	mv $(archdir)/*.so.4 $(prefix)/usr/lib/$(package) || true
-	$(if $(NOQT),,mv $(archdir)/VBoxTestOGL $(prefix)/usr/lib/$(package))
-	$(if $(NOQT),,mv $(archdir)/nls $(prefix)/usr/share/$(package))
 	mv $(archdir)/src  $(prefix)/usr/share/$(package)
 	rm $(archdir)/VBox.sh
-	export VBOX_INSTALL_PATH=/usr/lib/$(package) && \
-	    cd $(builddir)/bin/sdk/installer && \
-	    python ./vboxapisetup.py install --root $(prefix)
-	rm -rf $(archdir)/sdk/installer
-	mv $(archdir)/vboxshell.py $(prefix)/usr/lib/$(package)
-	mv $(archdir)/sdk $(prefix)/usr/lib/$(package)
 	install -D -g 0 -o 0 -m 644 VBox.sh $(prefix)/usr/bin/VBox
 	mv $(archdir)/VBoxSysInfo.sh $(prefix)/usr/share/$(package)
-	for i in VBoxManage VBoxSVC $(if $(HEADLESS),,VBoxSDL) \
-	    $(if $(NOQT),,VirtualBox) VBoxHeadless \
-	    VBoxExtPackHelperApp VBoxBalloonCtrl VBoxAutostart \
-	    $(if $(NOWEBSVC),,vboxwebsrv webtest) \
-        $(if $(NOVBOXIMG),,vbox-img) VBoxNetNAT; do \
-	    mv $(archdir)/$$i $(prefix)/usr/lib/$(package); done
-	$(if $(VNC),mv $(archdir)/ExtensionPacks/VNC $(prefix)/usr/lib/$(package)/ExtensionPacks,)
 	if [ -r $(archdir)/VBoxDTrace ]; then \
 	    mv $(archdir)/VBoxDTrace $(prefix)/usr/bin; \
-	    mv $(archdir)/dtrace $(prefix)/usr/lib/$(package); \
 	fi
 	mv $(archdir)/VBoxTunctl $(prefix)/usr/bin
@@ -296,5 +264,4 @@
 	    done)
 ifeq ($(ose),)
-	$(if $(NOQT),,mv $(archdir)/kchmviewer $(prefix)/usr/lib/$(package))
 	dh_installdocs \
 	    $(archdir)/UserManual*.pdf $(archdir)/VirtualBox*.chm \
@@ -306,5 +273,4 @@
 	$(if $(HEADLESS),,mv $(archdir)/rdesktop-vrdp $(prefix)/usr/bin)
 	$(if $(HEADLESS),,mv $(archdir)/rdesktop-vrdp-keymaps $(prefix)/usr/share/$(package))
-	if [ -d $(archdir)/accessible ]; then mv $(archdir)/accessible $(prefix)/usr/lib/virtualbox; fi
 else
 	dh_installdocs \
@@ -314,14 +280,11 @@
 	    mv $(archdir)/$$i $(prefix)/usr/share/$(package); done
 endif
-	for i in vboxdrv.sh vboxballoonctrl-service.sh vboxautostart-service.sh \
-	    vboxweb-service.sh postinst-common.sh prerm-common.sh routines.sh \
-	    VBoxCreateUSBNode.sh; do \
-	    mv $(archdir)/$$i $(prefix)/usr/lib/$(package); \
-	done
-	rmdir $(archdir)/additions
-	$(if $(VNC),rmdir $(archdir)/ExtensionPacks)
 	rm -r $(archdir)/helpers
 	rm -r $(archdir)/scripts
-	rmdir $(archdir)
+	mv $(archdir) $(prefix)/usr/lib/$(package)
+	export VBOX_INSTALL_PATH=/usr/lib/$(package) && \
+	    cd $(builddir)/bin/sdk/installer && \
+	    python ./vboxapisetup.py install --root $(prefix)
+	rm -rf $(prefix)/usr/lib/$(package)/sdk/installer
 	ln -s ../VBoxVMM.so $(prefix)/usr/lib/$(package)/components/VBoxVMM.so
 	rmdir $(prefix)/opt
Index: trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
===================================================================
--- trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec	(revision 58385)
+++ trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec	(revision 58386)
@@ -17,4 +17,5 @@
 %define %SPEC% 1
 %define %OSE% 1
+%define VBOXDOCDIR %{_defaultdocdir}/%NAME%-%VER%
 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
 
@@ -69,37 +70,16 @@
 install -m 755 -d $RPM_BUILD_ROOT/usr/share/pixmaps
 install -m 755 -d $RPM_BUILD_ROOT/usr/share/icons/hicolor
-install -m 755 -d $RPM_BUILD_ROOT%{_defaultdocdir}/virtualbox
+install -m 755 -d $RPM_BUILD_ROOT%{VBOXDOCDIR}
 install -m 755 -d $RPM_BUILD_ROOT/usr/lib/virtualbox
-install -m 755 -d $RPM_BUILD_ROOT/usr/lib/virtualbox/ExtensionPacks
 install -m 755 -d $RPM_BUILD_ROOT/usr/share/virtualbox
 install -m 755 -d $RPM_BUILD_ROOT/usr/share/mime/packages
-mv VBoxEFI32.fd $RPM_BUILD_ROOT/usr/lib/virtualbox || true
-mv VBoxEFI64.fd $RPM_BUILD_ROOT/usr/lib/virtualbox || true
-mv *.rc $RPM_BUILD_ROOT/usr/lib/virtualbox
-mv *.r0 $RPM_BUILD_ROOT/usr/lib/virtualbox
-mv *.rel $RPM_BUILD_ROOT/usr/lib/virtualbox || true
-mv VBoxNetDHCP $RPM_BUILD_ROOT/usr/lib/virtualbox
-mv VBoxNetNAT $RPM_BUILD_ROOT/usr/lib/virtualbox
-mv VBoxNetAdpCtl $RPM_BUILD_ROOT/usr/lib/virtualbox
-if [ -f VBoxVolInfo ]; then
-  mv VBoxVolInfo $RPM_BUILD_ROOT/usr/lib/virtualbox
-fi
-mv VBoxXPCOMIPCD $RPM_BUILD_ROOT/usr/lib/virtualbox
-mv components $RPM_BUILD_ROOT/usr/lib/virtualbox/components
-mv *.so $RPM_BUILD_ROOT/usr/lib/virtualbox
-mv *.so.4 $RPM_BUILD_ROOT/usr/lib/virtualbox || true
-ln -s ../VBoxVMM.so $RPM_BUILD_ROOT/usr/lib/virtualbox/components/VBoxVMM.so
-mv VBoxTestOGL $RPM_BUILD_ROOT/usr/lib/virtualbox
-mv vboxshell.py $RPM_BUILD_ROOT/usr/lib/virtualbox
 (export VBOX_INSTALL_PATH=/usr/lib/virtualbox && \
   cd ./sdk/installer && \
   %{__python} ./vboxapisetup.py install --prefix %{_prefix} --root $RPM_BUILD_ROOT)
 rm -rf sdk/installer
-mv sdk $RPM_BUILD_ROOT/usr/lib/virtualbox
 mv nls $RPM_BUILD_ROOT/usr/share/virtualbox
 cp -a src $RPM_BUILD_ROOT/usr/share/virtualbox
 mv VBox.sh $RPM_BUILD_ROOT/usr/bin/VBox
 mv VBoxSysInfo.sh $RPM_BUILD_ROOT/usr/share/virtualbox
-mv VBoxCreateUSBNode.sh $RPM_BUILD_ROOT/usr/lib/virtualbox
 cp icons/128x128/virtualbox.png $RPM_BUILD_ROOT/usr/share/pixmaps/virtualbox.png
 cd icons
@@ -116,20 +96,4 @@
 rmdir icons
 mv virtualbox.xml $RPM_BUILD_ROOT/usr/share/mime/packages
-for i in VBoxManage VBoxSVC VirtualBox VBoxHeadless VBoxDTrace VBoxExtPackHelperApp VBoxBalloonCtrl VBoxAutostart vbox-img; do
-  mv $i $RPM_BUILD_ROOT/usr/lib/virtualbox; done
-if %WEBSVC%; then
-  for i in vboxwebsrv webtest; do
-    mv $i $RPM_BUILD_ROOT/usr/lib/virtualbox; done
-fi
-test -f VBoxSDL && mv VBoxSDL $RPM_BUILD_ROOT/usr/lib/virtualbox
-for i in VirtualBox VBoxHeadless VBoxNetDHCP VBoxNetNAT VBoxNetAdpCtl; do
-  chmod 4511 $RPM_BUILD_ROOT/usr/lib/virtualbox/$i; done
-if [ -f $RPM_BUILD_ROOT/usr/lib/virtualbox/VBoxVolInfo ]; then
-  chmod 4511 $RPM_BUILD_ROOT/usr/lib/virtualbox/VBoxVolInfo
-fi
-test -f VBoxSDL && chmod 4511 $RPM_BUILD_ROOT/usr/lib/virtualbox/VBoxSDL
-if [ -d ExtensionPacks/VNC ]; then
-  mv ExtensionPacks/VNC $RPM_BUILD_ROOT/usr/lib/virtualbox/ExtensionPacks
-fi
 mv VBoxTunctl $RPM_BUILD_ROOT/usr/bin
 %if %{?is_ose:0}%{!?is_ose:1}
@@ -159,7 +123,7 @@
   fi
 done
+rm -r src
 %endif
 %if %{?is_ose:0}%{!?is_ose:1}
-  mv kchmviewer $RPM_BUILD_ROOT/usr/lib/virtualbox
   for i in rdesktop-vrdp.tar.gz rdesktop-vrdp-keymaps; do
     mv $i $RPM_BUILD_ROOT/usr/share/virtualbox; done
@@ -168,14 +132,4 @@
 for i in additions/VBoxGuestAdditions.iso; do
   mv $i $RPM_BUILD_ROOT/usr/share/virtualbox; done
-if [ -d accessible ]; then
-  mv accessible $RPM_BUILD_ROOT/usr/lib/virtualbox
-fi
-mv vboxdrv.sh $RPM_BUILD_ROOT/usr/lib/virtualbox
-mv vboxballoonctrl-service.sh $RPM_BUILD_ROOT/usr/lib/virtualbox
-mv vboxautostart-service.sh $RPM_BUILD_ROOT/usr/lib/virtualbox
-mv vboxweb-service.sh $RPM_BUILD_ROOT/usr/lib/virtualbox
-mv postinst-common.sh $RPM_BUILD_ROOT/usr/lib/virtualbox
-mv prerm-common.sh $RPM_BUILD_ROOT/usr/lib/virtualbox
-mv routines.sh $RPM_BUILD_ROOT/usr/lib/virtualbox
 ln -s VBox $RPM_BUILD_ROOT/usr/bin/VirtualBox
 ln -s VBox $RPM_BUILD_ROOT/usr/bin/virtualbox
@@ -198,4 +152,16 @@
 mv virtualbox.desktop $RPM_BUILD_ROOT/usr/share/applications/virtualbox.desktop
 mv VBox.png $RPM_BUILD_ROOT/usr/share/pixmaps/VBox.png
+%{!?is_ose: mv LICENSE $RPM_BUILD_ROOT%{VBOXDOCDIR}}
+mv UserManual*.pdf $RPM_BUILD_ROOT%{VBOXDOCDIR}
+%{!?is_ose: mv VirtualBox*.chm $RPM_BUILD_ROOT%{VBOXDOCDIR}}
+mv * $RPM_BUILD_ROOT/usr/lib/virtualbox
+ln -s ../VBoxVMM.so $RPM_BUILD_ROOT/usr/lib/virtualbox/components/VBoxVMM.so
+for i in VirtualBox VBoxHeadless VBoxNetDHCP VBoxNetNAT VBoxNetAdpCtl; do
+  chmod 4511 $RPM_BUILD_ROOT/usr/lib/virtualbox/$i; done
+if [ -f $RPM_BUILD_ROOT/usr/lib/virtualbox/VBoxVolInfo ]; then
+  chmod 4511 $RPM_BUILD_ROOT/usr/lib/virtualbox/VBoxVolInfo
+fi
+test -f $RPM_BUILD_ROOT/usr/lib/virtualbox/VBoxSDL && \
+  chmod 4511 $RPM_BUILD_ROOT/usr/lib/virtualbox/VBoxSDL
 
 
@@ -318,7 +284,5 @@
 %files
 %defattr(-,root,root)
-%doc %{!?is_ose: LICENSE}
-%doc UserManual*.pdf
-%doc %{!?is_ose: VirtualBox*.chm}
+%doc %{VBOXDOCDIR}/*
 %{?rpm_suse: %{py_sitedir}/*}
 %{!?rpm_suse: %{python_sitelib}/*}
