Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


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