updated on Fri Jan 13 20:02:10 UTC 2012
[aur-mirror.git] / okular-git / PKGBUILD
blobcbca51a37836ebab6db655189042bf0a99c7c23a
1 pkgname=okular-git
2 pkgver=20110711
3 pkgrel=1
4 pkgdesc='KDE document viewer'
5 arch=('i686' 'x86_64')
6 license=('GPL')
7 url="http://kde.org/"
8 depends=('kdebase4-runtime-git' 'qimageblitz' 'poppler-qt' 'chmlib' \
9          'djvulibre' 'ebook-tools' 'libspectre')
10 makedepends=('git' 'automoc4' 'cmake')
11 conflicts=('kdegraphics-okular')
12 provides=('kdegraphics-okular')
13 groups=('kde4-git')
15 _gitroot="git://anongit.kde.org/okular.git"
16 _gitname="okular"
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