updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / ksnapshot-git / PKGBUILD
blob613b6eefec2d5bf9bba64c295f1cc436eff6b377
1 pkgname=ksnapshot-git
2 pkgver=20110711
3 pkgrel=1
4 pkgdesc='A handy utility primarily designed for taking screenshots'
5 arch=('i686' 'x86_64')
6 license=('GPL')
7 url="http://kde.org/"
8 depends=('kdelibs4-git' 'libkipi-git')
9 makedepends=('git' 'automoc4' 'cmake')
10 optdepends=('kipi-plugins-git')
11 conflicts=('kdegraphics-ksnapshot')
12 provides=('kdegraphics-ksnapshot')
13 groups=('kde4-git')
15 _gitroot="git://anongit.kde.org/ksnapshot.git"
16 _gitname="ksnapshot"
18 build() {
20 cd $srcdir
22   msg "Connecting to the GIT server...."
23   
24   if [[ -d $srcdir/$_gitname ]] ; then
25     cd $_gitname
26     git pull origin
27     msg "The local files are updated."
28   else
29     git clone $_gitroot
30   fi
31   
32   msg "GIT checkout done"
33   msg "Starting make..."
34   if [[ -d ${srcdir}/${_gitname}-build ]]; then
35     msg "Cleaning the previous build directory..."
36     rm -rf ${srcdir}/${_gitname}-build
37   fi
38   mkdir $srcdir/$_gitname-build
39   cd $srcdir/$_gitname-build
40   cmake $startdir/src/$_gitname -DCMAKE_BUILD_TYPE=Release \
41                 -DCMAKE_INSTALL_PREFIX=/usr
42   make
45 package() {
46   cd ${srcdir}/$_gitname-build
47   make DESTDIR=${pkgdir} install