updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / compiz-core++ / PKGBUILD
blobcf7b942a2b1af7a51c67ca4c2451e4a937f89039
2 # Put the desired install prefix HERE
3 _iprefix=/opt/compiz-git
5 pkgname=compiz-core++
6 pkgver=20101113
7 pkgrel=1
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)
17 source=()
18 md5sums=()
19 _gitroot="git://anongit.compiz.org/compiz/core"
20 _gitname="compiz-core"
21 MAKEFLAGS="-j1"
23 # This is a developement version
24 OPTIONS=(!strip)
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)
33 build()
35         cd "${srcdir}"
36         msg "Connecting to GIT server...."
38         if [ -d "${_gitname}" ] ; then
39                 cd "${_gitname}" && git pull origin
40                 msg "The local files are updated."
41         else
42                 git clone "${_gitroot}" "${_gitname}"
43         fi
45         msg "GIT checkout done or server timeout"
46         msg "Starting make..."
47         cd "${srcdir}/${_gitname}"
48         [[ -d build ]] || mkdir build
49         cd build
50         env cmake .. -DCMAKE_INSTALL_PREFIX="${_iprefix}" -DCMAKE_BUILD_TYPE=Debug -DCOMPIZ_DESTDIR="${pkgdir}"
51         make
52         make install
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"
57         fi
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