#! /bin/bash

## to build my 2.28 version
 
SRC_BASE=~/src/evolution/git/
BUILD_BASE=$(pwd)
PKG_CONFIG_PATH=/opt/evo/lib/pkgconfig
PREFIX=/opt/evo
CONFIG_SHELL=/bin/bash

export PKG_CONFIG_PATH CONFIG_SHELL

mkdir -p ${BUILD_BASE}/gtkhtml ${BUILD_BASE}/evolution-data-server ${BUILD_BASE}/evolution
#cd gtkhtml/
#PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig/  CC='ccache gcc' CFLAGS=-g  "${SRC_BASE}/gtkhtml/autogen.sh" --prefix=${PREFIX} && make && make install
cd ${BUILD_BASE}/evolution-data-server
PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig/  CC='ccache gcc' CFLAGS=-g  "${SRC_BASE}/evolution-data-server/autogen.sh" --prefix=${PREFIX} && make && make install
cd ${BUILD_BASE}/evolution
PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig/  CC='ccache gcc' CFLAGS=-g  "${SRC_BASE}/evolution/autogen.sh" --prefix=${PREFIX}  && make && make install

## Installing plugins
cd /home/tom/src/remove-duplicates-plugin-0.0.4 && ./configure --prefix=${PREFIX} && make && make install
cd /home/tom/src/evolution-remove-attachments-0.0.2 && ./configure --prefix=${PREFIX} && make && make install
cd /home/tom/build/evolution/plugins/external-editor && make && make install
