blob: be79d6d157696bcd9c4c11137494b99f6aef7ac9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-wireless/hostap-driver/hostap-driver-0.3.3-r1.ebuild,v 1.1 2005/01/04 00:13:10 brix Exp $
inherit toolchain-funcs eutils pcmcia linux-mod
DESCRIPTION="HostAP wireless drivers"
HOMEPAGE="http://hostap.epitest.fi"
SRC_URI="${SRC_URI} http://hostap.epitest.fi/releases/${P}.tar.gz"
LICENSE="GPL-2"
KEYWORDS="~x86 ~ppc"
IUSE="pcmcia"
SLOT="0"
RDEPEND=">=net-wireless/wireless-tools-25"
CONFIG_CHECK="NET_RADIO"
NET_RADIO_ERROR="${P} requires support for Wireless LAN drivers (non-hamradio) & Wireless Extensions (CONFIG_NET_RADIO)."
pkg_setup() {
MODULE_NAMES="hostap(net:${S}/driver/modules)
hostap_pci(net:${S}/driver/modules)
hostap_plx(net:${S}/driver/modules)
hostap_crypt_wep(net:${S}/driver/modules)
hostap_crypt_ccmp(net:${S}/driver/modules)
hostap_crypt_tkip(net:${S}/driver/modules)"
if use pcmcia; then
MODULE_NAMES="${MODULE_NAMES} hostap_cs(net:${S}/driver/modules)"
fi
linux-mod_pkg_setup
}
src_unpack() {
unpack ${A}
cd ${S}
epatch ${FILESDIR}/${P}-firmware.patch
# set compiler
sed -i "s:gcc:$(tc-getCC):" ${S}/Makefile
# unpack the pcmcia-cs sources if needed
pcmcia_src_unpack
# fix for new coreutils (#31801)
sed -i "s:tail -1:tail -n 1:" ${S}/Makefile
# set correct pcmcia path (PCMCIA_VERSION gets set from pcmcia_src_unpack)
if [ -n "${PCMCIA_VERSION}" ]; then
sed -i "s:^\(PCMCIA_PATH\)=:\1=${PCMCIA_SOURCE_DIR}:" ${S}/Makefile
fi
convert_to_m ${S}/Makefile
}
src_compile() {
pcmcia_configure
# hostap-driver expects 'make' to be called in the top-level directory
# linux-mod_src_compile() currently can not honor that (2005-01-04 brix)
set_arch_to_kernel
emake || die "emake failed"
set_arch_to_portage
}
src_install() {
if use pcmcia; then
insinto /etc/pcmcia
doins driver/etc/hostap_cs.conf
fi
dodoc ChangeLog README
linux-mod_src_install
}
pkg_postinst() {
if [ -e /etc/pcmcia/prism2.conf ]
then
einfo ""
einfo "You may need to edit or remove /etc/pcmcia/prism2.conf"
einfo "This is usually a result of conflicts with the"
einfo "net-wireless/linux-wlan-ng drivers."
einfo ""
fi
einfo ""
einfo "Please notice that all ${PN} modules are now installed to"
einfo "/lib/modules/${KV}/net/."
einfo ""
einfo "You may have to manually delete the old modules if upgrading from from"
einfo "<=net-wireless/${PN}-0.2.4."
einfo ""
ewarn ""
ewarn "Please note that this installation of HostAP contains support"
ewarn "for downloading binary firmware images into the non-volatile"
ewarn "(permanent) flash memory of wireless LAN cards."
ewarn ""
ewarn "Albeit being a great feature, this can lead to A DEAD CARD"
ewarn "when inappropriately used (e.g. wrong firmware)."
ewarn ""
linux-mod_pkg_postinst
}
|