As my employer uses Exchange mail server, I need a way to access my mail from my Ubuntu box. The current Evolution exchange connector is quite outdated, so I prefer to use the emerging Evolution EWS connector. It can access the addressbook, the calendar and even the MAIL! :D Since it's emerging it requires frequent recompilation. After installing the required tools and libs, it still doesn't compile on the Ubuntu 12.04, for the several deprecated API calls it makes. So I came up with the following script to compile it and prepare a nice little package from it.
#!/bin/bash
sudo rm -r evolution-ews ; git clone http://git.gnome.org/browse/evolution-ews -b gnome-3-2
sed '/\-Wall/ a \
\t-Wno-error=deprecated-declarations \
\t-Wno-missing-field-initializers' evolution-ews/configure.ac |
sed '/AC_SUBST(SOUP_CFLAGS)/ i \
AC_CHECK_LIB(gthread-2.0, g_thread_init)' >evolution-ews/configure.ac.new
mv evolution-ews/configure.ac.new evolution-ews/configure.ac
cd evolution-ews
./autogen.sh --prefix=/usr --disable-maintainer-mode
sudo checkinstall --pkgname=evolution-ews --pkgversion=3.2 --pkgrelease=git -requires `evolution \(\>\= 3.2\), evolution \(\<\<3.3\)` && sudo mv *.deb ..
cd ..