# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 IUSE="" inherit linux-mod eutils DESCRIPTION="A linux (2.6-) kernel driver to connect garmin gps receivers via the usb bus" HOMEPAGE="http://sourceforge.net/projects/garmin-gps/" SRC_URI="mirror://sourceforge/garmin-gps/garmin_gps-0.22a.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="x86" RDEPEND="" DEPEND="" S=${WORKDIR}/garmin_gps-${PV} MODULE_NAMES="garmin_gps(garmin_gps:)" BUILD_PARAMS="KERNEL_DIR=${KV_DIR}" pkg_setup() { if kernel_is 2 6; then CONFIG_CHECK="USB" else "You need kernel-2.6 for this module to work" fi linux-mod_pkg_setup } src_unpack() { unpack ${A} cd ${S} epatch ${FILESDIR}/gentoo.patch } src_compile() { # Note: no standard makefile - only a compile.sh script # or else we would use linux-mod_src_compile unset ARCH ./compile.sh /usr/src/linux } src_install() { # Note: again, no standard makefile, so we manually install. # Or else, we would use linux-mod_src_install insinto "/lib/modules/${KV_FULL}/kernel/extra/" doins garmin_gps.ko dodoc README echo "post-install garmin_gps /sbin/modprobe garmin_gps >& /dev/null 2>&1 || :" }