Step 3: Build eCAP 3 Library
Latest Squid depends on presence of eCAP adapter library on the host machine. Default libecap2 library present in Ubuntu 16 Xenial is too old. We will need to build a newer version. In order to do that run script 03_build_ecap.sh.
#!/bin/bash
if [[ $EUID -eq 0 ]]; then
echo "This script must NOT be run as root" 1>&2
exit 1
fi
# set ecap version
source ecap.ver
# drop ecap build folder
rm -R build/libecap
# we will be working in a subfolder make it
mkdir -p build/libecap
# decend into working directory
pushd build/libecap
# get libecap from debian stretch
wget http://http.debian.net/debian/pool/main/libe/libecap/libecap_${ECAP_PKG}.dsc
wget http://http.debian.net/debian/pool/main/libe/libecap/libecap_${ECAP_VER}.orig.tar.gz
wget http://http.debian.net/debian/pool/main/libe/libecap/libecap_${ECAP_PKG}.debian.tar.xz
# unpack the source package
dpkg-source -x libecap_${ECAP_PKG}.dsc
# build the package
cd libecap-${ECAP_VER} && dpkg-buildpackage -rfakeroot -b
# and revert
popd
ecap.ver file is just to easier manage eCAP versions in script.
#!/usr/bin/env bash
# set ecap version
ECAP_VER="1.0.1"
ECAP_PKG="${ECAP_VER}-3.2"
After build is successful, run script 04_install_ecap.sh to install the library and headers. These are needed to build Squid on the next step.
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
# set ecap version
source ecap.ver
# decend into working directory
pushd build/libecap
# install ecap packages
dpkg --install libecap3_${ECAP_PKG}_amd64.deb
dpkg --install libecap3-dev_${ECAP_PKG}_amd64.deb
# and revert
popd
Press Next to continue to Step 4.