APKBUILD 2.48 KB
Newer Older
1
2
3
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>

_flavor=grsec
4
_kpkg=linux-$_flavor
5
_realname=open-vm-tools
6
_kver=3.6.11
7
_kpkgrel=13
8

9
10
_realver=9.2.0_p799703
_ver=${_realver/_p/-}
11
_mypkgrel=0
12

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

20
# source the kernel version
21
22
23
24
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"
25
26
fi

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

30
pkgname="$_realname-$_flavor"
31
pkgver=$_kver
32
pkgrel=$(($_kpkgrel + $_mypkgrel))
33
34
35

pkgdesc="The Open Virtual Machine Tools are the open source implementation of VMware Tools."
url="http://open-vm-tools.sourceforge.net/"
36
arch="all"
37
38
39
license="LGPL"
subpackages=""
depends="linux-${_flavor}=${_kernelver}"
40
41
depends_dev="bash glib-dev gettext-dev linux-${_flavor}-dev=${_kernelver}"
makedepends="$depends_dev"
42
source="http://downloads.sourceforge.net/project/open-vm-tools/open-vm-tools/stable-${_realver%.*}.x/open-vm-tools-${_ver}.tar.gz
43
	linux-3.6-build-fix.patch
44
	vmci_driver_c.patch
45
	vmware-modules.initd
46
	"
47
#	constify.patch
48
install_if="linux-${_flavor}=${_kernelver} open-vm-tools"
49

50
_builddir="$srcdir/$_realname-$_ver"
51
52
53

prepare() {
	cd "$_builddir"
54
55
56
57
58
        for i in $source; do
                case $i in
                *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
                esac
        done
59
60
61
}

build() {
62
	export GCC_SPECS=/usr/share/gcc/hardenednopie.specs
63
	cd "$_builddir"
64
	./configure --without-pam \
65
		--without-x \
66
67
		--without-dnet \
		--without-icu \
68
		--without-procps \
69
		--with-kernel-release="${_abi_release}" \
70
71
72
73
74
75
76
		|| return 1
	cd "$_builddir"/modules
	make -j1 modules || return 1
}

package() {
	cd "$_builddir"
77
 	install -D -m755 "$srcdir"/vmware-modules.initd \
78
		"$pkgdir"/etc/init.d/vmware-modules-${_flavor} || return 1
79
	mkdir -p $pkgdir/lib/modules/${_abi_release}/misc/
80
	cd "$_builddir"/modules
81
	for module in `find -type f -name '*.ko'`; do
82
		install -D -m644 $module "$pkgdir/lib/modules/${_abi_release}/misc/"
83
84
85
	done
}

86
md5sums="37341978a00a1568b898a8ce024f9da9  open-vm-tools-9.2.0-799703.tar.gz
87
d9ffaf628837ea6a216b96dac69705e6  linux-3.6-build-fix.patch
88
16e060275e028d1edf1c5fd1a10b6a96  vmci_driver_c.patch
89
afba2c3487d0b12cee80eb2f04b05ba1  vmware-modules.initd"