default_pre_build &&
cd "$SOURCE_DIRECTORY/wpa_supplicant" &&

sed -i "s|/usr/local|$INSTALL_ROOT/usr|g" Makefile &&

if is_depends_enabled $SPELL dbus; then
  if [[ $WPA_RELEASE == legacy ]]; then
    sed -i "s|=/sbin|=$INSTALL_ROOT/usr/sbin|g" dbus-wpa_supplicant.service
  elif [[ $WPA_RELEASE == devel ]]; then
    sed -i "s|=/sbin|=$INSTALL_ROOT/usr/sbin|g" \
           dbus/fi.epitest.hostap.WPASupplicant.service
  fi
fi &&

if [[ -z $QTDIR ]] && is_depends_enabled $SPELL qt-x11; then
  . "$INSTALL_ROOT/etc/profile.d/qt.sh"
fi
