View | Details | Raw Unified
Collapse All | Expand All

(-) hostap-driver-0.1.3.ebuild (-11 / +32 lines)
 Lines 3-13    Link Here 
# $Header: /home/cvsroot/gentoo-x86/net-wireless/hostap-driver/hostap-driver-0.1.3.ebuild,v 1.1 2004/02/09 00:25:42 wschlich Exp $
# $Header: /home/cvsroot/gentoo-x86/net-wireless/hostap-driver/hostap-driver-0.1.3.ebuild,v 1.1 2004/02/09 00:25:42 wschlich Exp $
# pcmcia eclass inherits eutils
# pcmcia eclass inherits eutils
inherit pcmcia
inherit kernel-mod pcmcia 
DESCRIPTION="HostAP wireless drivers"
DESCRIPTION="HostAP wireless drivers"
HOMEPAGE="http://hostap.epitest.fi/"
HOMEPAGE="http://hostap.epitest.fi/"
SRC_URI="${SRC_URI} http://hostap.epitest.fi/releases/${P}.tar.gz"
SRC_URI="${SRC_URI} http://hostap.epitest.fi/releases/${P}.tar.gz
		http://dev.gentoo.org/~latexer/files/patches/${P}-koutput.diff.gz"
LICENSE="GPL-2"
LICENSE="GPL-2"
SLOT="${KV}"
SLOT="${KV}"
KEYWORDS="~x86"
KEYWORDS="~x86"
 Lines 17-25    Link Here 
KMOD_PATH="/lib/modules/${KV}"
KMOD_PATH="/lib/modules/${KV}"
KERNEL_MOD_SOURCES="${P}.tar.gz"
KERNEL_MOD_KOUTPUT_PATCH="${DISTDIR}/${P}-koutput.diff.gz"
src_unpack() {
src_unpack() {
	check_KV
	# Unpack and set some variables
	unpack ${A}
	kernel-mod_src_unpack
	## unpack the pcmcia-cs sources if needed
	## unpack the pcmcia-cs sources if needed
	pcmcia_src_unpack
	pcmcia_src_unpack
 Lines 38-43    Link Here 
	if [ -n "${PCMCIA_VERSION}" ]; then
	if [ -n "${PCMCIA_VERSION}" ]; then
		sed -i -e "s:^PCMCIA_PATH=:PCMCIA_PATH=${PCMCIA_SOURCE_DIR}:" ${S}/Makefile
		sed -i -e "s:^PCMCIA_PATH=:PCMCIA_PATH=${PCMCIA_SOURCE_DIR}:" ${S}/Makefile
	fi
	fi
	# If on 2.5 or 2.6, set the kernel output stuff
	if [ "${KV_MINOR}" -gt "4" ]
	then
		sed -i -e \
		"s:^# KERNEL_OUTPUT_PATH=.*:KERNEL_OUTPUT_PATH=${KV_OUTPUT}:" \
		${S}/Makefile
	fi
}
}
src_compile() {
src_compile() {
 Lines 47-54    Link Here 
	cd ${S}
	cd ${S}
	einfo "Building hostap-driver for kernel version: ${KV}"
	einfo "Building hostap-driver for kernel version: ${KV}"
	case ${KV} in
	case ${KV_MINOR} in
		2.[34].*)
		[34])
			local mydrivers
			local mydrivers
			use pcmcia && mydrivers="${mydrivers} pccard"
			use pcmcia && mydrivers="${mydrivers} pccard"
 Lines 58-64    Link Here 
			einfo "Building the following drivers: ${mydrivers}"
			einfo "Building the following drivers: ${mydrivers}"
			emake EXTRA_CFLAGS="-DPRISM2_DOWNLOAD_SUPPORT" ${mydrivers} || die "make failed"
			emake EXTRA_CFLAGS="-DPRISM2_DOWNLOAD_SUPPORT" ${mydrivers} || die "make failed"
			;;
			;;
		2.[56].*)
		[56])
			unset ARCH
			unset ARCH
			emake EXTRA_CFLAGS="-DPRISM2_DOWNLOAD_SUPPORT" all || die "make failed"
			emake EXTRA_CFLAGS="-DPRISM2_DOWNLOAD_SUPPORT" all || die "make failed"
			;;
			;;
 Lines 71-81    Link Here 
src_install() {
src_install() {
	## kernel 2.6 has a different module file name suffix
	## kernel 2.6 has a different module file name suffix
	case ${KV} in
	case ${KV_MINOR} in
		2.[34].*)
		[34])
			kobj=o
			kobj=o
			;;
			;;
		2.[56].*)
		[56])
			kobj=ko
			kobj=ko
	esac
	esac
 Lines 109-113    Link Here 
pkg_postinst(){
pkg_postinst(){
	einfo "Checking kernel module dependancies"
	einfo "Checking kernel module dependancies"
	cd /usr/src/linux && make _modinst_post ## depmod
	# 2.6 completely re-installs modules when doing _modinst_post
	case ${KV_MINOR} in
		[34])
			cd /usr/src/linux && make _modinst_post ## depmod
			;;
		[56])
			depmod -a
			;;
	esac
}
}