aboutsummaryrefslogtreecommitdiffstats
path: root/main/open-vm-tools-grsec/APKBUILD
blob: 0d123ea78f6f533ed97c0af27120c96637f0f117 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>

_flavor=grsec
_kpkg=linux-$_flavor
_realname=open-vm-tools
_kver=3.14.4
_kpkgrel=2

_realver=9.4.0_p1280544
_ver=${_realver/_p/-}
_mypkgrel=0

# source open-vm-tools version
if [ -f ../main/$_realname/APKBUILD ]; then
	. ../main/$_realname/APKBUILD
	[ "${_realver}" != "$pkgver" ] && pkgname=$_realname-$_flavor \
		&& die "please set _realver to $pkgver"
fi

# source the kernel version
if [ -f ../main/linux-${_flavor}/APKBUILD ]; then
        . ../main/linux-${_flavor}/APKBUILD
	[ "$_kver" != "$pkgver" ] && die "please set _kver to $pkgver"
	[ "$_kpkgrel" != "$pkgrel" ] && die "please set _kpkgrel to $pkgrel"
fi

_abi_release=${_kver}-${_kpkgrel}-${_flavor}
_kernelver="$_kver-r$_kpkgrel"

pkgname="$_realname-$_flavor"
pkgver=$_kver
pkgrel=$(($_kpkgrel + $_mypkgrel))

pkgdesc="The Open Virtual Machine Tools are the open source implementation of VMware Tools."
url="http://open-vm-tools.sourceforge.net/"
arch=""
license="LGPL"
subpackages=""
depends="linux-${_flavor}=${_kernelver}"
depends_dev="bash glib-dev gettext-dev linux-${_flavor}-dev=${_kernelver}"
makedepends="$depends_dev"
source="http://downloads.sourceforge.net/project/open-vm-tools/open-vm-tools/stable-${_realver%.*}.x/open-vm-tools-${_ver}.tar.gz
	linux-3.10.patch
	kernel.patch
	vmware-modules.initd
	"
install_if="linux-${_flavor}=${_kernelver} open-vm-tools"

_builddir="$srcdir/$_realname-$_ver"

prepare() {
	cd "$_builddir"
	update_config_sub || return 1
        for i in $source; do
                case $i in
                *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
                esac
        done
}

build() {
	export GCC_SPECS=hardenednopie.specs
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--without-pam \
		--without-x \
		--without-dnet \
		--without-icu \
		--without-procps \
		--with-kernel-release="${_abi_release}" \
		|| return 1
	cd "$_builddir"/modules
	make -j1 modules MODULES="vmxnet vmhgfs" || return 1
}

package() {
	cd "$_builddir"
	install -D -m755 "$srcdir"/vmware-modules.initd \
		"$pkgdir"/etc/init.d/vmware-modules-${_flavor} || 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="91f74bf6e42a3f460a42b3be31db31dc  open-vm-tools-9.4.0-1280544.tar.gz
cc82715976e9af9fb8f44465af2ca5aa  linux-3.10.patch
70398edfbcac530ca9a7a4714bedffeb  kernel.patch
afba2c3487d0b12cee80eb2f04b05ba1  vmware-modules.initd"
sha256sums="5d30652eb0f6dc5e930781029c184837e700be5543b6a7116db4c62a6f3ca399  open-vm-tools-9.4.0-1280544.tar.gz
f3108ab321f9b32ecb59aa4760f9958f97335492345a04de79d95bd98a7af8ff  linux-3.10.patch
96b4f0bf5f956803fbdffb388488c7d425f99e22ca069a66bb0283bc5cae67ed  kernel.patch
6ceb5c75b002991c511d9dadb6cf91720771e76b701e5f2d91ac9ede4b168265  vmware-modules.initd"
sha512sums="07b36f49713140606f74864b59c2e01c9ed83a960dd3f5d172b84fc75e760f7370065774a0e26897924af60454c86b682ca0fd32276b0e9fb17b268247f8cbdf  open-vm-tools-9.4.0-1280544.tar.gz
0b36a6318ef419832817f22d50f85d8a5ae080e9496ecdf16753b17e8a693573e46eb896c3dc83a44fc596e6737130245663908befe8aa4a038e16b08cc499a3  linux-3.10.patch
af51159f7357b1442449ec11d9328b2051c2b3865044ff2db184ad522e3495a9a0a76a3cc01d82e79e7d7d293b43b0a9f10fa4767d2a5efd3d7095f598e6896c  kernel.patch
639098221975cadaed0ae0f32454a6718ceaa5f43f17d949a84a85dee56fbf5f9e6248899c10a46b12c9c9cf28b837d83a37c25aba62b11cb7849a1cf8d32e1e  vmware-modules.initd"