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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.15 - (show annotations) (download)
Fri Feb 23 12:24:59 2007 UTC (13 years, 4 months ago) by uberlord
Branch: MAIN
CVS Tags: HEAD
Changes since 1.14: +1 -1 lines
FILE REMOVED
Stop using $ROOT in src_* functions, #168039
(Portage version: 2.1.2-r10)

1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/wpa_supplicant-0.5.4.ebuild,v 1.14 2006/09/23 22:51:52 josejx Exp $
4
5 inherit eutils toolchain-funcs
6
7 DESCRIPTION="IEEE 802.1X/WPA supplicant for secure wireless transfers"
8 HOMEPAGE="http://hostap.epitest.fi/wpa_supplicant/"
9 SRC_URI="http://hostap.epitest.fi/releases/${P}.tar.gz"
10 LICENSE="|| ( GPL-2 BSD )"
11
12 SLOT="0"
13 KEYWORDS="amd64 ppc x86"
14 IUSE="dbus gsm madwifi qt3 qt4 readline ssl kernel_linux kernel_FreeBSD"
15
16 RDEPEND="dbus? ( sys-apps/dbus )
17 gsm? ( sys-apps/pcsc-lite )
18 qt4? ( =x11-libs/qt-4* )
19 !qt4? ( qt3? ( =x11-libs/qt-3* ) )
20 readline? ( sys-libs/ncurses sys-libs/readline )
21 ssl? ( dev-libs/openssl )
22 kernel_linux? ( madwifi? ( || ( net-wireless/madwifi-ng net-wireless/madwifi-old ) ) )
23 !kernel_linux? ( net-libs/libpcap )"
24 DEPEND="sys-apps/sed
25 ${RDEPEND}"
26
27 pkg_setup() {
28 if use kernel_linux ; then
29 ewarn
30 ewarn "${PN} requires kernel support for Packet Socket (CONFIG_PACKET)."
31 ewarn
32 fi
33
34 if use qt3 && use qt4; then
35 einfo "You have USE=\"qt3 qt4\" selected, defaulting to USE=\"qt4\""
36 fi
37 }
38
39 src_unpack() {
40 local CONFIG="${S}/.config"
41
42 unpack ${A}
43
44 # net/bpf.h needed for net-libs/libpcap on Gentoo FreeBSD
45 sed -i \
46 -e "s:\(#include <pcap\.h>\):#include <net/bpf.h>\n\1:" \
47 "${S}"/l2_packet_freebsd.c
48
49 # toolchain setup
50 echo "CC = $(tc-getCC)" > "${CONFIG}"
51
52 # basic setup
53 echo "CONFIG_CTRL_IFACE=y" >> "${CONFIG}"
54 echo "CONFIG_BACKEND=file" >> "${CONFIG}"
55
56 # basic authentication methods
57 echo "CONFIG_EAP_GTC=y" >> "${CONFIG}"
58 echo "CONFIG_EAP_MD5=y" >> "${CONFIG}"
59 echo "CONFIG_EAP_OTP=y" >> "${CONFIG}"
60 echo "CONFIG_EAP_PAX=y" >> "${CONFIG}"
61 echo "CONFIG_EAP_PSK=y" >> "${CONFIG}"
62 echo "CONFIG_EAP_TLV=y" >> "${CONFIG}"
63 echo "CONFIG_IEEE8021X_EAPOL=y" >> "${CONFIG}"
64 echo "CONFIG_PKCS12=y" >> "${CONFIG}"
65 echo "CONFIG_PEERKEY=y" >> "${CONFIG}"
66
67 if use dbus; then
68 echo "CONFIG_CTRL_IFACE_DBUS=y" >> "${CONFIG}"
69 fi
70
71 if use gsm; then
72 # smart card authentication
73 echo "CONFIG_EAP_SIM=y" >> "${CONFIG}"
74 echo "CONFIG_EAP_AKA=y" >> "${CONFIG}"
75 echo "CONFIG_PCSC=y" >> "${CONFIG}"
76 fi
77
78 if use readline; then
79 # readline/history support for wpa_cli
80 echo "CONFIG_READLINE=y" >> "${CONFIG}"
81 fi
82
83 if use ssl; then
84 # SSL authentication methods
85 echo "CONFIG_EAP_LEAP=y" >> "${CONFIG}"
86 echo "CONFIG_EAP_MSCHAPV2=y" >> "${CONFIG}"
87 echo "CONFIG_EAP_PEAP=y" >> "${CONFIG}"
88 echo "CONFIG_EAP_TLS=y" >> "${CONFIG}"
89 echo "CONFIG_EAP_TTLS=y" >> "${CONFIG}"
90 echo "CONFIG_SMARTCARD=y" >> "${CONFIG}"
91 fi
92
93 if use kernel_linux; then
94 # Linux specific drivers
95 echo "CONFIG_DRIVER_ATMEL=y" >> "${CONFIG}"
96 echo "CONFIG_DRIVER_HOSTAP=y" >> "${CONFIG}"
97 echo "CONFIG_DRIVER_IPW=y" >> "${CONFIG}"
98 echo "CONFIG_DRIVER_NDISWRAPPER=y" >> "${CONFIG}"
99 echo "CONFIG_DRIVER_PRISM54=y" >> "${CONFIG}"
100 echo "CONFIG_DRIVER_WEXT=y" >> "${CONFIG}"
101 echo "CONFIG_DRIVER_WIRED=y" >> "${CONFIG}"
102
103 if use madwifi; then
104 # Add include path for madwifi-driver headers
105 echo "CFLAGS += -I${ROOT}/usr/include/madwifi" >> "${CONFIG}"
106 echo "CONFIG_DRIVER_MADWIFI=y" >> "${CONFIG}"
107 fi
108 fi
109
110 if use kernel_FreeBSD; then
111 # FreeBSD specific driver
112 echo "CONFIG_DRIVER_BSD=y" >> "${CONFIG}"
113 fi
114
115 # people seem to take the example configuration file too literally
116 # bug #102361
117 sed -i \
118 -e "s:^\(opensc_engine_path\):#\1:" \
119 -e "s:^\(pkcs11_engine_path\):#\1:" \
120 -e "s:^\(pkcs11_module_path\):#\1:" \
121 ${S}/wpa_supplicant.conf || die
122
123 # Change configuration to match Gentoo locations, #143750
124 sed -i \
125 -e "s:/usr/lib/opensc:/usr/$(get_libdir):" \
126 -e "s:/usr/lib/pkcs11:/usr/$(get_libdir):" \
127 "${S}"/wpa_supplicant.conf || die
128 }
129
130 src_compile() {
131 emake || die "emake failed"
132
133 if use qt4; then
134 qmake -o "${S}"/wpa_gui-qt4/Makefile "${S}"/wpa_gui-qt4/wpa_gui.pro
135 cd "${S}"/wpa_gui-qt4
136 emake || die "emake wpa_gui-qt4 failed"
137 elif use qt3; then
138 [[ -d ${QTDIR}/etc/settings ]] && addwrite "${QTDIR}"/etc/settings
139 /usr/qt/3/bin/qmake -o "${S}"/wpa_gui/Makefile "${S}"/wpa_gui/wpa_gui.pro
140 cd "${S}"/wpa_gui
141 emake || die "emake wpa_gui failed"
142 fi
143 }
144
145 src_install() {
146 into /
147 dosbin wpa_supplicant
148 dobin wpa_cli wpa_passphrase
149
150 exeinto /etc/wpa_supplicant/
151 newexe "${FILESDIR}"/wpa_cli.sh wpa_cli.sh
152
153 # compatibility symlink for =baselayout-1.11*
154 dosym /etc/wpa_supplicant/wpa_cli.sh /sbin/wpa_cli.action
155
156 if use qt4; then
157 into /usr
158 dobin wpa_gui-qt4/wpa_gui
159 elif use qt3; then
160 into /usr
161 dobin wpa_gui/wpa_gui
162 fi
163
164 if use qt3 || use qt4; then
165 make_desktop_entry wpa_gui "WPA_Supplicant Administration GUI"
166 fi
167
168 dodoc ChangeLog COPYING eap_testing.txt README todo.txt
169 newdoc wpa_supplicant.conf wpa_supplicant.conf.example
170
171 doman doc/docbook/*.8
172 doman doc/docbook/*.5
173 }
174
175 pkg_postinst() {
176 einfo "To use ${MY_P} you must create the configuration file"
177 einfo "/etc/wpa_supplicant/wpa_supplicant.conf"
178 einfo
179 einfo "An example configuration file is available as"
180 einfo "/usr/share/doc/${PF}/wpa_supplicant.conf.example.gz"
181 if use madwifi; then
182 einfo
183 einfo "This package now compiles against the headers installed by"
184 einfo "the madwifi driver. You should reemerge ${PN} after"
185 einfo "upgrading your madwifi driver."
186 fi
187 }

  ViewVC Help
Powered by ViewVC 1.1.20