# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=5 inherit toolchain-funcs rpm DESCRIPTION="LIS (Linux Integration Services) for the Microsoft Hyper-V environment - userspace part" HOMEPAGE="???" SRC_URI="ftp://ftp.ntua.gr/pub/linux/opensuse/update/12.1/src/hyper-v-3-4.1.src.rpm" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64" IUSE="" DEPEND="" RDEPEND="${DEPEND}" S=${WORKDIR} src_prepare() { cp -avL hyper-v.kvptest.ps1.txt kvptest.ps1.txt cp -vL hyper-v.include.linux.hyperv.h hv_kvp_daemon.h cp -vL hyper-v.tools.hv.hv_kvp_daemon.c hv_kvp_daemon.c sed -i~ '/#include /d' hv_kvp_daemon.c || die "sed failed" } src_compile() { $(tc-getCC) ${LDFLAGS} hv_kvp_daemon.c \ -include hv_kvp_daemon.h \ -DCN_KVP_IDX=0x9 -DCN_KVP_VAL=0x1 \ -o hv_kvp_daemon } src_install() { insinto /sbin insopts -m755 doins hv_kvp_daemon insinto /etc/modprobe.d/ doins hyperv_pvdrivers.conf newinitd "${FILESDIR}"/hyper-v.init hyper-v }