Building and Installing Compiz++
This is a preliminary 'rough' guide explaining how to compile and install compiz++ to a non standard prefix. This assumes you are a developer, know exactly what you're doing or do not mind breaking your system. For sake of simplicity we'll assume the prefix /opt/compiz++/ and the source will be contained and built in /usr/local/src/ but other paths work too (both paths can be in your home directory if you prefer). Make sure your regular user has write access to the source directory (do not build the source as root). The dependency list is changing and will be added later. You will need at least cmake, boost devel and git packages installed. Refer to the dep list here to get an idea of what other packages might need to be installed.
Obtain the source
The source code can be downloaded from git. We'll demonstrate how to install compiz, bcop libcompizconfig, compizconfig-python, ccsm and an example plugin in that order. Important notes about cmake: Choose a location in which to store the code that does not contain spaces or any questionable characters. Compiz++ will be built in a different location than where the code is actually contained. After you begin, do not move or rename this directory because it may cause future problems when updating or uninstalling. That said, here we go.
1) Grab the source using git
mkdir -p /usr/local/src/compiz; cd /usr/local/src/compiz git clone git://anongit.freedesktop.org/git/xorg/app/compiz compiz++ git clone git://anongit.compiz-fusion.org/fusion/libraries/bcop bcop++ git clone git://anongit.compiz-fusion.org/fusion/compizconfig/libcompizconfig libcompizconfig++ git clone git://anongit.compiz-fusion.org/fusion/compizconfig/compizconfig-python compizconfig-python++ git clone git://anongit.compiz-fusion.org/fusion/compizconfig/ccsm ccsm++
2) You must switch to the compiz++ branch for each repo you clone. From each directory do the following
git checkout -b compiz++ --track origin/compiz++
3) Create a directory in which to build the source and run cmake
mkdir -p /usr/local/src/compiz/compiz_build; cd /usr/local/src/compiz/compiz_build cmake -DCMAKE_INSTALL_PREFIX=/opt/compiz++ /usr/local/src/compiz/compiz++
4) After cmake succeeds (meaning all dependencies were met) compile and install
make sudo make install
5) Build and install bcop
cd /usr/local/src/compiz/bcop++ ./autogen.sh --prefix=/opt/compiz++ ./configure --prefix=/opt/compiz++ make sudo make install
6) Now that compiz and bcop are installed, we'll set some environment variables so we can build libcompizconfig and other components
export LD_LIBRARY_PATH=/opt/compiz++/lib/ export PKG_CONFIG_PATH=/opt/compiz++/lib/pkgconfig:/opt/compiz++/share/pkgconfig
7) Build and install libcompizconfig
cd /usr/local/src/compiz/libcompizconfig++ ./autogen.sh --prefix=/opt/compiz++ ./configure --prefix=/opt/compiz++ make sudo make install
8) Build compizconfig-python and ccsm. NOTE: compizconfig-python needs to be rebuilt to work with the compiz++ branch of libcompizconfig but has no changes in the source specific to compiz++, so there is no compiz++ branch. ccsm does not have a compiz++ branch either nor does it need rebuilding but it can't hurt.
cd /usr/local/src/compiz/compizconfig-python++ ./autogen.sh --prefix=/opt/compiz++ ./configure --prefix=/opt/compiz++ make sudo make install cd /usr/local/src/compiz/ccsm++ sudo python setup.py install --prefix=/opt/compiz++
9) Build any additional plugins, alternatively setting BUILD_GLOBAL and installing as root to install into PREFIX as opposed to ~/.compiz
mkdir -p /usr/local/src/compiz/plugins; cd /usr/local/src/compiz/plugins git clone git://git.compiz-fusion.org/users/smspillaz/example example cd example git checkout -b compiz++ --track make BUILD_GLOBAL=true sudo -E make install
10) Run compiz and ccsm
LD_LIBRARY_PATH=/opt/compiz++/lib/ /opt/compiz++/bin/compiz --replace ccp PYTHONPATH=/opt/compiz++/lib/python2.5/site-packages /opt/compiz++/bin/ccsm