# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="2" inherit eutils linux-mod MY_PF="${PF/_/}" DESCRIPTION="A kernel driver for synaptics USB devices" HOMEPAGE="http://www.jan-steinhoff.de/linux/synaptics-usb.html" SRC_URI="http://www.jan-steinhoff.de/linux/${MY_PF}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="-* ~amd64 ~x86" IUSE="" RESTRICT="test" RDEPEND="" DEPEND="${RDEPEND}" S="${WORKDIR}/${PN}" src_prepare() { cd "${S}" sed -i \ -e "s|\(^KVERSION[[:space:]]*:=[[:space:]]*\).*$|\1${KV_FULL}|" \ -e "s|\(^KSRC[[:space:]]*:=[[:space:]]*\).*$|\1${KERNEL_DIR}|" \ Makefile } pkg_setup() { linux-info_pkg_setup if ! { linux_config_exists && \ linux_chkconfig_present USB && \ linux_chkconfig_present INPUT_EVDEV && \ linux_chkconfig_present USB_SUSPEND ; } ; then eerror "This driver requires several options to be set in the" eerror "Linux kernel. For a detailed explanation, please see" eerror "${HOMEPAGE}." eerror die "Kernel configuration does not meet minimum requirements" fi BUILD_TARGETS="all" MODULE_NAMES="${PN//-/_}(kernel/drivers/input/mouse:${S}:${S})" linux-mod_pkg_setup } src_install() { linux-mod_src_install dosbin ${S}/synaptics-usb newinitd "${FILESDIR}/${PN}.rc" ${PN} einfo einfo "To enable your system to use the synaptics-usb driver" einfo "upon boot, execute the command:" einfo einfo " sudo rc-update add ${PN} default" einfo }