2
0
mirror of https://codeberg.org/kiss-community/repo synced 2024-12-23 15:50:06 -07:00
repo/extra/wpa_supplicant/build
2021-07-29 10:22:51 +03:00

29 lines
883 B
Bash
Executable File

#!/bin/sh -e
# The wpa_supplicant package is built statically using
# libnl-tiny which is a minimal version of libnl maintained
# by OpenWRT.
make CC="$CC" ALL_LIBS=libnl-tiny.a -C libnl
# The CFLAGS must be set to link to the above locally built
# libnl-tiny library.
export CFLAGS="$CFLAGS -I$PWD/libnl/include -L$PWD/libnl -lnl-tiny"
export CFLAGS="$CFLAGS -static -D_GNU_SOURCE -DLIBNL1_COMPAT"
cd wpa_supplicant
make LIBDIR=/usr/lib BINDIR=/usr/bin DRV_LIBS="$CFLAGS"
make LIBDIR=/usr/lib BINDIR=/usr/bin install
mkdir -p \
"$1/usr/share/man/man5" \
"$1/usr/share/man/man8"
cp -f doc/docbook/*.5 "$1/usr/share/man/man5"
cp -f doc/docbook/*.8 "$1/usr/share/man/man8"
# 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"