Magellan Linux

Contents of /smage/trunk/core/wpa-supplicant/wpa-supplicant-2.6-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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