aboutsummaryrefslogtreecommitdiffstats
path: root/main/open-vm-tools-vserver/APKBUILD
blob: 600fb65b114fefcff5755e3dc44a7f5ce2558281 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>

_flavor=vserver
_realname=open-vm-tools
_name=$_realname-$_flavor
_kver=3.3.6
_kpkgrel=0
_myvsver=vs2.3.3.3
_mypkgrel=1

_realver=2012.03.13
_realsubver=651368

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

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

_abi_release=${_kver}-$_vsver
_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="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-$_realver-$_realsubver.tar.gz
	vmware-modules.initd
	"
install_if="linux-${_flavor}=${_kernelver} open-vm-tools"

_builddir="$srcdir/$_realname-$_realver-$_realsubver"

prepare() {
	cd "$_builddir"
}

build() {
	export GCC_SPECS=/usr/share/gcc/hardenednopie.specs
	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-${_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="a664206443d5de53f5f8ee8d5fe6c2d7  open-vm-tools-2012.03.13-651368.tar.gz
afba2c3487d0b12cee80eb2f04b05ba1  vmware-modules.initd"