Gentoo Archives: gentoo-commits

From: "Pacho Ramos (pacho)" <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-wireless/hostapd: hostapd-2.0-r1.ebuild ChangeLog
Date: Sat, 31 Aug 2013 07:08:51
Message-Id: 20130831070844.F31442004B@flycatcher.gentoo.org
1 pacho 13/08/31 07:08:44
2
3 Modified: ChangeLog
4 Added: hostapd-2.0-r1.ebuild
5 Log:
6 Add unit file (#483014 by Yichao Zhou)
7
8 (Portage version: 2.2.1/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
9
10 Revision Changes Path
11 1.140 net-wireless/hostapd/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/hostapd/ChangeLog?rev=1.140&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/hostapd/ChangeLog?rev=1.140&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/hostapd/ChangeLog?r1=1.139&r2=1.140
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-wireless/hostapd/ChangeLog,v
20 retrieving revision 1.139
21 retrieving revision 1.140
22 diff -u -r1.139 -r1.140
23 --- ChangeLog 15 May 2013 04:11:48 -0000 1.139
24 +++ ChangeLog 31 Aug 2013 07:08:44 -0000 1.140
25 @@ -1,6 +1,12 @@
26 # ChangeLog for net-wireless/hostapd
27 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-wireless/hostapd/ChangeLog,v 1.139 2013/05/15 04:11:48 patrick Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-wireless/hostapd/ChangeLog,v 1.140 2013/08/31 07:08:44 pacho Exp $
30 +
31 +*hostapd-2.0-r1 (31 Aug 2013)
32 +
33 + 31 Aug 2013; Pacho Ramos <pacho@g.o> +files/hostapd.service,
34 + +hostapd-2.0-r1.ebuild:
35 + Add unit file (#483014 by Yichao Zhou)
36
37 15 May 2013; Patrick Lauer <patrick@g.o> metadata.xml:
38 Fix metadata.xml
39
40
41
42 1.1 net-wireless/hostapd/hostapd-2.0-r1.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/hostapd/hostapd-2.0-r1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/hostapd/hostapd-2.0-r1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: hostapd-2.0-r1.ebuild
48 ===================================================================
49 # Copyright 1999-2013 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/net-wireless/hostapd/hostapd-2.0-r1.ebuild,v 1.1 2013/08/31 07:08:44 pacho Exp $
52
53 EAPI="4"
54
55 inherit toolchain-funcs eutils systemd
56
57 DESCRIPTION="IEEE 802.11 wireless LAN Host AP daemon"
58 HOMEPAGE="http://hostap.epitest.fi"
59 SRC_URI="http://hostap.epitest.fi/releases/${P}.tar.gz"
60
61 LICENSE="|| ( GPL-2 BSD )"
62 SLOT="0"
63 KEYWORDS="~amd64 ~mips ~ppc ~x86"
64 IUSE="ipv6 logwatch madwifi +ssl +wps +crda"
65
66 DEPEND="ssl? ( dev-libs/openssl )
67 kernel_linux? (
68 dev-libs/libnl:3
69 crda? ( net-wireless/crda )
70 )
71 madwifi? ( ||
72 ( >net-wireless/madwifi-ng-tools-0.9.3
73 net-wireless/madwifi-old ) )"
74 RDEPEND="${DEPEND}"
75
76 S="${S}/${PN}"
77
78 src_prepare() {
79 cd ..
80 epatch "${FILESDIR}/${P}-tls_length_fix.patch"
81
82 sed -i -e "s:/etc/hostapd:/etc/hostapd/hostapd:g" \
83 "${S}/hostapd.conf" || die
84 }
85
86 src_configure() {
87 local CONFIG="${S}/.config"
88
89 # toolchain setup
90 echo "CC = $(tc-getCC)" > ${CONFIG}
91
92 # EAP authentication methods
93 echo "CONFIG_EAP=y" >> ${CONFIG}
94 echo "CONFIG_EAP_MD5=y" >> ${CONFIG}
95
96 if use ssl; then
97 # SSL authentication methods
98 echo "CONFIG_EAP_TLS=y" >> ${CONFIG}
99 echo "CONFIG_EAP_TTLS=y" >> ${CONFIG}
100 echo "CONFIG_EAP_MSCHAPV2=y" >> ${CONFIG}
101 echo "CONFIG_EAP_PEAP=y" >> ${CONFIG}
102 fi
103
104 if use wps; then
105 # Enable Wi-Fi Protected Setup
106 echo "CONFIG_WPS=y" >> ${CONFIG}
107 echo "CONFIG_WPS2=y" >> ${CONFIG}
108 echo "CONFIG_WPS_UPNP=y" >> ${CONFIG}
109 einfo "Enabling Wi-Fi Protected Setup support"
110 fi
111
112 echo "CONFIG_EAP_GTC=y" >> ${CONFIG}
113 echo "CONFIG_EAP_SIM=y" >> ${CONFIG}
114 echo "CONFIG_EAP_AKA=y" >> ${CONFIG}
115 echo "CONFIG_EAP_PAX=y" >> ${CONFIG}
116 echo "CONFIG_EAP_PSK=y" >> ${CONFIG}
117 echo "CONFIG_EAP_SAKE=y" >> ${CONFIG}
118 echo "CONFIG_EAP_GPSK=y" >> ${CONFIG}
119 echo "CONFIG_EAP_GPSK_SHA256=y" >> ${CONFIG}
120
121 einfo "Enabling drivers: "
122
123 # drivers
124 echo "CONFIG_DRIVER_HOSTAP=y" >> ${CONFIG}
125 einfo " HostAP driver enabled"
126 echo "CONFIG_DRIVER_WIRED=y" >> ${CONFIG}
127 einfo " Wired driver enabled"
128 echo "CONFIG_DRIVER_PRISM54=y" >> ${CONFIG}
129 einfo " Prism54 driver enabled"
130 echo "CONFIG_DRIVER_NONE=y" >> ${CONFIG}
131 einfo " None driver enabled"
132
133 if use madwifi; then
134 # Add include path for madwifi-driver headers
135 einfo " Madwifi driver enabled"
136 echo "CFLAGS += -I/usr/include/madwifi" >> ${CONFIG}
137 echo "CONFIG_DRIVER_MADWIFI=y" >> ${CONFIG}
138 else
139 einfo " Madwifi driver disabled"
140 fi
141
142 einfo " nl80211 driver enabled"
143 echo "CONFIG_DRIVER_NL80211=y" >> ${CONFIG}
144 echo "LIBS += -L/usr/lib" >> ${CONFIG}
145
146 # misc
147 echo "CONFIG_PKCS12=y" >> ${CONFIG}
148 echo "CONFIG_RADIUS_SERVER=y" >> ${CONFIG}
149 echo "CONFIG_IAPP=y" >> ${CONFIG}
150 echo "CONFIG_IEEE80211R=y" >> ${CONFIG}
151 echo "CONFIG_IEEE80211W=y" >> ${CONFIG}
152 echo "CONFIG_IEEE80211N=y" >> ${CONFIG}
153 echo "CONFIG_PEERKEY=y" >> ${CONFIG}
154 echo "CONFIG_RSN_PREAUTH=y" >> ${CONFIG}
155 echo "CONFIG_INTERWORKING=y" >> ${CONFIG}
156
157 if use ipv6; then
158 # IPv6 support
159 echo "CONFIG_IPV6=y" >> ${CONFIG}
160 fi
161
162 # If we are using libnl 2.0 and above, enable support for it
163 # Removed for now, since the 3.2 version is broken, and we don't
164 # support it.
165 if has_version ">=dev-libs/libnl-3.2"; then
166 echo "CONFIG_LIBNL32=y" >> .config
167 fi
168
169 # TODO: Add support for BSD drivers
170
171 default_src_configure
172 }
173
174 src_compile() {
175 emake V=1
176
177 if use ssl; then
178 emake V=1 nt_password_hash
179 emake V=1 hlr_auc_gw
180 fi
181 }
182
183 src_install() {
184 insinto /etc/${PN}
185 doins ${PN}.{conf,accept,deny,eap_user,radius_clients,sim_db,wpa_psk}
186
187 fperms -R 600 /etc/${PN}
188
189 dosbin ${PN}
190 dobin ${PN}_cli
191
192 use ssl && dobin nt_password_hash hlr_auc_gw
193
194 newinitd "${FILESDIR}"/${PN}-init.d ${PN}
195 newconfd "${FILESDIR}"/${PN}-conf.d ${PN}
196 systemd_dounit "${FILESDIR}"/${PN}.service
197
198 doman ${PN}{.8,_cli.1}
199
200 dodoc ChangeLog README
201 use wps && dodoc README-WPS
202
203 docinto examples
204 dodoc wired.conf
205
206 if use logwatch; then
207 insinto /etc/log.d/conf/services/
208 doins logwatch/${PN}.conf
209
210 exeinto /etc/log.d/scripts/services/
211 doexe logwatch/${PN}
212 fi
213 }
214
215 pkg_postinst() {
216 einfo
217 einfo "If you are running openRC you need to follow this instructions:"
218 einfo "In order to use ${PN} you need to set up your wireless card"
219 einfo "for master mode in /etc/conf.d/net and then start"
220 einfo "/etc/init.d/${PN}."
221 einfo
222 einfo "Example configuration:"
223 einfo
224 einfo "config_wlan0=( \"192.168.1.1/24\" )"
225 einfo "channel_wlan0=\"6\""
226 einfo "essid_wlan0=\"test\""
227 einfo "mode_wlan0=\"master\""
228 einfo
229 if use madwifi; then
230 einfo "This package compiles against the headers installed by"
231 einfo "madwifi-old, madwifi-ng or madwifi-ng-tools."
232 einfo "You should remerge ${PN} after upgrading these packages."
233 einfo
234 einfo "Since you are using the madwifi-ng driver, you should disable or"
235 einfo "comment out wme_enabled from ${PN}.conf, since it will"
236 einfo "cause problems otherwise (see bug #260377"
237 fi
238 #if [ -e "${KV_DIR}"/net/mac80211 ]; then
239 # einfo "This package now compiles against the headers installed by"
240 # einfo "the kernel source for the mac80211 driver. You should "
241 # einfo "re-emerge ${PN} after upgrading your kernel source."
242 #fi
243
244 if use wps; then
245 einfo "You have enabled Wi-Fi Protected Setup support, please"
246 einfo "read the README-WPS file in /usr/share/doc/${P}"
247 einfo "for info on how to use WPS"
248 fi
249 }