# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit autotools eutils linux-mod P="smartcam-1.4.0" S="${WORKDIR}/${P}" S="${S}/driver_src" DESCRIPTION="Smartcam kernel module driver." HOMEPAGE="http://smartcam.sourceforge.net" SRC_URI="mirror://sourceforge/smartcam/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="kernel_linux" DEPEND="virtual/linux-sources" RDEPEND="virtual/modutils" src_unpack() { if use kernel_linux && kernel_is lt 2 6 28; then echo ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" ewarn "This is not officially supported for ${P}. It is likely you" ewarn "will not be able to compile or use the kernel module." ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.28" echo ewarn "DO NOT file bug reports for kernel versions less than 2.6.28 as they will be ignored." fi unpack ${A} cd "${S}" epatch "${FILESDIR}"/${PN}.patch } src_compile() { if use kernel_linux ; then #cd ${S} #emake -C /lib/modules/`uname -r`/build M=${S} || die "emake failed" linux-mod_src_compile fi } src_install() { if use kernel_linux; then #cd ${S} emake DESTDIR="${D}" install-modules || die "make install failed" fi }