summaryrefslogtreecommitdiffstats
path: root/main/open-vm-tools-grsec
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2011-02-14 09:40:24 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2011-02-14 09:41:38 +0000
commit57b2d07c06af589eeeff448b4e20b08c9112c7b7 (patch)
treed2d98578abc886b15ef632279c0cbee13342118b /main/open-vm-tools-grsec
parent9ab6240126746715f08ffbeb7472cf9f00673fdf (diff)
downloadaports-57b2d07c06af589eeeff448b4e20b08c9112c7b7.tar.bz2
aports-57b2d07c06af589eeeff448b4e20b08c9112c7b7.tar.xz
main/open-vm-tools: move from testing to main including grsec modules
Diffstat (limited to 'main/open-vm-tools-grsec')
-rw-r--r--main/open-vm-tools-grsec/APKBUILD61
-rw-r--r--main/open-vm-tools-grsec/vmware-modules.initd25
2 files changed, 86 insertions, 0 deletions
diff --git a/main/open-vm-tools-grsec/APKBUILD b/main/open-vm-tools-grsec/APKBUILD
new file mode 100644
index 000000000..064f8be87
--- /dev/null
+++ b/main/open-vm-tools-grsec/APKBUILD
@@ -0,0 +1,61 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+
+_flavor=grsec
+
+# source the kernel version
+if [ -f ../../main/linux-${_flavor}/APKBUILD ]; then
+ . ../../main/linux-${_flavor}/APKBUILD
+fi
+
+_kernelver="$pkgver-r$pkgrel"
+_abi_release=${pkgver}-${_flavor}
+_kpkgrel=$pkgrel
+_realname=open-vm-tools
+
+pkgname=open-vm-tools-$_flavor
+pkgver=2011.01.24
+_pkgsubver=354108
+pkgrel=1
+pkgdesc="The Open Virtual Machine Tools are the open source implementation of VMware Tools."
+url="http://open-vm-tools.sourceforge.net/"
+arch="all"
+license="LGPL"
+subpackages=""
+depends="linux-${_flavor}=${_kernelver}"
+makedepends="glib-dev gettext-dev linux-${_flavor}-dev=${_kernelver}"
+source="http://downloads.sourceforge.net/open-vm-tools/open-vm-tools-$pkgver-$_pkgsubver.tar.gz
+ vmware-modules.initd
+ "
+
+_builddir="$srcdir/$_realname-$pkgver-$_pkgsubver"
+
+prepare() {
+ cd "$_builddir"
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --without-pam \
+ --without-x \
+ --without-dnet \
+ --without-icu \
+ --without-procps \
+ --with-kernel-release="$_abi_release" \
+ || return 1
+ cd "$_builddir"/modules
+ make -j1 modules || return 1
+}
+
+package() {
+ cd "$_builddir"
+ install -D -m755 "$srcdir"/vmware-modules.initd \
+ "$pkgdir"/etc/init.d/vmware-modules || return 1
+ mkdir -p $pkgdir/lib/modules/$_abi_release/misc/
+ cd "$_builddir"/modules
+ for module in `find -type f -name '*.ko'`; do
+ install -D -m644 $module "$pkgdir/lib/modules/$_abi_release/misc/"
+ done
+}
+
+md5sums="b324efa55bb3f1198100cad838e9272b open-vm-tools-2011.01.24-354108.tar.gz
+f16058de6e4251a509f87017f1684887 vmware-modules.initd"
diff --git a/main/open-vm-tools-grsec/vmware-modules.initd b/main/open-vm-tools-grsec/vmware-modules.initd
new file mode 100644
index 000000000..4977aee7c
--- /dev/null
+++ b/main/open-vm-tools-grsec/vmware-modules.initd
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+
+MODULES="vmblock vmci vmhgfs vmsync vmxnet vsock"
+
+depend() {
+ before open-vm-tools
+}
+
+
+start() {
+ ebegin "Loading VMware kernel modules"
+ for mod in $MODULES; do
+ modprobe -q $mod
+ done
+ eend $?
+}
+
+stop() {
+ ebegin "Unloading VMware kernel modules"
+ for mod in $MODULES; do
+ rmmod $mod
+ done
+ eend $?
+}
+