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

Contents of /net-wireless/wpa_supplicant/wpa_supplicant-0.4.8.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (hide annotations) (download)
Sat Jun 24 16:10:09 2006 UTC (14 years, 1 month ago) by brix
Branch: MAIN
Changes since 1.6: +24 -19 lines
Switched to new qt3/qt4 USE flag scheme, thanks to Cardoe. Fixes bug #137659. Also pruned old ebuilds.
(Portage version: 2.1)

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

  ViewVC Help
Powered by ViewVC 1.1.20