/[gentoo-x86]/net-wireless/wpa_supplicant/wpa_supplicant-0.5.0-r1.ebuild
Gentoo

Contents of /net-wireless/wpa_supplicant/wpa_supplicant-0.5.0-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Mon Feb 27 21:49:53 2006 UTC (14 years, 5 months ago) by brix
Branch: MAIN
Changes since 1.2: +3 -3 lines
Fix madwifi compilation with ROOT != "/".
(Portage version: 2.0.54)

1 brix 1.1 # Copyright 1999-2006 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 brix 1.3 # $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/wpa_supplicant-0.5.0-r1.ebuild,v 1.2 2006/01/17 20:07:22 uberlord Exp $
4 brix 1.1
5     inherit eutils toolchain-funcs
6    
7     MY_P=${PN}-${PV/_/-}
8     S=${WORKDIR}/${MY_P}
9    
10     DESCRIPTION="IEEE 802.1X/WPA supplicant for secure wireless transfers"
11     HOMEPAGE="http://hostap.epitest.fi/wpa_supplicant/"
12     SRC_URI="http://hostap.epitest.fi/releases/${MY_P}.tar.gz"
13     LICENSE="|| ( GPL-2 BSD )"
14    
15     SLOT="0"
16 uberlord 1.2 KEYWORDS="~amd64 ~ppc ~x86"
17 brix 1.1 IUSE="gsm madwifi qt readline ssl"
18    
19     DEPEND="gsm? ( sys-apps/pcsc-lite )
20     qt? ( || ( =x11-libs/qt-3* =x11-libs/qt-4* ) )
21     readline? ( sys-libs/ncurses
22     sys-libs/readline )
23     ssl? ( dev-libs/openssl )
24     madwifi? ( >=net-wireless/madwifi-driver-0.1401.20060117 )"
25    
26     src_unpack() {
27     local CONFIG=${S}/.config
28    
29     unpack ${A}
30    
31     # toolchain setup
32     echo "CC = $(tc-getCC)" > ${CONFIG}
33    
34     # basic setup
35     echo "CONFIG_CTRL_IFACE=y" >> ${CONFIG}
36     echo "CONFIG_BACKEND=file" >> ${CONFIG}
37    
38     # basic authentication methods
39     echo "CONFIG_EAP_GTC=y" >> ${CONFIG}
40     echo "CONFIG_EAP_MD5=y" >> ${CONFIG}
41     echo "CONFIG_EAP_OTP=y" >> ${CONFIG}
42     echo "CONFIG_EAP_PSK=y" >> ${CONFIG}
43     echo "CONFIG_IEEE8021X_EAPOL=y" >> ${CONFIG}
44     echo "CONFIG_PKCS12=y" >> ${CONFIG}
45     echo "CONFIG_STAKEY=y" >> ${CONFIG}
46    
47     if use gsm; then
48     # smart card authentication
49     echo "CONFIG_EAP_SIM=y" >> ${CONFIG}
50     echo "CONFIG_EAP_AKA=y" >> ${CONFIG}
51     echo "CONFIG_PCSC=y" >> ${CONFIG}
52     fi
53    
54     if use readline; then
55     # readline/history support for wpa_cli
56     echo "CONFIG_READLINE=y" >> ${CONFIG}
57     fi
58    
59     if use ssl; then
60     # SSL authentication methods
61     echo "CONFIG_EAP_LEAP=y" >> ${CONFIG}
62     echo "CONFIG_EAP_MSCHAPV2=y" >> ${CONFIG}
63     echo "CONFIG_EAP_PEAP=y" >> ${CONFIG}
64     echo "CONFIG_EAP_TLS=y" >> ${CONFIG}
65     echo "CONFIG_EAP_TTLS=y" >> ${CONFIG}
66     echo "CONFIG_SMARTCARD=y" >> ${CONFIG}
67     fi
68    
69     # Linux specific drivers
70     echo "CONFIG_WIRELESS_EXTENSION=y" >> ${CONFIG}
71     echo "CONFIG_DRIVER_ATMEL=y" >> ${CONFIG}
72     echo "CONFIG_DRIVER_HOSTAP=y" >> ${CONFIG}
73     echo "CONFIG_DRIVER_IPW=y" >> ${CONFIG}
74     echo "CONFIG_DRIVER_NDISWRAPPER=y" >> ${CONFIG}
75     echo "CONFIG_DRIVER_PRISM54=y" >> ${CONFIG}
76     echo "CONFIG_DRIVER_WEXT=y" >> ${CONFIG}
77     echo "CONFIG_DRIVER_WIRED=y" >> ${CONFIG}
78    
79     if use madwifi; then
80     # Add include path for madwifi-driver headers
81 brix 1.3 echo "CFLAGS += -I${ROOT}/usr/include/madwifi" >> ${CONFIG}
82     echo "CONFIG_DRIVER_MADWIFI=y" >> ${CONFIG}
83 brix 1.1 fi
84     }
85    
86     src_compile() {
87     emake || die "emake failed"
88    
89     if use qt; then
90     if has_version '=x11-libs/qt-4*'; then
91     qmake -o "${S}"/wpa_gui-qt4/Makefile "${S}"/wpa_gui-qt4/wpa_gui.pro
92     cd "${S}"/wpa_gui-qt4
93     emake || die "emake wpa_gui-qt4 failed"
94     else
95     [[ -d ${QTDIR}/etc/settings ]] && addwrite ${QTDIR}/etc/settings
96     emake wpa_gui || die "emake wpa_gui failed"
97     fi
98     fi
99     }
100    
101     src_install() {
102     into /
103    
104     dosbin wpa_supplicant
105     dobin wpa_cli wpa_passphrase
106    
107     newsbin ${FILESDIR}/${MY_P}-wpa_cli.action wpa_cli.action
108    
109     if use qt; then
110     into /usr
111    
112     if has_version '=x11-libs/qt-4*'; then
113     dobin wpa_gui-qt4/wpa_gui
114     else
115     dobin wpa_gui/wpa_gui
116     fi
117     fi
118    
119     dodoc ChangeLog COPYING eap_testing.txt README todo.txt
120     dodoc doc/wpa_supplicant.fig
121    
122     insinto /etc
123     newins wpa_supplicant.conf wpa_supplicant.conf.example
124    
125     doman doc/docbook/*.8
126     doman doc/docbook/*.5
127     }
128    
129     pkg_postinst() {
130     einfo
131     einfo "To use ${MY_P} you must create the configuration file"
132     einfo "/etc/wpa_supplicant.conf"
133     einfo
134     einfo "An example configuration file has been installed as"
135     einfo "/etc/wpa_supplicant.conf.example"
136     einfo
137     if use madwifi; then
138     einfo "This package now compiles against the headers installed by"
139     einfo "net-wireless/madwifi-driver. You should remerge ${PN} after"
140     einfo "upgrading net-wireless/madwifi-driver."
141     einfo
142     fi
143     }

  ViewVC Help
Powered by ViewVC 1.1.20