summaryrefslogtreecommitdiffstats
path: root/system/open-vm-tools
diff options
context:
space:
mode:
author JEREMY HOCDE2017-07-20 08:41:19 +0200
committer Willy Sudiarto Raharjo2017-07-22 01:56:16 +0200
commit2f2c4818a9fa8c60376a332ef6d4118eaea1749d (patch)
treea9eeb0bdafa27131aa8de737329de39a92b8131b /system/open-vm-tools
parent189a02b9119629cb5a938c8caddc2f2d7a0b332b (diff)
downloadslackbuilds-2f2c4818a9fa8c60376a332ef6d4118eaea1749d.tar.gz
system/open-vm-tools: Added (VMware open-vm-tools project).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'system/open-vm-tools')
-rw-r--r--system/open-vm-tools/README8
-rw-r--r--system/open-vm-tools/doinst.sh25
-rw-r--r--system/open-vm-tools/open-vm-tools.SlackBuild114
-rw-r--r--system/open-vm-tools/open-vm-tools.info10
-rw-r--r--system/open-vm-tools/rc.vmtoolsd58
-rw-r--r--system/open-vm-tools/slack-desc19
6 files changed, 234 insertions, 0 deletions
diff --git a/system/open-vm-tools/README b/system/open-vm-tools/README
new file mode 100644
index 0000000000..7f97995ca7
--- /dev/null
+++ b/system/open-vm-tools/README
@@ -0,0 +1,8 @@
+open-vm-tools (VMware open-vm-tools project)
+
+open-vm-tools is a set of services and modules that enable
+several features in VMware products for better management of,
+and seamless user interactions with, guests. It includes kernel
+modules for enhancing the performance of virtual machines
+running Linux or other VMware supported Unix like guest
+operating systems.
diff --git a/system/open-vm-tools/doinst.sh b/system/open-vm-tools/doinst.sh
new file mode 100644
index 0000000000..01ec4b2b83
--- /dev/null
+++ b/system/open-vm-tools/doinst.sh
@@ -0,0 +1,25 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+
+preserve_perms etc/rc.d/rc.vmtoolsd.new
diff --git a/system/open-vm-tools/open-vm-tools.SlackBuild b/system/open-vm-tools/open-vm-tools.SlackBuild
new file mode 100644
index 0000000000..a62ae18ff5
--- /dev/null
+++ b/system/open-vm-tools/open-vm-tools.SlackBuild
@@ -0,0 +1,114 @@
+#!/bin/sh
+
+# Slackware build script for open-vm-tools
+
+# Copyright 2017 Jeremy HOCDE
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=open-vm-tools
+VERSION=${VERSION:-10.1.5_5055683}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+SRCVER=$(echo $VERSION | tr _ -)
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$SRCVER
+tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz
+cd $PRGNAM-$SRCVER
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+autoreconf -i
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --without-pam \
+ --without-xerces-c \
+ --without-x \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
+
+mkdir -p $PKG/etc/rc.d
+cp $CWD/rc.vmtoolsd $PKG/etc/rc.d/rc.vmtoolsd.new
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+find $PKG -name perllocal.pod \
+ -o -name ".packlist" \
+ -o -name "*.bs" \
+ | xargs rm -f
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ INSTALL LICENSE README docs/ \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/open-vm-tools/open-vm-tools.info b/system/open-vm-tools/open-vm-tools.info
new file mode 100644
index 0000000000..7e0f96afab
--- /dev/null
+++ b/system/open-vm-tools/open-vm-tools.info
@@ -0,0 +1,10 @@
+PRGNAM="open-vm-tools"
+VERSION="10.1.5_5055683"
+HOMEPAGE="https://github.com/vmware/open-vm-tools"
+DOWNLOAD="https://github.com/vmware/open-vm-tools/releases/download/stable-10.1.5/open-vm-tools-10.1.5-5055683.tar.gz"
+MD5SUM="00da6d4abbd49449a0409916daa4c808"
+DOWNLOAD_x86_64="https://github.com/vmware/open-vm-tools/releases/download/stable-10.1.5/open-vm-tools-10.1.5-5055683.tar.gz"
+MD5SUM_x86_64="00da6d4abbd49449a0409916daa4c808"
+REQUIRES="libmspack xml-security-c libdnet"
+MAINTAINER="JEREMY HOCDE"
+EMAIL="jeremyhocde@gmail.com"
diff --git a/system/open-vm-tools/rc.vmtoolsd b/system/open-vm-tools/rc.vmtoolsd
new file mode 100644
index 0000000000..bbecb2329d
--- /dev/null
+++ b/system/open-vm-tools/rc.vmtoolsd
@@ -0,0 +1,58 @@
+#!/bin/sh
+# Start/stop/restart open-vm-tools.
+
+openvmtools_check() {
+ vmware-checkvm
+ if [ $? -ne 0 ]; then
+ echo "eRRoR with vmware-checkvm"
+ exit 1
+ fi
+}
+
+openvmtools_start() {
+ openvmtools_check
+ CMDLINE="/usr/bin/vmtoolsd --background=/var/run/vmtoolsd.pid"
+ echo -n "Starting vmtoolsd: $CMDLINE"
+ $CMDLINE || exit 2
+ echo
+}
+
+openvmtools_stop() {
+ VMPID=$(cat /var/run/vmtoolsd.pid)
+ echo -n "Stopping vmtoolsd (PID $VMPID)..."
+ kill -9 $VMPID
+ echo
+}
+
+openvmtools_restart() {
+ openvmtools_stop
+ sleep 1
+ openvmtools_start
+}
+
+# Check if openvmtools is running
+openvmtools_status() {
+ if [ -e /var/run/vmtoolsd.pid ]; then
+ echo "vmtoolsd is running."
+ else
+ echo "vmtoolsd is stopped."
+ exit 1
+ fi
+}
+
+case "$1" in
+'start')
+ openvmtools_start
+ ;;
+'stop')
+ openvmtools_stop
+ ;;
+'restart')
+ openvmtools_restart
+ ;;
+'status')
+ openvmtools_status
+ ;;
+*)
+ echo "usage $0 start|stop|restart|status"
+esac
diff --git a/system/open-vm-tools/slack-desc b/system/open-vm-tools/slack-desc
new file mode 100644
index 0000000000..f02cecfd85
--- /dev/null
+++ b/system/open-vm-tools/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+open-vm-tools: open-vm-tools (VMware open-vm-tools project)
+open-vm-tools:
+open-vm-tools: open-vm-tools is a set of services and modules that enable
+open-vm-tools: several features in VMware products for better management of,
+open-vm-tools: and seamless user interactions with, guests. It includes kernel
+open-vm-tools: modules for enhancing the performance of virtual machines
+open-vm-tools: running Linux or other VMware supported Unix like guest
+open-vm-tools: operating systems.
+open-vm-tools:
+open-vm-tools: https://github.com/vmware/open-vm-tools
+open-vm-tools: