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