diff options
| author | Michael Neves | 2013-05-14 13:21:27 +0200 |
|---|---|---|
| committer | Michael Neves | 2013-05-14 13:21:27 +0200 |
| commit | 97b27ddaee661d5a87584948654157f202258a81 (patch) | |
| tree | 973018bdbb0abab7b4da05ae0140f43ba96449a0 /remote/modules | |
| parent | vmware (diff) | |
| parent | Updat eto generate_bootmenu (diff) | |
| download | tm-scripts-97b27ddaee661d5a87584948654157f202258a81.tar.gz tm-scripts-97b27ddaee661d5a87584948654157f202258a81.tar.xz tm-scripts-97b27ddaee661d5a87584948654157f202258a81.zip | |
Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts
Diffstat (limited to 'remote/modules')
| -rw-r--r-- | remote/modules/vmplayer/vmplayer.build | 53 |
1 files changed, 31 insertions, 22 deletions
diff --git a/remote/modules/vmplayer/vmplayer.build b/remote/modules/vmplayer/vmplayer.build index c0067b01..63f44fdd 100644 --- a/remote/modules/vmplayer/vmplayer.build +++ b/remote/modules/vmplayer/vmplayer.build @@ -49,29 +49,30 @@ build() { post_copy() { # FIXME: gconftool is copied without dependencies - tarcopy "$(find /usr/lib/ -name gconv -type d) $(which gconftool-2)" "$TARGET_BUILD_DIR" + #tarcopy "$(find /usr/lib/ -name gconv -type d)" "$TARGET_BUILD_DIR" + : } build_modules(){ pdebug "PAtCHIGN" # need to be in src - cd "$MODULE_DIR"/src || perror "Could not cd to '$MODULE_DIR/src'" + cd "$MODULE_DIR/src" || perror "Could not cd to '$MODULE_DIR/src'" local VMWARE_MODCONFIG="$MODULE_DIR/src/vmware-vmx/bin/vmware-modconfig" [ -e "$VMWARE_MODCONFIG" ] && chmod +x "$VMWARE_MODCONFIG" || perror "Could not find $VMWARE_MODCONFIG" # link vmware-modconfig-console in the build dir local MANIFEST="$MODULE_DIR/src/vmware-vmx/manifest.xml" - local BUILD_NUMBER=$(grep -o -E '<buildNumber>[0-9]*</buildNumber>' "$MANIFEST"|grep -o -E '[0-9]*') - local VERSION=$(grep -o -E '<version>[0-9.]*</version>' "$MANIFEST"|grep -o -E '[0-9.]*') - local CORE_VERSION=$(grep -o -E '<coreVersion>[0-9.]*</coreVersion>' "$MANIFEST"|grep -o -E '[0-9.]*') + local BUILD_NUMBER="$(grep -o -E '<buildNumber>[0-9]*</buildNumber>' "$MANIFEST"|grep -o -E '[0-9]*')" + local VERSION="$(grep -o -E '<version>[0-9.]*</version>' "$MANIFEST"|grep -o -E '[0-9.]*')" + local CORE_VERSION="$(grep -o -E '<coreVersion>[0-9.]*</coreVersion>' "$MANIFEST"|grep -o -E '[0-9.]*')" # /etc/vmware/config gen - sed -i.bak1 '/^ETCDIR/d;/^VMISETCDIR/d;/bootstrap/d' $VMWARE_MODCONFIG - sed -i.bak2 "s/libdir=.*/libdir=$(echo $MODULE_BUILD_DIR | escape_replace)\/usr\/lib\/vmware/g" $VMWARE_MODCONFIG - sed -i.bak3 "s/set\ -e/set\ -e\nPREFIX=\"\/usr\"\nBINDIR=\"\/usr\/bin\"\nSBINDIR=\"\/usr\/sbin\"\nLIBDIR=\"\/usr\/lib\"\nDATADIR=\"\/usr\/share\"\nSYSCONFDIR=\"\/etc\"\nDOCDIR=\"\/usr\/share\/doc\"\nMANDIR=\"\/usr\/share\/man\"\nINCLUDEDIR=\"\/usr\/include\"\nINITDIR=\"\/etc\"\nINITSCRIPTDIR=\"\/etc\/init.d\"\nVMWARE\_INSTALLER=\"\/usr\/lib\/vmware-installer\/$CORE_VERSION\"\nVERSION=\"$CORE_VERSION\"\nVMISVERSION=\"$CORE_VERSION\"\nVMISPYVERSION=\"25\"/g" "$VMWARE_MODCONFIG" + sed -i.bak1 '/^ETCDIR/d;/^VMISETCDIR/d;/bootstrap/d' "$VMWARE_MODCONFIG" + sed -i.bak2 "s/libdir=.*/libdir=$(echo $MODULE_BUILD_DIR | escape_replace)\/usr\/lib\/vmware/g" "$VMWARE_MODCONFIG" + sed -i.bak3 "s#set -e#set -e\nPREFIX=\"/usr\"\nBINDIR=\"/usr/bin\"\nSBINDIR=\"/usr/sbin\"\nLIBDIR=\"/usr/lib\"\nDATADIR=\"/usr/share\"\nSYSCONFDIR=\"/etc\"\nDOCDIR=\"/usr/share/doc\"\nMANDIR=\"/usr/share/man\"\nINCLUDEDIR=\"/usr/include\"\nINITDIR=\"/etc\"\nINITSCRIPTDIR=\"/etc/init.d\"\nVMWARE_INSTALLER=\"/usr/lib/vmware-installer/$CORE_VERSION\"\nVERSION=\"$CORE_VERSION\"\nVMISVERSION=\"$CORE_VERSION\"\nVMISPYVERSION=\"25\"#g" "$VMWARE_MODCONFIG" - [ -e /etc/vmware/config ] && cp /etc/vmware/config /etc/vmware/config.mltk.bak - cat > /etc/vmware/config << EOF + [ -e "/etc/vmware/config" ] && cp "/etc/vmware/config" "/etc/vmware/config.mltk.bak" + cat > "/etc/vmware/config" << EOF .encoding = "UTF-8" installerDefaults.componentDownloadEnabled = "yes" installerDefaults.dataCollectionEnabled = "no" @@ -98,26 +99,34 @@ product.version = "9.0.1" workstation.product.version = "9.0.1" product.name = "VMware Workstation" EOF - mkdir -p $MODULE_BUILD_DIR/usr/lib/vmware/modules - ln -sf $MODULE_DIR/src/vmware-vmx/extra/modules.xml $MODULE_BUILD_DIR/usr/lib/vmware/modules/ - ln -sf $MODULE_DIR/src/vmware-vmx/lib/modules/source $MODULE_BUILD_DIR/usr/lib/vmware/modules/ + mkdir -p "$MODULE_BUILD_DIR/usr/lib/vmware/modules" + ln -sf "$MODULE_DIR/src/vmware-vmx/extra/modules.xml" "$MODULE_BUILD_DIR/usr/lib/vmware/modules/" + ln -sf "$MODULE_DIR/src/vmware-vmx/lib/modules/source" "$MODULE_BUILD_DIR/usr/lib/vmware/modules/" - ln -sf appLoader $MODULE_BUILD_DIR/usr/lib/vmware/bin/vmware-modconfig - ln -sf appLoader $MODULE_BUILD_DIR/usr/lib/vmware/bin/vmware-modconfig-console + ln -sf "appLoader" "$MODULE_BUILD_DIR/usr/lib/vmware/bin/vmware-modconfig" + ln -sf "appLoader" "$MODULE_BUILD_DIR/usr/lib/vmware/bin/vmware-modconfig-console" - [ ! -e "$MODULES_DIR"/kernel/ksrc/include/generated/utsrelease.h ] && perror "Could not find uts release!!!" - local UTS_RELEASE=$(cat "$MODULES_DIR"/kernel/ksrc/include/generated/utsrelease.h |awk -F "\"" '{print $2}') + [ ! -e "$MODULES_DIR/kernel/ksrc/include/generated/utsrelease.h" ] && perror "Could not find uts release!!!" + local UTS_RELEASE="$(cat "$MODULES_DIR/kernel/ksrc/include/generated/utsrelease.h" | awk -F '"' '{print $2}')" + pinfo "Patching vmblock.tar" + cd "$MODULE_BUILD_DIR/usr/lib/vmware/modules/source" || perror "cd failed." + tar xf "vmblock.tar" || perror "untar of vmblock.tar failed." + for sourcefile in $(grep -l -r -E '\sputname' "vmblock-only/"); do + sed -r -i 's/\sputname/__putname/g' "$sourcefile" || perror "sed of $sourcefile failed." + done + tar cf "vmblock.tar" "vmblock-only/" || perror "repacking of vmblock.tar failed." + cd - - pinfo "KOMPALIER" + pinfo "KOMPALIERE VMWARE KERNEL MODULE" for MOD in vsock vmblock vmmon vmnet vmci; do - pdebug "Kompaliere $MOD" - $VMWARE_MODCONFIG --console --build-mod -k $UTS_RELEASE $MOD $(which gcc) $MODULES_DIR/kernel/ksrc/include vmplayer $MOD + pinfo "Kompaliere $MOD" + "$VMWARE_MODCONFIG" --console --build-mod -k "$UTS_RELEASE $MOD" "$(which gcc)" "$MODULES_DIR/kernel/ksrc/include" "vmplayer" "$MOD" done cd - - mkdir -p "$TARGET_BUILD_DIR"/lib/modules/vmware/ - cp "/lib/modules/$UTS_RELEASE/vmplayer/"* "$TARGET_BUILD_DIR"/lib/modules/vmware/ || perror "Could not cp vmware modules to target!" + mkdir -p "$TARGET_BUILD_DIR/lib/modules/vmware/" + cp "/lib/modules/$UTS_RELEASE/vmplayer/"* "$TARGET_BUILD_DIR/lib/modules/vmware/" || perror "Could not cp vmware modules to target!" } |
