READ FIRST
This is outdated information, though the concepts are valid. A script implmenting these concepts for OpenConnect 8 on Ubuntu 18 (bionic) and 19 (eoan) is available
Building OpenConnect 7 on Ubuntu 14 (trusty) and 15 (vivid)
The steps in this guide are available as an autobuild shell script