Contents of /trunk/core/wpa-supplicant/wpa-supplicant-2.7-r1.smage2
Parent Directory | Revision Log
Revision 31680 -
(show annotations)
(download)
Wed Dec 5 12:17:59 2018 UTC (5 years, 9 months ago) by niro
File size: 5919 byte(s)
Wed Dec 5 12:17:59 2018 UTC (5 years, 9 months ago) by niro
File size: 5919 byte(s)
-removed obsolete and upstream patches
1 | # $Id$ |
2 | |
3 | PNAME="wpa-supplicant" |
4 | PVER="2.7" |
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-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 | ) |
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 | # AP mode operations |
89 | maddconfig -b "CONFIG_AP=y" || die |
90 | |
91 | # P2P (Wi-Fi Direct) |
92 | maddconfig -b "CONFIG_P2P=y" || die |
93 | |
94 | # autoscan |
95 | maddconfig -b "CONFIG_AUTOSCAN_EXPONENTIAL=y" || die |
96 | # for periodic module: |
97 | maddconfig -b "CONFIG_AUTOSCAN_PERIODIC=y" || die |
98 | |
99 | # RSN IBSS/AdHoc support |
100 | maddconfig -b "CONFIG_IBSS_RSN=y" || die |
101 | |
102 | # simple background scan |
103 | maddconfig -b "CONFIG_BGSCAN_SIMPLE=y" || die |
104 | |
105 | # basic authentication methods |
106 | maddconfig -b "CONFIG_EAP_GTC=y" || die |
107 | maddconfig -b "CONFIG_EAP_MD5=y" || die |
108 | maddconfig -b "CONFIG_EAP_OTP=y" || die |
109 | # maddconfig -b "CONFIG_EAP_PSK=y" || die |
110 | maddconfig -b "CONFIG_IEEE8021X_EAPOL=y" || die |
111 | maddconfig -b "CONFIG_PKCS12=y" || die |
112 | # maddconfig -b "CONFIG_PAX=y" || die |
113 | # maddconfig -b "CONFIG_TLV=y" || die |
114 | maddconfig -b "CONFIG_PEERKEY=y" || die |
115 | # maddconfig -b "CONFIG_EAP_PAX=y" || die |
116 | # maddconfig -b "CONFIG_EAP_TLV=y" || die |
117 | |
118 | # ssl authentication methods |
119 | maddconfig -b "CONFIG_TLS=openssl" || die |
120 | maddconfig -b "CONFIG_EAP_LEAP=y" || die |
121 | maddconfig -b "CONFIG_EAP_MSCHAPV2=y" || die |
122 | maddconfig -b "CONFIG_EAP_PEAP=y" || die |
123 | maddconfig -b "CONFIG_EAP_TLS=y" || die |
124 | maddconfig -b "CONFIG_EAP_TTLS=y" || die |
125 | maddconfig -b "CONFIG_SMARTCARD=y" || die |
126 | |
127 | # linux specific drivers |
128 | # maddconfig -b "CONFIG_WIRELESS_EXTENSION=y" || die |
129 | # maddconfig -b "CONFIG_DRIVER_ATMEL=y" || die |
130 | # maddconfig -b "CONFIG_DRIVER_HOSTAP=y" || die |
131 | # maddconfig -b "CONFIG_DRIVER_IPW=y" || die |
132 | # maddconfig -b "CONFIG_DRIVER_NDISWRAPPER=y" || die |
133 | maddconfig -b "CONFIG_DRIVER_NL80211=y" || die |
134 | # maddconfig -b "CONFIG_DRIVER_PRISM54=y" || die |
135 | # maddconfig -b "CONFIG_DRIVER_RALINK=y" || die |
136 | maddconfig -b "CONFIG_DRIVER_WEXT=y" || die |
137 | maddconfig -b "CONFIG_DRIVER_WIRED=y" || die |
138 | # maddconfig -b "CONFIG_DRIVER_BROADCOM=y" || die |
139 | # maddconfig -b "CONFIG_DRIVER_HERMES=y" || die |
140 | # needs madwifi headers |
141 | # maddconfig -b "CONFIG_DRIVER_MADWIFI=y" || die |
142 | } |
143 | |
144 | src_compile() |
145 | { |
146 | cd ${SRCDIR}/wpa_supplicant |
147 | mmake PREFIX=/usr BINDIR=/usr/bin LIBDIR=/usr/$(mlibdir) || die |
148 | } |
149 | |
150 | src_install() |
151 | { |
152 | cd ${SRCDIR}/wpa_supplicant |
153 | make PREFIX=/usr BINDIR=/usr/bin LIBDIR=/usr/$(mlibdir) DESTDIR=${BINDIR} install || die |
154 | |
155 | # config |
156 | minstalldir /etc/wpa_supplicant |
157 | minstallfile wpa_supplicant.conf /etc/wpa_supplicant/ || die |
158 | |
159 | # skeletons |
160 | minstallconf confd-wpa_supplicant.skel-${SKEL_CVS_REV} wpa_supplicant.skel || die |
161 | |
162 | # rc-config |
163 | minstallconf confd-wpa_supplicant-${CONF_CVS_REV} wpa_supplicant || die |
164 | |
165 | # dbus |
166 | minstalldbusconfig dbus/dbus-wpa_supplicant.conf wpa_supplicant.conf || die |
167 | minstalldbussystemservice dbus/fi.epitest.hostap.WPASupplicant.service || die |
168 | minstalldbussystemservice dbus/fi.w1.wpa_supplicant1.service || die |
169 | |
170 | # systemd services |
171 | local i |
172 | for i in systemd/*.service |
173 | do |
174 | minstallunit "${i}" || die "${i}" |
175 | done |
176 | |
177 | # man pages |
178 | minstallman doc/docbook/*.8 || die |
179 | minstallman doc/docbook/*.5 || die |
180 | # but not priv pages |
181 | rm -f ${BINDIR}/usr/share/man/man8/wpa_{priv,gui}.8 || die |
182 | |
183 | minstalldocs COPYING wpa_supplicant/ChangeLog wpa_supplicant/README* || die |
184 | } |
185 | |
186 | postinstall() |
187 | { |
188 | if [ -f ${MROOT}/etc/wpa_supplicant.conf.example ] |
189 | then |
190 | rm ${MROOT}/etc/wpa_supplicant.conf.example |
191 | fi |
192 | |
193 | # migrate config |
194 | if [ -f ${MROOT}/etc/wpa_supplicant.auto ] |
195 | then |
196 | if [ -f ${MROOT}/etc/wpa_supplicant/wpa_supplicant.auto ] |
197 | then |
198 | rm ${MROOT}/etc/wpa_supplicant.auto |
199 | else |
200 | mv ${MROOT}/etc/wpa_supplicant.auto ${MROOT}/etc/wpa_supplicant/ |
201 | sed -i 's:/var/run/wpa_supplicant:/run/wpa_supplicant:g' \ |
202 | ${MROOT}/etc/wpa_supplicant/wpa_supplicant.auto |
203 | fi |
204 | fi |
205 | |
206 | mreloadunit dbus.service |
207 | mstartunit wpa_supplicant.service |
208 | } |
209 | |
210 | postremove() |
211 | { |
212 | mreloadunit dbus.service |
213 | mstopunit wpa_supplicant.service |
214 | } |