diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2017-01-03 09:36:22 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-01-03 09:45:08 +0000 |
commit | b3799de0685f4f819ef25b453e2707a6f1319975 (patch) | |
tree | 78a6944079a6af00846ab5f821472e99a9a9086b /main/open-vm-tools-grsec | |
parent | 4dd914f90425cf71e54f9f75e7ed9ab7887d39d0 (diff) | |
download | aports-b3799de0685f4f819ef25b453e2707a6f1319975.tar.bz2 aports-b3799de0685f4f819ef25b453e2707a6f1319975.tar.xz |
main/open-vm-tools-grsec: add package for virtgrsec
Diffstat (limited to 'main/open-vm-tools-grsec')
-rw-r--r-- | main/open-vm-tools-grsec/APKBUILD | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/main/open-vm-tools-grsec/APKBUILD b/main/open-vm-tools-grsec/APKBUILD index 589d1a5079..22ded70afd 100644 --- a/main/open-vm-tools-grsec/APKBUILD +++ b/main/open-vm-tools-grsec/APKBUILD @@ -7,7 +7,7 @@ _kver=4.4.39 _kpkgrel=4 _realver=10.1.0 _ver=${_realver/_p/-} -_mypkgrel=1 +_mypkgrel=2 # source open-vm-tools version if [ -f ../main/$_realname/APKBUILD ]; then @@ -23,7 +23,8 @@ if [ -f ../main/linux-${_flavor}/APKBUILD ]; then [ "$_kpkgrel" != "$pkgrel" ] && die "please set _kpkgrel to $pkgrel" fi -_abi_release=${_kver}-${_kpkgrel}-${_flavor} +_abiver="${_kver}-${_kpkgrel}" +_abi_releases="${_abiver}-${_flavor} ${_abiver}-virtgrsec" _kernelver="$_kver-r$_kpkgrel" pkgname="$_realname-$_flavor" @@ -34,9 +35,9 @@ pkgdesc="The Open Virtual Machine Tools are the open source implementation of VM url="https://github.com/vmware/open-vm-tools/" arch="x86 x86_64" license="LGPL" -subpackages="" +subpackages="$_realname-virtgrsec:_virtgrsec" depends="linux-${_flavor}=${_kernelver}" -depends_dev="bash glib-dev gettext-dev linux-${_flavor}-dev=${_kernelver}" +depends_dev="bash glib-dev gettext-dev linux-${_flavor}-dev=${_kernelver} linux-virtgrsec-dev=${_kernelver}" makedepends="$depends_dev autoconf automake libtool linux-headers" source="https://github.com/vmware/open-vm-tools/archive/stable-$_ver.tar.gz 0001-Fix-vmxnet-module-on-kernels-3.16.patch @@ -44,56 +45,55 @@ source="https://github.com/vmware/open-vm-tools/archive/stable-$_ver.tar.gz " install_if="linux-${_flavor}=${_kernelver} open-vm-tools" -_builddir="$srcdir/open-vm-tools-stable-$_ver"/open-vm-tools +builddir="$srcdir/open-vm-tools-stable-$_ver"/open-vm-tools prepare() { - cd "$_builddir" + 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 - libtoolize && aclocal && autoconf && automake --add-missing + default_prepare || return 1 + autoreconf -vif || return 1 + for _abi in $_abi_releases; do + mkdir ../build-$_abi + cp -r * ../build-$_abi/ + done } build() { - cd "$_builddir" - ./configure \ - --build=$CBUILD \ - --host=$CHOST \ - --disable-deploypkg \ - --without-pam \ - --without-x \ - --without-dnet \ - --without-icu \ - --without-procps \ - --without-ssl \ - --with-kernel-release="${_abi_release}" \ - || return 1 - cd "$_builddir"/modules - make -j1 modules MODULES="vmxnet vmhgfs" || return 1 + for _abi in $_abi_releases; do + cd "$builddir"/../build-$_abi + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --disable-deploypkg \ + --without-pam \ + --without-x \ + --without-dnet \ + --without-icu \ + --without-procps \ + --without-ssl \ + --with-kernel-release="${_abi}" \ + || return 1 + make -j1 -C modules modules MODULES="vmxnet vmhgfs" \ + || return 1 + done } package() { - cd "$_builddir" - mkdir -p "$pkgdir"/etc/modules-load.d/ - cat >"$pkgdir"/etc/modules-load.d/open-vm-tools<<EOF -vmblock -vmci -vmhgfs -vmsync -vmxnet -vsock -vmw_balloon -EOF - 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/" + for _abi in $_abi_releases; do + mkdir -p "$pkgdir"/lib/modules/${_abi}/misc/ + cd "$builddir"/../build-$_abi + for module in $(find . -type f -name '*.ko'); do + install -D -m644 $module "$pkgdir/lib/modules/${_abi}/misc/" || return 1 + done done } +_virtgrsec() { + pkgdesc="VMware guest modules for virtgrsec kernel" + mkdir -p "$subpkgdir"/lib/modules + mv "$pkgdir"/lib/modules/${_abiver}-virtgrsec "$subpkgdir"/lib/modules/ || return 1 +} + md5sums="46f5a319275f63658f1a44b6c8755f6b stable-10.1.0.tar.gz 3254b99481cea970acd6d65863ce6b48 0001-Fix-vmxnet-module-on-kernels-3.16.patch 5ab8e8249a65a8b750c5bf278f438351 missing-config-dir.patch" |