Annotation of /smage/branches/alx07x-unstable/core/wpa-supplicant/wpa-supplicant-2.9-r2.smage2
Parent Directory | Revision Log
Revision 14540 -
(hide annotations)
(download)
Tue Aug 4 11:16:42 2020 UTC (3 years, 10 months ago) by niro
File size: 5934 byte(s)
Tue Aug 4 11:16:42 2020 UTC (3 years, 10 months ago) by niro
File size: 5934 byte(s)
-release branches/alx07x-unstable
1 | niro | 14148 | # $Id$ |
2 | |||
3 | PNAME="wpa-supplicant" | ||
4 | PVER="2.9" | ||
5 | PBUILD="r2" | ||
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_EAP_TTLS=y" || die | ||
140 | maddconfig -b "CONFIG_SMARTCARD=y" || die | ||
141 | |||
142 | # linux specific drivers | ||
143 | # maddconfig -b "CONFIG_WIRELESS_EXTENSION=y" || die | ||
144 | # maddconfig -b "CONFIG_DRIVER_ATMEL=y" || die | ||
145 | # maddconfig -b "CONFIG_DRIVER_HOSTAP=y" || die | ||
146 | # maddconfig -b "CONFIG_DRIVER_IPW=y" || die | ||
147 | # maddconfig -b "CONFIG_DRIVER_NDISWRAPPER=y" || die | ||
148 | maddconfig -b "CONFIG_DRIVER_NL80211=y" || die | ||
149 | # maddconfig -b "CONFIG_DRIVER_PRISM54=y" || die | ||
150 | # maddconfig -b "CONFIG_DRIVER_RALINK=y" || die | ||
151 | maddconfig -b "CONFIG_DRIVER_WEXT=y" || die | ||
152 | maddconfig -b "CONFIG_DRIVER_WIRED=y" || die | ||
153 | # maddconfig -b "CONFIG_DRIVER_BROADCOM=y" || die | ||
154 | # maddconfig -b "CONFIG_DRIVER_HERMES=y" || die | ||
155 | # needs madwifi headers | ||
156 | # maddconfig -b "CONFIG_DRIVER_MADWIFI=y" || die | ||
157 | } | ||
158 | |||
159 | src_compile() | ||
160 | { | ||
161 | cd ${SRCDIR}/wpa_supplicant | ||
162 | mmake PREFIX=/usr BINDIR=/usr/bin LIBDIR=/usr/$(mlibdir) || die | ||
163 | } | ||
164 | |||
165 | alx_generic_src_install() | ||
166 | { | ||
167 | cd ${SRCDIR}/wpa_supplicant | ||
168 | make PREFIX=/usr BINDIR=/usr/bin LIBDIR=/usr/$(mlibdir) DESTDIR=${BINDIR} install || die | ||
169 | |||
170 | # config sample | ||
171 | minstalldir /usr/share/wpa_supplicant || die | ||
172 | minstallfile wpa_supplicant.conf /usr/share/wpa_supplicant || die | ||
173 | |||
174 | # skeletons | ||
175 | minstallconf confd-wpa_supplicant.skel-${SKEL_CVS_REV} wpa_supplicant.skel || die | ||
176 | |||
177 | # rc-config | ||
178 | minstallconf confd-wpa_supplicant-${CONF_CVS_REV} wpa_supplicant || die | ||
179 | |||
180 | # dbus | ||
181 | minstalldbusconfig dbus/dbus-wpa_supplicant.conf wpa_supplicant.conf || die | ||
182 | minstalldbussystemservice dbus/fi.w1.wpa_supplicant1.service || die | ||
183 | |||
184 | # systemd services | ||
185 | local i | ||
186 | for i in systemd/*.service | ||
187 | do | ||
188 | minstallunit "${i}" || die "${i}" | ||
189 | done | ||
190 | |||
191 | # man pages | ||
192 | minstallman doc/docbook/*.8 || die | ||
193 | minstallman doc/docbook/*.5 || die | ||
194 | # but not priv pages | ||
195 | rm -f ${BINDIR}/usr/share/man/man8/wpa_{priv,gui}.8 || die | ||
196 | |||
197 | minstalldocs COPYING wpa_supplicant/ChangeLog wpa_supplicant/README* || die | ||
198 | } | ||
199 | |||
200 | preinstall() | ||
201 | { | ||
202 | add_conf_prot_mask /etc/wpa_supplicant | ||
203 | } | ||
204 | |||
205 | postinstall() | ||
206 | { | ||
207 | mreloadunit dbus.service | ||
208 | mstartunit wpa_supplicant.service | ||
209 | } | ||
210 | |||
211 | postremove() | ||
212 | { | ||
213 | mreloadunit dbus.service | ||
214 | mstopunit wpa_supplicant.service | ||
215 | } |