# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit kernel-mod eutils DESCRIPTION="Driver and Utilities for RaLink RT2500 wireless chipsets" HOMEPAGE="http://www.ralinktech.com" MY_P="$PN-1.1.0-b1" SRC_URI="http://rt2x00.serialmonkey.com/${MY_P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="x86" RESTRICT="nomirror" IUSE="" DEPEND="virtual/kernel virtual/x11 qt" RDEPEND="" S=${WORKDIR}/${MY_P} src_unpack() { check_KV kernel-mod_getversion unpack ${A} } src_compile() { unset ARCH #Here follows a workaround for the .qtrc write error, found on : #http://forums.gentoo.org/viewtopic.php?t=18733&highlight=qtrc+lock REALHOME="$HOME" mkdir -p ${T}/fakehome/.kde mkdir -p ${T}/fakehome/.qt export HOME="${T}/fakehome" addwrite "${QTDIR}/etc/settings" #make the utility cd ${S}/Utilitys qmake -o Makefile raconfig2500.pro make clean emake || die #make the module cd ${S}/Module make clean if [[ ${KV_MINOR} = "6" ]] ; then emake -C /usr/src/linux SUBDIRS=${S}/Module modules || die else #this has to be 2.4, as otherwise we wont be here chmod +x ./Configure emake all || die fi export HOME="$REALHOME" #do we need this? } src_install() { # Install the kernel module and the docs provided from ralink if [[ ${KV_MINOR} = "6" ]] ; then KV_OBJ="ko" else KV_OBJ="o" fi dodoc ${S}/Module/README ${S}/Module/ReleaseNote insinto /lib/modules/${KV}/net doins ${S}/Module/rt2500.${KV_OBJ} || die # Install the configuration software dobin ${S}/Utilitys/RaConfig2500 } pkg_postinst() { if [[ ${KV_MINOR} = "6" ]] ; then KV_OBJ="ko" else KV_OBJ="o" fi einfo "Checking kernel module dependencies" test -r "${ROOT}/usr/src/linux/System.map" && depmod -ae -F "${ROOT}/usr/src/linux/System.map" -b "${ROOT}" -r ${KV} }