aboutsummaryrefslogtreecommitdiffstats
path: root/main/open-vm-tools-grsec/APKBUILD
blob: 28059ec625c7fe68deb60406d59b110c53a0ce5d (plain)
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
101
102
103
104
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>

_flavor=grsec
_kpkg=linux-$_flavor
_realname=open-vm-tools
_kver=3.13.8
_kpkgrel=0

_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
	frozen.patch
	putname.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
40706c98b9a3d124cb16a7ad58526313  frozen.patch
9bca49147ac32f592efa859dbbd9a5f9  putname.patch
afba2c3487d0b12cee80eb2f04b05ba1  vmware-modules.initd"
sha256sums="5d30652eb0f6dc5e930781029c184837e700be5543b6a7116db4c62a6f3ca399  open-vm-tools-9.4.0-1280544.tar.gz
f3108ab321f9b32ecb59aa4760f9958f97335492345a04de79d95bd98a7af8ff  linux-3.10.patch
5997f5aa4d1d2bb262b9ef24888d4706f1227af4d359862d3d49b4e6c961d193  frozen.patch
dccba065f71f7a27dd7d38e3eb7d1de9e87b82a18db618538054043829c5d961  putname.patch
6ceb5c75b002991c511d9dadb6cf91720771e76b701e5f2d91ac9ede4b168265  vmware-modules.initd"
sha512sums="07b36f49713140606f74864b59c2e01c9ed83a960dd3f5d172b84fc75e760f7370065774a0e26897924af60454c86b682ca0fd32276b0e9fb17b268247f8cbdf  open-vm-tools-9.4.0-1280544.tar.gz
0b36a6318ef419832817f22d50f85d8a5ae080e9496ecdf16753b17e8a693573e46eb896c3dc83a44fc596e6737130245663908befe8aa4a038e16b08cc499a3  linux-3.10.patch
5dbee1a119d6abd13b8217d66b8f611fee92c863b0d48029b1c05f33a06f6a20f35eaf6f01fb268a811270c6c799a1fef26939f7bfc97a42421e7f14b4cfa46d  frozen.patch
4a6da3c33bdd4b03ed7cf536c40c18d76a902687378e85cce08cf9ef9b23ae6ccedb0d334f69daee3588e6e83c080adce456f36fad69848e7089401052c4d2c2  putname.patch
639098221975cadaed0ae0f32454a6718ceaa5f43f17d949a84a85dee56fbf5f9e6248899c10a46b12c9c9cf28b837d83a37c25aba62b11cb7849a1cf8d32e1e  vmware-modules.initd"