Magellan Linux

Contents of /smage/trunk/core/wpa-supplicant/wpa-supplicant-2.10-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 15641 - (show annotations) (download)
Fri Oct 21 12:48:55 2022 UTC (18 months, 1 week ago) by niro
File size: 6015 byte(s)
auto added: ver bump to 2.10-r1
1 # $Id$
2
3 PNAME="wpa-supplicant"
4 PVER="2.10"
5 PBUILD="r1"
6
7 PCAT="net-wlan"
8
9 DESCRIPTION="Linux WPA/WPA2/IEEE 802.1X Supplicant."
10 HOMEPAGE="https://w1.fi/wpa_supplicant/"
11
12 DEPEND=">= sys-apps/dbus-1.12
13 == dev-libs/libnl3-3.3
14 >= dev-libs/libtommath-1.1"
15
16 SDEPEND=">= dev-util/pkgconfig-0.25
17 >= virtual/sed
18 >= sys-apps/dbus-dev-1.12
19 == dev-libs/libnl3-dev-3.3
20 >= dev-libs/libtommath-dev-1.1"
21
22 SRCFILE="${PNAME/-/_}-${PVER}.tar.gz"
23 SRCDIR="${BUILDDIR}/${PNAME/-/_}-${PVER}"
24
25 # confd cvs revision
26 CONF_CVS_REV=1.3
27 SKEL_CVS_REV=1.4
28
29 ALX_PKG_KEEP="etc/wpa_supplicant
30 usr/bin/wpa_supplicant
31 usr/bin/wpa_cli
32 usr/bin/wpa_passphrase
33 etc/dbus-1/system.d
34 usr/share/dbus-1/system-services
35 usr/lib/systemd"
36 sminclude mtools dbus systemd alx-split
37
38 SRC_URI=(
39 https://w1.fi/releases/${SRCFILE}
40 mirror://${PNAME}/${SRCFILE}
41 mirror://${PNAME}/confd-wpa_supplicant.skel-${SKEL_CVS_REV}
42 mirror://${PNAME}/confd-wpa_supplicant-${CONF_CVS_REV}
43 )
44
45 # latest stable branch
46 UP2TAG="release"
47 # latest devel branch
48 #UP2TAG="development"
49 UP2DATE="updatecmd ${HOMEPAGE} | grep -A1 'Latest ${UP2TAG}' | sed -n 's/.*-\(.*\).tar.*/\1/;$ p'"
50
51 src_prepare()
52 {
53 local MCONFIG=${SRCDIR}/wpa_supplicant/.config
54 munpack ${SRCFILE} || die
55 cd ${SRCDIR}/wpa_supplicant
56
57 # broken Makefile
58 sed -i 's@/usr/local@$(PREFIX)@g' Makefile
59
60 # basic setup
61 maddconfig -b "CONFIG_CTRL_IFACE=y" || die
62 maddconfig -b "CONFIG_BACKEND=file" || die
63 maddconfig -b "CONFIG_NO_RANDOM_POOL=y" || die
64
65 # dbus support
66 maddconfig -b "CONFIG_CTRL_IFACE_DBUS=y" || die
67 # Add support for new DBus control interface
68 # (fi.w1.hostap.wpa_supplicant1)
69 maddconfig -b "CONFIG_CTRL_IFACE_DBUS_NEW=y" || die
70 # Add introspection support for new DBus control interface
71 maddconfig -b "CONFIG_CTRL_IFACE_DBUS_INTRO=y" || die
72
73 # not for alx
74 # # readline
75 # maddconfig -b "CONFIG_READLINE=y" || die
76
77 # libnl-3.2
78 maddconfig -b "CONFIG_LIBNL32=y" || die
79
80 # wi-fi protected setup (WPS) support
81 maddconfig -b "CONFIG_WPS=y" || die
82 # enable WPS support with NFC config method
83 maddconfig -b "CONFIG_WPS_NFC=y" || die
84
85 # # enable mitigation against certain attacks against TKIP
86 # maddconfig -b "CONFIG_DELAYED_MIC_ERROR_REPORT=y" || die
87
88 # # no debug
89 # maddconfig -b "CONFIG_NO_STDOUT_DEBUG=y" || die
90
91 # add support for writing debug log to a file (/tmp/wpa_supplicant-log-#.txt)
92 maddconfig -b "CONFIG_DEBUG_FILE=y" || die
93
94 # support HT overrides (disable HT/HT40, mask MCS rates, etc.)
95 maddconfig -b "CONFIG_HT_OVERRIDES=y" || die
96
97 # support VHT overrides (disable VHT, mask MCS rates, etc.)
98 maddconfig -b "CONFIG_VHT_OVERRIDES=y" || die
99
100 # AP mode operations
101 maddconfig -b "CONFIG_AP=y" || die
102
103 # P2P (Wi-Fi Direct)
104 maddconfig -b "CONFIG_P2P=y" || die
105
106 # autoscan
107 maddconfig -b "CONFIG_AUTOSCAN_EXPONENTIAL=y" || die
108 # for periodic module:
109 maddconfig -b "CONFIG_AUTOSCAN_PERIODIC=y" || die
110
111 # RSN IBSS/AdHoc support
112 maddconfig -b "CONFIG_IBSS_RSN=y" || die
113
114 # simple background scan
115 maddconfig -b "CONFIG_BGSCAN_SIMPLE=y" || die
116
117 # basic authentication methods
118 maddconfig -b "CONFIG_EAP_GTC=y" || die
119 maddconfig -b "CONFIG_EAP_MD5=y" || die
120 maddconfig -b "CONFIG_EAP_OTP=y" || die
121 # maddconfig -b "CONFIG_EAP_PSK=y" || die
122 maddconfig -b "CONFIG_IEEE8021X_EAPOL=y" || die
123 maddconfig -b "CONFIG_PKCS12=y" || die
124 # maddconfig -b "CONFIG_PAX=y" || die
125 # maddconfig -b "CONFIG_TLV=y" || die
126 maddconfig -b "CONFIG_PEERKEY=y" || die
127 # maddconfig -b "CONFIG_EAP_PAX=y" || die
128 # maddconfig -b "CONFIG_EAP_TLV=y" || die
129
130 # ssl authentication methods
131 # alx has no openssl but libtommath
132 # maddconfig -b "CONFIG_TLS=openssl" || die
133 # needs libtommath but is a very small replacement for openssl
134 maddconfig -b "CONFIG_TLS=internal" || die
135 maddconfig -b "CONFIG_EAP_LEAP=y" || die
136 maddconfig -b "CONFIG_EAP_MSCHAPV2=y" || die
137 maddconfig -b "CONFIG_EAP_PEAP=y" || die
138 maddconfig -b "CONFIG_EAP_TLS=y" || die
139 maddconfig -b "CONFIG_TLSV11=y" || die
140 maddconfig -b "CONFIG_TLSV12=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 alx_generic_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 sample
173 minstalldir /usr/share/wpa_supplicant || die
174 minstallfile wpa_supplicant.conf /usr/share/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.w1.wpa_supplicant1.service || die
185
186 # systemd services
187 local i
188 for i in systemd/*.service
189 do
190 minstallunit "${i}" || die "${i}"
191 done
192
193 # man pages
194 minstallman doc/docbook/*.8 || die
195 minstallman doc/docbook/*.5 || die
196 # but not priv pages
197 rm -f ${BINDIR}/usr/share/man/man8/wpa_{priv,gui}.8 || die
198
199 minstalldocs COPYING wpa_supplicant/ChangeLog wpa_supplicant/README* || die
200 }
201
202 preinstall()
203 {
204 add_conf_prot_mask /etc/wpa_supplicant
205 }
206
207 postinstall()
208 {
209 mreloadunit dbus.service
210 mstartunit wpa_supplicant.service
211 }
212
213 postremove()
214 {
215 mreloadunit dbus.service
216 mstopunit wpa_supplicant.service
217 }