Magellan Linux

Contents of /trunk/core/wpa-supplicant/wpa-supplicant-2.6-r3.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 29916 - (show annotations) (download)
Thu Oct 19 08:36:34 2017 UTC (6 years, 8 months ago) by niro
File size: 7144 byte(s)
auto added: ver bump to 2.6-r3
1 # $Id$
2
3 PNAME="wpa-supplicant"
4 PVER="2.6"
5 PBUILD="r3"
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.1
13 >= sys-apps/dbus-1.10
14 >= sys-libs/readline-7.0
15 == dev-libs/libnl3-3.2.25"
16
17 SDEPEND=">= dev-util/pkgconfig-0.25
18 >= virtual/sed"
19
20 SRCFILE="${PNAME/-/_}-${PVER}.tar.gz"
21 SRCDIR="${BUILDDIR}/${PNAME/-/_}-${PVER}/"
22
23 # confd cvs revision
24 CONF_CVS_REV=1.3
25 SKEL_CVS_REV=1.3
26
27 sminclude mtools dbus systemd
28
29 SRC_URI=(
30 http://hostap.epitest.fi/releases/${SRCFILE}
31 mirror://${PNAME}/${SRCFILE}
32 mirror://${PNAME}/confd-wpa_supplicant.skel-${SKEL_CVS_REV}
33 mirror://${PNAME}/confd-wpa_supplicant-${CONF_CVS_REV}
34 mirror://${PNAME}/0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch
35 mirror://${PNAME}/0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch
36 mirror://${PNAME}/0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch
37 mirror://${PNAME}/0004-Prevent-installation-of-an-all-zero-TK.patch
38 mirror://${PNAME}/0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch
39 mirror://${PNAME}/0006-TDLS-Reject-TPK-TK-reconfiguration.patch
40 mirror://${PNAME}/0007-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch
41 mirror://${PNAME}/0008-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch
42 )
43
44 # latest stable branch
45 UP2TAG="release"
46 # latest devel branch
47 #UP2TAG="development"
48 UP2DATE="updatecmd ${HOMEPAGE} | grep -A1 'Latest ${UP2TAG}' | sed -n 's/.*-\(.*\).tar.*/\1/;$ p'"
49
50 src_prepare()
51 {
52 local MCONFIG=${SRCDIR}/wpa_supplicant/.config
53 munpack ${SRCFILE} || die
54 cd ${SRCDIR}/wpa_supplicant
55
56 # krackattack patches
57 mpatch 0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch || die
58 mpatch 0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch || die
59 mpatch 0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch || die
60 mpatch 0004-Prevent-installation-of-an-all-zero-TK.patch || die
61 mpatch 0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch || die
62 mpatch 0006-TDLS-Reject-TPK-TK-reconfiguration.patch || die
63 mpatch 0007-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch || die
64 mpatch 0008-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch || die
65
66 # broken Makefile
67 sed -i 's@/usr/local@$(PREFIX)@g' Makefile || die
68
69 # basic setup
70 maddconfig -b "CONFIG_CTRL_IFACE=y" || die
71 maddconfig -b "CONFIG_BACKEND=file" || die
72 maddconfig -b "CONFIG_NO_RANDOM_POOL=y" || die
73
74 # dbus support
75 maddconfig -b "CONFIG_CTRL_IFACE_DBUS=y" || die
76 # Add support for new DBus control interface
77 # (fi.w1.hostap.wpa_supplicant1)
78 maddconfig -b "CONFIG_CTRL_IFACE_DBUS_NEW=y" || die
79 # Add introspection support for new DBus control interface
80 maddconfig -b "CONFIG_CTRL_IFACE_DBUS_INTRO=y" || die
81
82 # readline
83 maddconfig -b "CONFIG_READLINE=y" || die
84
85 # libnl-3.2
86 maddconfig -b "CONFIG_LIBNL32=y" || die
87
88 # wi-fi protected setup (WPS) support
89 maddconfig -b "CONFIG_WPS=y" || die
90 # enable WPS support with NFC config method
91 maddconfig -b "CONFIG_WPS_NFC=y" || die
92
93 # # enable mitigation against certain attacks against TKIP
94 # maddconfig -b "CONFIG_DELAYED_MIC_ERROR_REPORT=y" || die
95
96 # # no debug
97 # maddconfig -b "CONFIG_NO_STDOUT_DEBUG=y" || die
98
99 # add support for writing debug log to a file (/tmp/wpa_supplicant-log-#.txt)
100 maddconfig -b "CONFIG_DEBUG_FILE=y" || die
101
102 # support HT overrides (disable HT/HT40, mask MCS rates, etc.)
103 maddconfig -b "CONFIG_HT_OVERRIDES=y" || die
104
105 # AP mode operations
106 maddconfig -b "CONFIG_AP=y" || die
107
108 # P2P (Wi-Fi Direct)
109 maddconfig -b "CONFIG_P2P=y" || die
110
111 # autoscan
112 maddconfig -b "CONFIG_AUTOSCAN_EXPONENTIAL=y" || die
113 # for periodic module:
114 maddconfig -b "CONFIG_AUTOSCAN_PERIODIC=y" || die
115
116 # RSN IBSS/AdHoc support
117 maddconfig -b "CONFIG_IBSS_RSN=y" || die
118
119 # simple background scan
120 maddconfig -b "CONFIG_BGSCAN_SIMPLE=y" || die
121
122 # basic authentication methods
123 maddconfig -b "CONFIG_EAP_GTC=y" || die
124 maddconfig -b "CONFIG_EAP_MD5=y" || die
125 maddconfig -b "CONFIG_EAP_OTP=y" || die
126 # maddconfig -b "CONFIG_EAP_PSK=y" || die
127 maddconfig -b "CONFIG_IEEE8021X_EAPOL=y" || die
128 maddconfig -b "CONFIG_PKCS12=y" || die
129 # maddconfig -b "CONFIG_PAX=y" || die
130 # maddconfig -b "CONFIG_TLV=y" || die
131 maddconfig -b "CONFIG_PEERKEY=y" || die
132 # maddconfig -b "CONFIG_EAP_PAX=y" || die
133 # maddconfig -b "CONFIG_EAP_TLV=y" || die
134
135 # ssl authentication methods
136 maddconfig -b "CONFIG_TLS=openssl" || die
137 maddconfig -b "CONFIG_EAP_LEAP=y" || die
138 maddconfig -b "CONFIG_EAP_MSCHAPV2=y" || die
139 maddconfig -b "CONFIG_EAP_PEAP=y" || die
140 maddconfig -b "CONFIG_EAP_TLS=y" || die
141 maddconfig -b "CONFIG_EAP_TTLS=y" || die
142 maddconfig -b "CONFIG_SMARTCARD=y" || die
143
144 # linux specific drivers
145 # maddconfig -b "CONFIG_WIRELESS_EXTENSION=y" || die
146 # maddconfig -b "CONFIG_DRIVER_ATMEL=y" || die
147 # maddconfig -b "CONFIG_DRIVER_HOSTAP=y" || die
148 # maddconfig -b "CONFIG_DRIVER_IPW=y" || die
149 # maddconfig -b "CONFIG_DRIVER_NDISWRAPPER=y" || die
150 maddconfig -b "CONFIG_DRIVER_NL80211=y" || die
151 # maddconfig -b "CONFIG_DRIVER_PRISM54=y" || die
152 # maddconfig -b "CONFIG_DRIVER_RALINK=y" || die
153 maddconfig -b "CONFIG_DRIVER_WEXT=y" || die
154 maddconfig -b "CONFIG_DRIVER_WIRED=y" || die
155 # maddconfig -b "CONFIG_DRIVER_BROADCOM=y" || die
156 # maddconfig -b "CONFIG_DRIVER_HERMES=y" || die
157 # needs madwifi headers
158 # maddconfig -b "CONFIG_DRIVER_MADWIFI=y" || die
159 }
160
161 src_compile()
162 {
163 cd ${SRCDIR}/wpa_supplicant
164 mmake PREFIX=/usr BINDIR=/usr/bin LIBDIR=/usr/$(mlibdir) || die
165 }
166
167 src_install()
168 {
169 cd ${SRCDIR}/wpa_supplicant
170 make PREFIX=/usr BINDIR=/usr/bin LIBDIR=/usr/$(mlibdir) DESTDIR=${BINDIR} install || die
171
172 # config
173 minstalldir /etc/wpa_supplicant
174 minstallfile wpa_supplicant.conf /etc/wpa_supplicant/ || die
175
176 # skeletons
177 minstallconf confd-wpa_supplicant.skel-${SKEL_CVS_REV} wpa_supplicant.skel || die
178
179 # rc-config
180 minstallconf confd-wpa_supplicant-${CONF_CVS_REV} wpa_supplicant || die
181
182 # dbus
183 minstalldbusconfig dbus/dbus-wpa_supplicant.conf wpa_supplicant.conf || die
184 minstalldbussystemservice dbus/fi.epitest.hostap.WPASupplicant.service || die
185 minstalldbussystemservice dbus/fi.w1.wpa_supplicant1.service || die
186
187 # systemd services
188 local i
189 for i in systemd/*.service
190 do
191 minstallunit "${i}" || die "${i}"
192 done
193
194 # man pages
195 minstallman doc/docbook/*.8 || die
196 minstallman doc/docbook/*.5 || die
197 # but not priv pages
198 rm -f ${BINDIR}/usr/share/man/man8/wpa_{priv,gui}.8 || die
199
200 minstalldocs COPYING wpa_supplicant/ChangeLog wpa_supplicant/README* || die
201 }
202
203 postinstall()
204 {
205 if [ -f ${MROOT}/etc/wpa_supplicant.conf.example ]
206 then
207 rm ${MROOT}/etc/wpa_supplicant.conf.example
208 fi
209
210 # migrate config
211 if [ -f ${MROOT}/etc/wpa_supplicant.auto ]
212 then
213 if [ -f ${MROOT}/etc/wpa_supplicant/wpa_supplicant.auto ]
214 then
215 rm ${MROOT}/etc/wpa_supplicant.auto
216 else
217 mv ${MROOT}/etc/wpa_supplicant.auto ${MROOT}/etc/wpa_supplicant/
218 sed -i 's:/var/run/wpa_supplicant:/run/wpa_supplicant:g' \
219 ${MROOT}/etc/wpa_supplicant/wpa_supplicant.auto
220 fi
221 fi
222
223 mreloadunit dbus.service
224 mstartunit wpa_supplicant.service
225 }
226
227 postremove()
228 {
229 mreloadunit dbus.service
230 mstopunit wpa_supplicant.service
231 }