Contents of /branches/R11-stable/core/wpa-supplicant/wpa-supplicant-2.3-r1.smage2
Parent Directory | Revision Log
Revision 22731 -
(show annotations)
(download)
Tue Oct 28 08:32:13 2014 UTC (9 years, 11 months ago) by niro
File size: 5874 byte(s)
Tue Oct 28 08:32:13 2014 UTC (9 years, 11 months ago) by niro
File size: 5874 byte(s)
-release branches/R11-stable
1 | # $Id$ |
2 | |
3 | PNAME="wpa-supplicant" |
4 | PVER="2.3" |
5 | PBUILD="r1" |
6 | |
7 | PCAT="net-wlan" |
8 | |
9 | DESCRIPTION="Linux WPA/WPA2/IEEE 802.1X Supplicant." |
10 | HOMEPAGE="http://hostap.epitest.fi/wpa_supplicant/" |
11 | |
12 | DEPEND=">= dev-libs/openssl-1.0.1 |
13 | >= sys-apps/dbus-1.8 |
14 | >= sys-libs/readline-6.3 |
15 | == dev-libs/libnl3-3.2.25 |
16 | >= virtual/sed" |
17 | |
18 | SRCFILE="${PNAME/-/_}-${PVER}.tar.gz" |
19 | SRCDIR="${BUILDDIR}/${PNAME/-/_}-${PVER}/" |
20 | |
21 | # confd cvs revision |
22 | CONF_CVS_REV=1.3 |
23 | SKEL_CVS_REV=1.3 |
24 | |
25 | sminclude mtools dbus systemd |
26 | |
27 | SRC_URI=( |
28 | http://hostap.epitest.fi/releases/${SRCFILE} |
29 | mirror://${PNAME}/${SRCFILE} |
30 | mirror://${PNAME}/confd-wpa_supplicant.skel-${SKEL_CVS_REV} |
31 | mirror://${PNAME}/confd-wpa_supplicant-${CONF_CVS_REV} |
32 | ) |
33 | |
34 | # latest stable branch |
35 | UP2TAG="release" |
36 | # latest devel branch |
37 | #UP2TAG="development" |
38 | UP2DATE="updatecmd ${HOMEPAGE} | grep -A1 'Latest ${UP2TAG}' | sed -n 's/.*-\(.*\).tar.*/\1/;$ p'" |
39 | |
40 | src_prepare() |
41 | { |
42 | local MCONFIG=${SRCDIR}/wpa_supplicant/.config |
43 | munpack ${SRCFILE} || die |
44 | cd ${SRCDIR}/wpa_supplicant |
45 | |
46 | # broken Makefile |
47 | sed -i 's@/usr/local@$(PREFIX)@g' Makefile |
48 | |
49 | # basic setup |
50 | maddconfig -b "CONFIG_CTRL_IFACE=y" || die |
51 | maddconfig -b "CONFIG_BACKEND=file" || die |
52 | maddconfig -b "CONFIG_NO_RANDOM_POOL=y" || die |
53 | |
54 | # dbus support |
55 | maddconfig -b "CONFIG_CTRL_IFACE_DBUS=y" || die |
56 | # Add support for new DBus control interface |
57 | # (fi.w1.hostap.wpa_supplicant1) |
58 | maddconfig -b "CONFIG_CTRL_IFACE_DBUS_NEW=y" || die |
59 | # Add introspection support for new DBus control interface |
60 | maddconfig -b "CONFIG_CTRL_IFACE_DBUS_INTRO=y" || die |
61 | |
62 | # readline |
63 | maddconfig -b "CONFIG_READLINE=y" || die |
64 | |
65 | # libnl-3.2 |
66 | maddconfig -b "CONFIG_LIBNL32=y" || die |
67 | |
68 | # wi-fi protected setup (WPS) support |
69 | maddconfig -b "CONFIG_WPS=y" || die |
70 | # enable WPS support with NFC config method |
71 | maddconfig -b "CONFIG_WPS_NFC=y" || die |
72 | |
73 | # # enable mitigation against certain attacks against TKIP |
74 | # maddconfig -b "CONFIG_DELAYED_MIC_ERROR_REPORT=y" || die |
75 | |
76 | # # no debug |
77 | # maddconfig -b "CONFIG_NO_STDOUT_DEBUG=y" || die |
78 | |
79 | # add support for writing debug log to a file (/tmp/wpa_supplicant-log-#.txt) |
80 | maddconfig -b "CONFIG_DEBUG_FILE=y" || die |
81 | |
82 | # support HT overrides (disable HT/HT40, mask MCS rates, etc.) |
83 | maddconfig -b "CONFIG_HT_OVERRIDES=y" || die |
84 | |
85 | # AP mode operations |
86 | maddconfig -b "CONFIG_AP=y" || die |
87 | |
88 | # P2P (Wi-Fi Direct) |
89 | maddconfig -b "CONFIG_P2P=y" || die |
90 | |
91 | # autoscan |
92 | maddconfig -b "CONFIG_AUTOSCAN_EXPONENTIAL=y" || die |
93 | # for periodic module: |
94 | maddconfig -b "CONFIG_AUTOSCAN_PERIODIC=y" || die |
95 | |
96 | # RSN IBSS/AdHoc support |
97 | maddconfig -b "CONFIG_IBSS_RSN=y" || die |
98 | |
99 | # simple background scan |
100 | maddconfig -b "CONFIG_BGSCAN_SIMPLE=y" || die |
101 | |
102 | # basic authentication methods |
103 | maddconfig -b "CONFIG_EAP_GTC=y" || die |
104 | maddconfig -b "CONFIG_EAP_MD5=y" || die |
105 | maddconfig -b "CONFIG_EAP_OTP=y" || die |
106 | # maddconfig -b "CONFIG_EAP_PSK=y" || die |
107 | maddconfig -b "CONFIG_IEEE8021X_EAPOL=y" || die |
108 | maddconfig -b "CONFIG_PKCS12=y" || die |
109 | # maddconfig -b "CONFIG_PAX=y" || die |
110 | # maddconfig -b "CONFIG_TLV=y" || die |
111 | maddconfig -b "CONFIG_PEERKEY=y" || die |
112 | # maddconfig -b "CONFIG_EAP_PAX=y" || die |
113 | # maddconfig -b "CONFIG_EAP_TLV=y" || die |
114 | |
115 | # ssl authentication methods |
116 | maddconfig -b "CONFIG_TLS=openssl" || die |
117 | maddconfig -b "CONFIG_EAP_LEAP=y" || die |
118 | maddconfig -b "CONFIG_EAP_MSCHAPV2=y" || die |
119 | maddconfig -b "CONFIG_EAP_PEAP=y" || die |
120 | maddconfig -b "CONFIG_EAP_TLS=y" || die |
121 | maddconfig -b "CONFIG_EAP_TTLS=y" || die |
122 | maddconfig -b "CONFIG_SMARTCARD=y" || die |
123 | |
124 | # linux specific drivers |
125 | # maddconfig -b "CONFIG_WIRELESS_EXTENSION=y" || die |
126 | # maddconfig -b "CONFIG_DRIVER_ATMEL=y" || die |
127 | # maddconfig -b "CONFIG_DRIVER_HOSTAP=y" || die |
128 | # maddconfig -b "CONFIG_DRIVER_IPW=y" || die |
129 | # maddconfig -b "CONFIG_DRIVER_NDISWRAPPER=y" || die |
130 | maddconfig -b "CONFIG_DRIVER_NL80211=y" || die |
131 | # maddconfig -b "CONFIG_DRIVER_PRISM54=y" || die |
132 | # maddconfig -b "CONFIG_DRIVER_RALINK=y" || die |
133 | maddconfig -b "CONFIG_DRIVER_WEXT=y" || die |
134 | maddconfig -b "CONFIG_DRIVER_WIRED=y" || die |
135 | # maddconfig -b "CONFIG_DRIVER_BROADCOM=y" || die |
136 | # maddconfig -b "CONFIG_DRIVER_HERMES=y" || die |
137 | # needs madwifi headers |
138 | # maddconfig -b "CONFIG_DRIVER_MADWIFI=y" || die |
139 | } |
140 | |
141 | src_compile() |
142 | { |
143 | cd ${SRCDIR}/wpa_supplicant |
144 | mmake PREFIX=/usr BINDIR=/usr/bin LIBDIR=/usr/$(mlibdir) || die |
145 | } |
146 | |
147 | src_install() |
148 | { |
149 | cd ${SRCDIR}/wpa_supplicant |
150 | make PREFIX=/usr BINDIR=/usr/bin LIBDIR=/usr/$(mlibdir) DESTDIR=${BINDIR} install || die |
151 | |
152 | # config |
153 | minstalldir /etc/wpa_supplicant |
154 | minstallfile wpa_supplicant.conf /etc/wpa_supplicant/ || die |
155 | |
156 | # skeletons |
157 | minstallconf confd-wpa_supplicant.skel-${SKEL_CVS_REV} wpa_supplicant.skel || die |
158 | |
159 | # rc-config |
160 | minstallconf confd-wpa_supplicant-${CONF_CVS_REV} wpa_supplicant || die |
161 | |
162 | # dbus |
163 | minstalldbusconfig dbus/dbus-wpa_supplicant.conf wpa_supplicant.conf || die |
164 | minstalldbussystemservice dbus/fi.epitest.hostap.WPASupplicant.service || die |
165 | minstalldbussystemservice dbus/fi.w1.wpa_supplicant1.service || die |
166 | |
167 | # systemd services |
168 | local i |
169 | for i in systemd/*.service |
170 | do |
171 | minstallunit "${i}" || die "${i}" |
172 | done |
173 | |
174 | # man pages |
175 | minstallman doc/docbook/*.8 || die |
176 | minstallman doc/docbook/*.5 || die |
177 | # but not priv pages |
178 | rm -f ${BINDIR}/usr/share/man/man8/wpa_{priv,gui}.8 || die |
179 | |
180 | minstalldocs COPYING wpa_supplicant/ChangeLog wpa_supplicant/README* || die |
181 | } |
182 | |
183 | postinstall() |
184 | { |
185 | if [ -f ${MROOT}/etc/wpa_supplicant.conf.example ] |
186 | then |
187 | rm ${MROOT}/etc/wpa_supplicant.conf.example |
188 | fi |
189 | |
190 | # migrate config |
191 | if [ -f ${MROOT}/etc/wpa_supplicant.auto ] |
192 | then |
193 | if [ -f ${MROOT}/etc/wpa_supplicant/wpa_supplicant.auto ] |
194 | then |
195 | rm ${MROOT}/etc/wpa_supplicant.auto |
196 | else |
197 | mv ${MROOT}/etc/wpa_supplicant.auto ${MROOT}/etc/wpa_supplicant/ |
198 | sed -i 's:/var/run/wpa_supplicant:/run/wpa_supplicant:g' \ |
199 | ${MROOT}/etc/wpa_supplicant/wpa_supplicant.auto |
200 | fi |
201 | fi |
202 | |
203 | mreloadunit dbus.service |
204 | mstartunit wpa_supplicant.service |
205 | } |
206 | |
207 | postremove() |
208 | { |
209 | mreloadunit dbus.service |
210 | mstopunit wpa_supplicant.service |
211 | } |