updated on Sat Jan 14 12:12:45 UTC 2012
[aur-mirror.git] / pate-git / PKGBUILD
blobcaacb2f62146b6bc99eb4b81f2f344ad0acff92a
1 # Contributor: Massimiliano Torromeo <Massimiliano DOT Torromeo AT gmail DOT com>
2 pkgname=pate-git
3 pkgver=20111223
4 pkgrel=1
5 pkgdesc="Pate is a plugin for Kate that allows you to create new plugins in Python for Kate. (Git version for KDE4)"
6 arch=(i686 x86_64)
7 url="http://paul.giannaros.org/pate/"
8 license=('GPL')
9 depends=('kdesdk-kate' 'kdebindings-python')
10 makedepends=('git' 'python2-sip')
12 _gitroot="git://github.com/mtorromeo/pate.git"
13 _gitname="pate"
15 build() {
16         cd "$srcdir"
17         msg "Connecting to GIT server...."
19         if [ -d $_gitname ] ; then
20                 cd $_gitname && git pull origin
21                 msg "The local files are updated."
22         else
23                 git clone --depth=1 $_gitroot
24         fi
26         msg "GIT checkout done or server timeout"
27         msg "Starting make..."
29         rm -rf "$srcdir/$_gitname-build"
30         cp -R "$srcdir/$_gitname" "$srcdir/$_gitname-build"
31         cd "$srcdir/$_gitname-build"
33         cmake . -DPYTHON_EXECUTABLE=/usr/bin/python2 -DCMAKE_INSTALL_PREFIX=/usr
34         make
37 package() {
38         cd "$srcdir/$_gitname-build"
39         install -m 755 -d "$pkgdir/usr/share/apps/kate/pate"
40         cp -rv "$srcdir/$_gitname-build/src/plugins/"* "$pkgdir/usr/share/apps/kate/pate"
41         make DESTDIR="$pkgdir/" install