2019-06-21 02:39:04 -06:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
2020-02-24 08:04:00 -07:00
|
|
|
# The wpa_supplicant package is built statically using
|
|
|
|
# libnl-tiny which is a minimal version of libnl maintained
|
|
|
|
# by OpenWRT.
|
2022-03-26 02:45:52 -06:00
|
|
|
mv libnl-tiny* libnl.tar.gz
|
|
|
|
tar xf libnl.tar.gz
|
|
|
|
mv libnl-tiny* libnl
|
2020-02-24 08:04:00 -07:00
|
|
|
|
2022-03-26 02:45:52 -06:00
|
|
|
export CFLAGS="$CFLAGS -D_GNU_SOURCE -I$PWD/libnl/include"
|
|
|
|
export LDFLAGS="-L$PWD/libnl"
|
|
|
|
|
|
|
|
(
|
|
|
|
cd libnl
|
|
|
|
|
2022-03-26 02:55:00 -06:00
|
|
|
# CFLAGS must expand to individual arguments.
|
|
|
|
# shellcheck disable=2086
|
2022-03-26 02:59:16 -06:00
|
|
|
${CC:-cc} $CFLAGS $CPPFLAGS -c ./*.c
|
|
|
|
${AR:-ar} rc libnl-tiny.a ./*.o
|
2022-03-26 02:45:52 -06:00
|
|
|
)
|
2020-02-24 08:04:00 -07:00
|
|
|
|
2019-06-21 02:39:04 -06:00
|
|
|
cd wpa_supplicant
|
|
|
|
|
2022-03-26 02:45:52 -06:00
|
|
|
make LIBDIR=/usr/lib BINDIR=/usr/bin
|
2021-07-17 21:30:32 -06:00
|
|
|
make LIBDIR=/usr/lib BINDIR=/usr/bin install
|
2020-08-14 00:48:18 -06:00
|
|
|
|
2021-07-01 10:35:51 -06:00
|
|
|
mkdir -p \
|
|
|
|
"$1/usr/share/man/man5" \
|
|
|
|
"$1/usr/share/man/man8"
|
2020-08-14 00:48:18 -06:00
|
|
|
|
2021-07-01 10:35:51 -06:00
|
|
|
cp -f doc/docbook/*.5 "$1/usr/share/man/man5"
|
|
|
|
cp -f doc/docbook/*.8 "$1/usr/share/man/man8"
|
2021-07-29 01:22:51 -06:00
|
|
|
|
|
|
|
# Install runit service.
|
|
|
|
mkdir -p "$1/etc/sv/wpa_supplicant"
|
|
|
|
cp -f wpa_supplicant.run "$1/etc/sv/wpa_supplicant/run"
|
|
|
|
ln -sf /run/runit/supervise.wpa_supplicant "$1/etc/sv/wpa_supplicant/supervise"
|