updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / plasmoid-toggle-compositing-svn / PKGBUILD
blob53ce52a995e30ba62fd761a461e70e0f38f259b0
1 # Contributor: Sphax <zecmerquise@gmail.com>
2 pkgname=plasmoid-toggle-compositing-svn
3 pkgver=847288
4 pkgrel=1
5 pkgdesc="A plasmoid to toggle KWin compositing"
6 arch=(i686 x86_64)
7 url="http://www.kde.org"
8 license="GPL"
9 depends=('kdelibs' 'kdebase-workspace')
10 makedepends=('cmake' 'gcc>=4.*' 'automoc4' 'subversion')
11 source=()
12 md5sums=()
14 _svntrunk="svn://anonsvn.kde.org/home/kde/trunk/playground/base/plasma/applets/toggle-compositing"
15 _svnmod="toggle-compositing"
17 build()
19         cd $startdir/src
20         if [ -d $_svnmod/.svn ]; then
21                 (cd $_svnmod && svn up)
22         else
23                 svn co $_svntrunk --config-dir ./ $_svnmod
24         fi
26         msg "SVN checkout done or server timeout"
28         if [ -d $_svnmod-build ]; then
29                 rm -rf $_svnmod-build
30         fi
31         cp -r $_svnmod $_svnmod-build
33         cd $_svnmod-build
34         # Fix to install correctly the svg file
35         patch -Np0 -i $startdir/cmakelists.patch || return 1
36         mv images/onoff_switch.svg.old images/onoff_switch.svg
38         mkdir cmake-build
39         cd cmake-build
40         cmake ../ \
41                 -DCMAKE_INSTALL_PREFIX=/usr \
42                 -DCMAKE_BUILD_TYPE=Release || return 1
43         make || return 1
44         make DESTDIR=$startdir/pkg install || return 1