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

_flavor=vserver
_realname=open-vm-tools
_name=$_realname-$_flavor
_kpkg=linux-$_flavor
_kver=3.6.11
_kpkgrel=3
_myvsver=vs2.3.4.6
_mypkgrel=0

_realver=9.2.0_p799703
_ver=${_realver/_p/-}

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

# source the kernel version
if [ -f ../linux-${_flavor}/APKBUILD ]; then
        . ../linux-${_flavor}/APKBUILD
	pkgname=$_realname-$_flavor
	[ "$_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}"
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.6-build-fix.patch
	vmware-modules.initd
	"
install_if="linux-${_flavor}=${_kernelver} open-vm-tools"

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

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

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="37341978a00a1568b898a8ce024f9da9  open-vm-tools-9.2.0-799703.tar.gz
d9ffaf628837ea6a216b96dac69705e6  linux-3.6-build-fix.patch
afba2c3487d0b12cee80eb2f04b05ba1  vmware-modules.initd"
sha256sums="06f80b220c52d2438a7ef5628fb05eb7130a2f1e758ee6399d2e96ea54bd8c52  open-vm-tools-9.2.0-799703.tar.gz
9e5a3d20799e3bebef0d46502509c6204fcd7c3a36ad40eb3c8194a408dfcaed  linux-3.6-build-fix.patch
6ceb5c75b002991c511d9dadb6cf91720771e76b701e5f2d91ac9ede4b168265  vmware-modules.initd"
sha512sums="34b540ee0fee41ff636113ea7346c907b4fbce5c8c34fcda0f38f711bc2ef1adab8e508c75a413d737b7c882bb401aed1711e04aed01e93eb30875491dbf8680  open-vm-tools-9.2.0-799703.tar.gz
6e9215e6e11343186473202930e1d4659fd906c5933167fbf9892b496e3c20abe2f4a2ba7165cddd6849a2458866623bf3eb1d2f8790778fd8e9fdf1a34648d5  linux-3.6-build-fix.patch
639098221975cadaed0ae0f32454a6718ceaa5f43f17d949a84a85dee56fbf5f9e6248899c10a46b12c9c9cf28b837d83a37c25aba62b11cb7849a1cf8d32e1e  vmware-modules.initd"