# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: /home/cvsroot/gentoo-x86/app-misc/omnibook/omnibook-20030828.ebuild,v 1.1 2003/10/31 22:32:15 plasmaroo Exp $ inherit kernel-mod MY_PV="2004-01-20" MY_P=${PN}-${MY_PV} DESCRIPTION="Linux kernel module for HP Omnibook support" HOMEPAGE="http://www.sourceforge.net/projects/omke" SRC_URI="mirror://sourceforge/omke/${MY_P}.tar.gz http://dev.gentoo.org/~latexer/files/patches/${MY_P}-koutput.diff.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="" DEPEND="virtual/kernel" S=${WORKDIR}/${MY_P} KERNEL_MOD_SOURCES="${MY_P}.tar.gz" KERNEL_MOD_KOUTPUT_PATCH="${DISTDIR}/${MY_P}-koutput.diff.gz" src_unpack() { kernel-mod_src_unpack sed -i -e "s:^KSRC.*:KSRC=${ROOT}/usr/src/linux:" \ -e "s:^KERNEL.*:KERNEL=${KV_MAJOR}.${KV_MINOR}:" \ ${S}/Makefile if is_koutput then sed -i -e "s:^KOUTPUT.*:KOUTPUT=${KV_OUTPUT}:" \ ${S}/Makefile fi } src_compile() { if is_kernel 2 5 || is_kernel 2 6; then unset ARCH fi emake CC="gcc ${CFLAGS}" || die } src_install() { # The driver goes into the standard modules location # Not the make install location, because that way it would get deleted # when the user did a make modules_install in the Kernel tree insinto /lib/modules/${KV}/char doins omnibook.${KV_OBJ} dodoc ${S}/doc/* }