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