Read this guide through before proceeding, as you may need to repeat some steps which I detail later in the guide
I found this helpful way to get the job done better.
For each directory, download the .dsc file using wget. There should be 3 directories to get it from, SOPE, SOGo and wbxml2. For example:
Don't try to download that, as the link changes daily. It's a nightly build! Use the first link to download them yourself.
Download the .tar.gz and .tar.xz files too as we need those. For example:
wget http://inverse.ca/ubuntu-nightly-v3/pool/xenial/s/sogo/sogo_188.8.131.5260508-1.debian.tar.xz wget http://inverse.ca/ubuntu-nightly-v3/pool/xenial/s/sogo/sogo_184.108.40.20660508.orig.tar.gz
sudo apt-get install dpkg-dev
For SOPE, we need all this:
sudo apt-get install debhelper gnustep-make libgnustep-base-dev gobjc objc-compiler libxml2-dev libldap2-dev libldap-dev libssl-dev zlib1g-dev libpq-dev postgresql-dev libmysqlclient-dev libmysqlclient15-dev autotools-dev
For wbxml2 we need:
sudo apt-get install debhelper cmake cdbs check libexpat1-dev libpopt-dev zlib1g-dev libz-dev
For SOGo we need:
sudo apt-get install debhelper gobjc libgnustep-base-dev libsope-appserver4.9-dev libsope-core4.9-dev libsope-gdl1-4.9-dev libsope-ldap4.9-dev libsope-mime4.9-dev libsope-xml4.9-dev libmemcached-dev libxml2-dev libsbjson-dev libssl-dev libcurl4-openssl-dev libwbxml2-dev liblasso3-dev
For each of the .dsc files (one for SOPE, wbxml2 and SOGo and do it in that order) we do the following:
sudo su dpkg-source -x soap-version-x.dsc cd soap-version-x/ dpkg-buildpackage -rfakeroot -b cd..
Once you've gone back a directory, you'll see the compiled .deb files (hopefully!)
I had to compile SOPE and wbxml2 first, then install all the .debs before compiling SOGo as SOGo depended on all the debs from SOPE and wbxml2. So for example, I had to do this:
sudo dpkg -i libsope-core4.9_4.9.r1664.20160425_armhf.deb sudo dpkg -i libsope-core4.9-dev_4.9.r1664.20160425_armhf.deb
You need to install the normal package before the dev package in most cases. In addition, there is a certain order in which they need to be installed, so I suggest reading the dpkg output for what each one depends on, resolve that first, then go back to the one you were attempting to install.
Once that's done, you should be able to compile SOGo as also described above.
After that, I moved the .debs to another machine and created a personal repository outlined here
I have two Raspberry Pi's, so I did the compiling on one of the Pi's and installed SOGo on the other to save disk space on the one I'd do the installation on. In total, I think all the junk amounted to about 1GB+ of extra disk space, so I wanted to get it done as efficiently as I could. If you only have access to a single Pi, then move the packages from the above step to other storage, then just re-write a new image on your Micro SD Card.
Once I copied the files to /mnt/packages/ I did the following:
sudo apt-get install dpkg-dev
Create a new script in the /mnt/packages/ directory
sudo nano dpkgdebs.sh
Paste the following into the file:
#! /bin/bash cd /mnt/packages dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
Save and exit, next make it executable:
sudo chmod u+x dpkgdebs.sh
Run the script obvious:
Lastly, we need to add the repo to the sources.list file:
sudo nano /etc/apt/sources.list
Add this line:
deb file:/mnt/packages ./
Save and exit. Then install
sudo apt-get update && sudo apt-get install sogo sogo-activesync wbxml2
It will complain that they're unsigned, that's fine, just select yes and we're done with installing SOGo!