2 # Put the desired install prefix HERE
3 _iprefix=/opt/compiz-git
8 pkgdesc="Compiz is an extensible window manager utilizing opengl for effects and usability"
9 url="http://www.compiz.org/"
10 license=('GPL' 'LGPL' 'MIT')
11 arch=('i686' 'x86_64')
12 depends=('startup-notification' 'librsvg' 'libgl' 'dbus'
13 'mesa' 'libxslt' 'fuse' 'boost' 'libstdc++5')
14 makedepends=('intltool' 'git' 'cmake')
15 conflicts=('compiz-core-09')
16 options=(!libtool !emptydirs)
19 _gitroot="git://anongit.compiz.org/compiz/core"
20 _gitname="compiz-core"
23 # This is a developement version
26 # trick re-determining the build revision and, or entertain the hidden
27 # makepkg option --forcever, huh
28 if [ -z "${FORCE_VER}" ]; then
29 msg "Determining latest build revision..."
30 FORCE_VER=$(date +%Y%m%d)
36 msg "Connecting to GIT server...."
38 if [ -d "${_gitname}" ] ; then
39 cd "${_gitname}" && git pull origin
40 msg "The local files are updated."
42 git clone "${_gitroot}" "${_gitname}"
45 msg "GIT checkout done or server timeout"
46 msg "Starting make..."
47 cd "${srcdir}/${_gitname}"
48 [[ -d build ]] || mkdir build
50 env cmake .. -DCMAKE_INSTALL_PREFIX="${_iprefix}" -DCMAKE_BUILD_TYPE=Debug -DCOMPIZ_DESTDIR="${pkgdir}"
53 if [[ -d "${pkgdir}/usr" ]]; then
54 msg "Removing potentially conflicting files..."
55 find "${pkgdir}/usr" -type f | sed "s:^${pkgdir}::"
56 rm -rf "${pkgdir}/usr"
58 _cmake_root=$(sed -n 's/CMAKE_ROOT:INTERNAL=//p' CMakeCache.txt)
59 mkdir -p "${pkgdir}${_cmake_root}/Modules"
60 make findcompiz_install || return 1
61 mkdir -p "$pkgdir/usr/bin"
62 msg "Making /usr/bin symlinks..."
63 ln -s "${_iprefix}/bin/compiz" "$pkgdir/usr/bin/compiz-git"
64 [[ -f "${pkgdir}${_iprefix}/bin/gtk-window-decorator" ]] && \
65 ln -s "${_iprefix}/bin/gtk-window-decorator" "$pkgdir/usr/bin/gtk-window-decorator-git" || true
66 [[ -f "${pkgdir}${_iprefix}/bin/kde4-window-decorator" ]] && \
67 ln -s "${_iprefix}/bin/kde4-window-decorator" "$pkgdir/usr/bin/kde4-window-decorator-git" || true