81 lines
2.3 KiB
Text
Executable file
81 lines
2.3 KiB
Text
Executable file
# Description: Implements WPA key negotiation with a WPA Authenticator and Extensible Authentication Protocol (EAP) authentication with an Authentication Server
|
|
# URL:
|
|
# Maintainer:
|
|
# Depends on: libnl openssl dbus libxml2
|
|
|
|
name=wpa_supplicant
|
|
version=2.9
|
|
bootscriptsversion=20191025
|
|
release=2
|
|
source=(https://w1.fi/releases/wpa_supplicant-$version.tar.gz
|
|
http://anduin.linuxfromscratch.org/BLFS/blfs-bootscripts/blfs-bootscripts-$bootscriptsversion.tar.xz
|
|
wpa_supplicant.conf)
|
|
|
|
build() {
|
|
cd $name-$version
|
|
|
|
cat > wpa_supplicant/.config << "EOF"
|
|
CONFIG_BACKEND=file
|
|
CONFIG_CTRL_IFACE=y
|
|
CONFIG_DEBUG_FILE=y
|
|
CONFIG_DEBUG_SYSLOG=y
|
|
CONFIG_DEBUG_SYSLOG_FACILITY=LOG_DAEMON
|
|
CONFIG_DRIVER_NL80211=y
|
|
CONFIG_DRIVER_WEXT=y
|
|
CONFIG_DRIVER_WIRED=y
|
|
CONFIG_EAP_GTC=y
|
|
CONFIG_EAP_LEAP=y
|
|
CONFIG_EAP_MD5=y
|
|
CONFIG_EAP_MSCHAPV2=y
|
|
CONFIG_EAP_OTP=y
|
|
CONFIG_EAP_PEAP=y
|
|
CONFIG_EAP_TLS=y
|
|
CONFIG_EAP_TTLS=y
|
|
CONFIG_IEEE8021X_EAPOL=y
|
|
CONFIG_IPV6=y
|
|
CONFIG_LIBNL32=y
|
|
CONFIG_PEERKEY=y
|
|
CONFIG_PKCS12=y
|
|
CONFIG_READLINE=y
|
|
CONFIG_SMARTCARD=y
|
|
CONFIG_WPS=y
|
|
CFLAGS += -I/usr/include/libnl3
|
|
CONFIG_CTRL_IFACE_DBUS=y
|
|
CONFIG_CTRL_IFACE_DBUS_NEW=y
|
|
CONFIG_CTRL_IFACE_DBUS_INTRO=y
|
|
EOF
|
|
|
|
cd wpa_supplicant
|
|
make BINDIR=/sbin LIBDIR=/lib
|
|
|
|
install -d $PKG/{sbin,usr/share/man/man{5,8}}
|
|
|
|
install -m755 wpa_{cli,passphrase,supplicant} $PKG/sbin/
|
|
install -m644 doc/docbook/wpa_supplicant.conf.5 $PKG/usr/share/man/man5/
|
|
install -m644 doc/docbook/wpa_{cli,passphrase,supplicant}.8 $PKG/usr/share/man/man8/
|
|
|
|
install -d $PKG/{etc/dbus-1/system.d/,usr/share/dbus-1/system-services/}
|
|
install -m644 dbus/fi.w1.wpa_supplicant1.service $PKG/usr/share/dbus-1/system-services/fi.w1.wpa_supplicant1.service
|
|
install -m644 dbus/dbus-wpa_supplicant.conf $PKG/etc/dbus-1/system.d/wpa_supplicant.conf
|
|
|
|
# wpa_supplicant.conf
|
|
install -Dm 600 $SRC/wpa_supplicant.conf $PKG/etc/wpa_supplicant.conf
|
|
|
|
# rc service
|
|
cd ../../blfs-bootscripts-$bootscriptsversion
|
|
make DESTDIR=$PKG install-service-wpa
|
|
|
|
mkdir -p $PKG/etc/sysconfig
|
|
cat > $PKG/etc/sysconfig/ifconfig.wifi0 << "EOF"
|
|
ONBOOT="no"
|
|
IFACE="wlan0"
|
|
SERVICE="wpa"
|
|
|
|
# Additional arguments to wpa_supplicant
|
|
WPA_ARGS=""
|
|
|
|
WPA_SERVICE="dhcpcd"
|
|
#DHCP_START="-b -q <insert appropriate start options here>"
|
|
#DHCP_STOP="-k <insert additional stop options here>"
|
|
EOF
|
|
}
|