[Lunar-commits] <moonbase> VirtualBox: tidyup

Paul Bredbury brebs at lunar-linux.org
Tue Mar 8 14:14:18 CET 2011


commit 6430bdbc4c3f058f3f7e5fce1d59f88769dd9223
Author: Paul Bredbury <brebs at lunar-linux.org>
Date:   Tue Mar 8 20:14:18 2011 +0700

    VirtualBox: tidyup
    
    /etc/vbox/vbox.cfg wasn't in "lvu installed VirtualBox".
    
    Added check that gtk-update-icon-cache exists.
    
    Removed trailing slash from MODULE_PREFIX, because no other modules have
    one in a PREFIX in DETAILS.
---
 virtual/VirtualBox/BUILD      |   26 ++++++++++++++------------
 virtual/VirtualBox/DETAILS    |    2 +-
 virtual/VirtualBox/VirtualBox |    2 +-
 3 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/virtual/VirtualBox/BUILD b/virtual/VirtualBox/BUILD
index 1faef1b..f26fd8f 100644
--- a/virtual/VirtualBox/BUILD
+++ b/virtual/VirtualBox/BUILD
@@ -22,7 +22,7 @@
   OPTS+=" --disable-hardening"   &&
   ./configure $OPTS              &&
   source ./env.sh                &&
-  if !( module_installed Linux-PAM ); then
+  if ! module_installed Linux-PAM ; then
      sedit "s/VBOX_WITH_PAM/VBOX_WITHOUT_PAM/" Config.kmk
   fi &&
   kmk                            &&
@@ -41,29 +41,31 @@
   mkdir -p $MODULE_PREFIX &&
 
   # Install contents of the build directory
-  cp -R out/linux.x86/release/bin/* $MODULE_PREFIX &&
-
-  # Install the startup script to /usr/bin
-  install -m 755 $SCRIPT_DIRECTORY/VirtualBox /usr/bin &&
+  cp -R out/linux.x86/release/bin/* $MODULE_PREFIX/ &&
 
+  cp $SCRIPT_DIRECTORY/VirtualBox . &&
   # Substitute $INSTALL_DIR with the module prefix
-  sedit 's:$INSTALL_DIR:'$MODULE_PREFIX':g' /usr/bin/VirtualBox &&
+  sedit 's:$INSTALL_DIR:'$MODULE_PREFIX':g' VirtualBox &&
+  # Install the startup script to /usr/bin
+  install -m 755 VirtualBox /usr/bin/ &&
 
   # Install the config file to let VirtualBox know it is installed
-  mkdir -p /etc/vbox &&
-  echo "INSTALL_DIR=$MODULE_PREFIX" > /etc/vbox/vbox.cfg &&
+  echo "INSTALL_DIR=$MODULE_PREFIX" >  vbox.cfg &&
+  install -Dm 644 {,/etc/vbox/}vbox.cfg &&
 
   if in_depends $MODULE qt4 ; then
     # File path for PDF, and make name more recognizable
     sed -i -e "s:/opt/VirtualBox/:/usr/share/doc/VirtualBox/:" -e "s:Oracle VM VirtualBox:VirtualBox Oracle VM:1" /usr/lib/virtualbox/virtualbox.desktop &&
     # Install .desktop entry and icon, then update the icon cache
-    install -Dm 644 /usr/lib/virtualbox/virtualbox.desktop /usr/share/applications/virtualbox.desktop &&
-    install -Dm 644 /usr/lib/virtualbox/VBox.png /usr/share/icons/hicolor/32x32/apps/VBox.png &&
-    gtk-update-icon-cache /usr/share/icons/hicolor
+    install -Dm 644 /usr/{lib/virtualbox,share/applications}/virtualbox.desktop &&
+    install -Dm 644 /usr/{lib/virtualbox,share/icons/hicolor/32x32/apps}/VBox.png &&
+    if [ -x /usr/bin/gtk-update-icon-cache ] ; then
+      gtk-update-icon-cache /usr/share/icons/hicolor
+    fi
   fi &&
 
   if in_depends $MODULE texlive ; then
-    install -Dm 644 /usr/lib/virtualbox/UserManual.pdf /usr/share/doc/VirtualBox/UserManual.pdf
+    install -Dm 644 /usr/{lib/virtualbox,share/doc/VirtualBox}/UserManual.pdf
   fi &&
 
   # Create the vboxusers group
diff --git a/virtual/VirtualBox/DETAILS b/virtual/VirtualBox/DETAILS
index 777b5f1..f638b87 100644
--- a/virtual/VirtualBox/DETAILS
+++ b/virtual/VirtualBox/DETAILS
@@ -7,7 +7,7 @@ SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MODULE-${VERSION}_OSE
      SOURCE2_URL=$PATCH_URL
       SOURCE_VFY=sha1:4ca74dd7ac4314058df811d6e69f60d412456328
      SOURCE2_VFY=sha1:5eae1a7c82d8ebf8161da4ee724052125f2a6ffd
-   MODULE_PREFIX=${VIRTUALBOX_PREFIX:-/usr/lib/virtualbox/}
+   MODULE_PREFIX=${VIRTUALBOX_PREFIX:-/usr/lib/virtualbox}
         WEB_SITE=http://virtualbox.org
          ENTERED=20071004
          UPDATED=20110217
diff --git a/virtual/VirtualBox/VirtualBox b/virtual/VirtualBox/VirtualBox
index 3445963..f0631b0 100755
--- a/virtual/VirtualBox/VirtualBox
+++ b/virtual/VirtualBox/VirtualBox
@@ -74,7 +74,7 @@ WARNING: The compilation of the vboxdrv.ko kernel module failed during the
 EOF
 fi
 
-export LD_LIBRARY_PATH="$INSTALL_DIR${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
+export LD_LIBRARY_PATH="$INSTALL_DIR/${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
 
 SERVER_PID=`ps -U \`whoami\` | grep VBoxSVC | awk '{ print $1 }'`
 if [ -z "$SERVER_PID" ]; then


More information about the Lunar-commits mailing list