# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 inherit subversion eutils linux-info ESVN_REPO_URI="svn://svn.berlios.de/fsfn/trunk/" DESCRIPTION="Sony Vaio (FS series) laptop hotkey handler" HOMEPAGE="http://developer.berlios.de/projects/fsfn/" SRC_URI="" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="xosd" DEPEND=" xosd? ( >=x11-libs/xosd-2.2.0 ) dev-lang/perl " sony_check() { linux-info_pkg_setup ebegin "Checking for SONY_LAPTOP support" linux_chkconfig_present SONY_LAPTOP eend $? if [[ $? -ne 0 ]] ; then eerror "$?" eerror "This version needs SONY_LAPTOP support!" eerror "Please enable SONY_LAPTOP support in your kernel config, found at:" eerror eerror "-> Device Drivers" eerror " -> Misc devices" eerror " Sony Laptop Extras" eerror eerror "and recompile your kernel ..." die "SONY_LAPTOP support not detected!" fi } pkg_setup() { sony_check } #src_unpack() { # unpack ${A} # cd ${S} #} src_compile () { use xosd || my_conf="${my_conf} --disable-xosd" # just give a few info if use xosd; then einfo einfo "xosd support built in" einfo "To enable it, please add 'fsfn -o' to your x session" einfo fi cd ${S}/fsfn ./configure --prefix=/usr ${my_conf} || die "configuration failed" emake || die "make of fsfn failed" } src_install() { cd ${S}/fsfn make DESTDIR="${D}" install || die "Installation failed!" cd ${S}/fsfn/gentoo exeinto /etc/init.d/ newexe ${S}/fsfn/gentoo/fsfn fsfn || die einfo einfo "You can use /etc/init.d/fsfn script to start fsfn" einfo }