# Note: depends on autoconf
# Note: depends on automake
# Note: depends on libtool
# Note: optionally depends on python-six for the Python module
wget -c https://github.com/google/protobuf/archive/v3.5.1/protobuf-3.5.1.tar.gz
tar -xzf protobuf-3.5.1.tar.gz
cd protobuf-3.5.1
autoreconf -f -i -Wall,no-obsolete
mkdir -p builddir
cd builddir
../configure --prefix="/usr"
make # Doesn't mind -j#
make install
if python3 -c 'import six' 2> /dev/null; then
  cd ../python
  python3 setup.py build
  python3 setup.py install # as root
fi