/[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.1 - (hide annotations) (download)
Tue Feb 14 12:11:55 2006 UTC (14 years, 5 months ago) by brix
Branch: MAIN
New stable release from upstream.
(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     # $Header: $
4    
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     KEYWORDS="~amd64 ~ppc ~x86"
17     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    
46     if use gsm; then
47     # smart card authentication
48     echo "CONFIG_EAP_SIM=y" >> ${CONFIG}
49     echo "CONFIG_EAP_AKA=y" >> ${CONFIG}
50     echo "CONFIG_PCSC=y" >> ${CONFIG}
51     fi
52    
53     if use readline; then
54     # readline/history support for wpa_cli
55     echo "CONFIG_READLINE=y" >> ${CONFIG}
56     fi
57    
58     if use ssl; then
59     # SSL authentication methods
60     echo "CONFIG_EAP_LEAP=y" >> ${CONFIG}
61     echo "CONFIG_EAP_MSCHAPV2=y" >> ${CONFIG}
62     echo "CONFIG_EAP_PEAP=y" >> ${CONFIG}
63     echo "CONFIG_EAP_TLS=y" >> ${CONFIG}
64     echo "CONFIG_EAP_TTLS=y" >> ${CONFIG}
65     echo "CONFIG_SMARTCARD=y" >> ${CONFIG}
66     fi
67    
68     # Linux specific drivers
69     echo "CONFIG_WIRELESS_EXTENSION=y" >> ${CONFIG}
70     echo "CONFIG_DRIVER_ATMEL=y" >> ${CONFIG}
71     echo "CONFIG_DRIVER_HOSTAP=y" >> ${CONFIG}
72     echo "CONFIG_DRIVER_IPW=y" >> ${CONFIG}
73     echo "CONFIG_DRIVER_NDISWRAPPER=y" >> ${CONFIG}
74     echo "CONFIG_DRIVER_PRISM54=y" >> ${CONFIG}
75     echo "CONFIG_DRIVER_WEXT=y" >> ${CONFIG}
76     echo "CONFIG_DRIVER_WIRED=y" >> ${CONFIG}
77    
78     if use madwifi; then
79     # Add include path for madwifi-driver headers
80     echo "CFLAGS += -I/usr/include/madwifi" >> ${CONFIG}
81     echo "CONFIG_DRIVER_MADWIFI=y" >> ${CONFIG}
82     fi
83     }
84    
85     src_compile() {
86     emake || die "emake failed"
87    
88     if use qt; then
89     if has_version '=x11-libs/qt-4*'; then
90     qmake -o "${S}"/wpa_gui-qt4/Makefile "${S}"/wpa_gui-qt4/wpa_gui.pro
91     cd "${S}"/wpa_gui-qt4
92     emake || die "emake wpa_gui-qt4 failed"
93     else
94     [[ -d ${QTDIR}/etc/settings ]] && addwrite ${QTDIR}/etc/settings
95     emake wpa_gui || die "emake wpa_gui failed"
96     fi
97     fi
98     }
99    
100     src_install() {
101     into /
102    
103     dosbin wpa_supplicant
104     dobin wpa_cli wpa_passphrase
105    
106     newsbin ${FILESDIR}/${MY_P}-wpa_cli.action wpa_cli.action
107    
108     if use qt; then
109     into /usr
110    
111     if has_version '=x11-libs/qt-4*'; then
112     dobin wpa_gui-qt4/wpa_gui
113     else
114     dobin wpa_gui/wpa_gui
115     fi
116     fi
117    
118     dodoc ChangeLog COPYING eap_testing.txt README todo.txt
119     dodoc doc/wpa_supplicant.fig
120    
121     insinto /etc
122     newins wpa_supplicant.conf wpa_supplicant.conf.example
123    
124     doman doc/docbook/*.8
125     doman doc/docbook/*.5
126     }
127    
128     pkg_postinst() {
129     einfo
130     einfo "To use ${MY_P} you must create the configuration file"
131     einfo "/etc/wpa_supplicant.conf"
132     einfo
133     einfo "An example configuration file has been installed as"
134     einfo "/etc/wpa_supplicant.conf.example"
135     einfo
136     if use madwifi; then
137     einfo "This package now compiles against the headers installed by"
138     einfo "net-wireless/madwifi-driver. You should remerge ${PN} after"
139     einfo "upgrading net-wireless/madwifi-driver."
140     einfo
141     fi
142     }

  ViewVC Help
Powered by ViewVC 1.1.20