目录
目前访问国外源代码服务非常不稳定,从GitHub等开源服务器下载代码越来越慢,所以想把一些常用的开源项目转移到码云服务器进行管理和下载,快速便捷,也防止了防火墙的短时间封锁。(建议大家对于一些常用的开源项目建立本地的代码库镜像)
安装依赖工具集
#安装 pkg-config
sudo apt-get install pkg-config
#安装其他依赖工具
sudo apt-get install autoconf automake libtool make g++ unzip
sudo apt-get install libgflags-dev libgtest-dev
sudo apt-get install clang libc++-dev
下载源代码
git clone https://gitee.com/githubplus/grpc.git
变更Git Submodule的源地址
因为要保持代码库的纯净性,所以没有把submodule的地址提交到服务器,还是建议在本地手动修改。
1、修改.gitmodules文件(注意branch不要修改)
[submodule "third_party/zlib"]
path = third_party/zlib
url = https://gitee.com/githubplus/zlib
# When using CMake to build, the zlib submodule ends up with a
# generated file that makes Git consider the submodule dirty. This
# state can be ignored for day-to-day development on gRPC.
ignore = dirty
[submodule "third_party/protobuf"]
path = third_party/protobuf
url = https://gitee.com/githubplus/protobuf.git
branch = 3.0.x
[submodule "third_party/gflags"]
path = third