--- plamo/01_minimum/network.txz/old/hostapd-20160920/PlamoBuild.hostapd-2.0 2016-09-20 15:52:27.000000000 +0900 +++ plamo/01_minimum/network.txz/hostapd/PlamoBuild.hostapd-2.5 2016-10-01 20:43:06.000000000 +0900 @@ -1,15 +1,15 @@ #!/bin/sh ###################################################################### -url="http://hostap.epitest.fi/releases/hostapd-2.0.tar.gz" +url="http://hostap.epitest.fi/releases/hostapd-2.5.tar.gz" pkgbase=hostapd -vers=2.0 +vers=2.5 arch=`uname -m` -build=P2 +build=P1 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="COPYING README +DOCS="CONTRIBUTIONS COPYING README `echo hostapd/{ChangeLog,README{,-WPS},{eap_testing,hlr_auc_gw}.txt}`" ###################################################################### @@ -235,28 +235,24 @@ done done cd $B - cp -p hostapd/Makefile{,.orig} - sed 's@/local@@g' hostapd/Makefile.orig \ - | sed 's@\@sbin@g' > hostapd/Makefile cp -p hostapd/{defconfig,.config} cat <<- "EOF" | patch hostapd/.config - 10a11 - > CFLAGS += -I/usr/include/libnl3 - 16c17 + 16c16 < #CONFIG_DRIVER_WIRED=y --- > CONFIG_DRIVER_WIRED=y - 106c107 + 31c31 + < #CONFIG_LIBNL32=y + --- + > CONFIG_LIBNL32=y + 114c114 < #CONFIG_WPS=y --- > CONFIG_WPS=y - 155c156 + 164c164 < #CONFIG_DEBUG_FILE=y --- > CONFIG_DEBUG_FILE=y - 269a271,272 - > - > CONFIG_LIBNL32=y EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]}/hostapd @@ -277,7 +273,7 @@ for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]}/hostapd if [ -f Makefile ] ; then - make + make BINDIR=/usr/sbin fi done fi @@ -294,13 +290,37 @@ for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]}/hostapd if [ -f Makefile ] ; then - make install DESTDIR=$P + make install DESTDIR=$P BINDIR=/usr/sbin fi done install -d $mandir/man1 install -m 644 $B/hostapd/hostapd_cli.1 $mandir/man1 install -d $mandir/man8 install -m 644 $B/hostapd/hostapd.8 $mandir/man8 + install -d $P/etc + cat <<- "EOF" > $P/etc/hostapd.conf.new + interface=wlan0 + ctrl_interface=/var/run/hostapd + ctrl_interface_group=wheel + ssid="replace SSID" + country_code=JP + ieee80211d=1 + hw_mode=g + macaddr_acl=0 + accept_mac_file=/etc/hostapd.accept + deny_mac_file=/etc/hostapd.deny + auth_algs=1 + wpa=2 + wpa_psk_file=/etc/hostapd.wpa_psk + wpa_key_mgmt=WPA-PSK + rsn_pairwise=CCMP + EOF + install -m 644 $B/hostapd/hostapd.accept $P/etc/hostapd.accept.new + sed -i '/^00/s/^/#/' $P/etc/hostapd.accept.new + install -m 644 $B/hostapd/hostapd.deny $P/etc/hostapd.deny.new + sed -i '/^00/s/^/#/' $P/etc/hostapd.deny.new + install -m 644 $B/hostapd/hostapd.wpa_psk $P/etc/hostapd.wpa_psk.new + sed -i '/^00/s/^/#/' $P/etc/hostapd.wpa_psk.new install -d $P/etc/rc.d/init.d cat <<- "EOF" > $P/etc/rc.d/init.d/hostapd #!/bin/sh @@ -336,48 +356,6 @@ exit 0 EOF chmod 644 $P/etc/rc.d/init.d/hostapd - cat <<- "EOF" > $P/etc/hostapd.conf.new - interface=wlan0 - ctrl_interface=/var/run/hostapd - ctrl_interface_group=wheel - ssid="replace SSID" - country_code=JP - ieee80211d=1 - hw_mode=g - macaddr_acl=0 - accept_mac_file=/etc/hostapd.accept - deny_mac_file=/etc/hostapd.deny - auth_algs=1 - wpa=2 - wpa_psk_file=/etc/hostapd.wpa_psk - wpa_key_mgmt=WPA-PSK - rsn_pairwise=CCMP - EOF - cat <<- "EOF" > $P/etc/hostapd.accept.new - # List of MAC addresses that are allowed to authenticate (IEEE 802.11) - # with the AP. - #00:11:22:33:44:55 - #00:66:77:88:99:aa - #00:00:22:33:44:55 - EOF - cat <<- "EOF" > $P/etc/hostapd.deny.new - # List of MAC addresses that are not allowed to authenticate (IEEE 802.11) - # with the AP. - #00:20:30:40:50:60 - #00:ab:cd:ef:12:34 - #00:00:30:40:50:60 - EOF - cat <<- "EOF" > $P/etc/hostapd.wpa_psk.new - # List of WPA PSKs. Each line, except for empty lines and lines starting - # with #, must contain a MAC address and PSK separated with a space. - # Special MAC address 00:00:00:00:00:00 can be used to configure PSKs that - # anyone can use. PSK can be configured as an ASCII passphrase of 8..63 - # characters or as a 256-bit hex PSK (64 hex digits). - #00:00:00:00:00:00 secret passphrase - #00:11:22:33:44:55 another passphrase - #00:22:33:44:55:66 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef - #00:00:00:00:00:00 another passphrase for all STAs - EOF touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ @@ -417,7 +395,7 @@ fi } - for in conf accept deny wpa_psk; do + for i in conf accept deny wpa_psk ; do hostapd_config $i done EOF