Magellan Linux

Contents of /trunk/core/wpa-supplicant/wpa-supplicant-2.9-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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