updated on Tue Jan 10 12:02:00 UTC 2012
[aur-mirror.git] / apvlv-git / PKGBUILD
blobb4380e101ba6a2c49c8aa1b7b55c057fd4e35f46
1 # Maintainer: Andrwe Lord Weber <lord-weber-andrwe [at] andrwe [dot] org>
3 pkgname=apvlv-git
4 pkgver=20111220
5 pkgrel=1
6 pkgdesc="A pdf viewer which behaves like Vim."
7 arch=('i686' 'x86_64')
8 url="http://naihe2010.github.com/apvlv/"
9 license=('GPL')
10 depends=('poppler-glib' 'djvulibre' 'libwebkit' 'libumd')
11 makedepends=('git' 'cmake')
12 conflicts=('apvlv')
13 source=()
14 md5sums=()
16 _gitroot="https://github.com/naihe2010/apvlv.git"
17 _gitname="apvlv"
19 build() {
20         cd "${srcdir}"
21         msg "Connecting to GIT server...."
22         
23         if [ -d $_gitname ] ; then
24                 cd $_gitname && git pull origin
25                 msg "The local files are updated."
26         else
27                 git clone -b master $_gitroot $_gitname
28         fi
29         
30         msg "GIT checkout done or server timeout"
32         if [ -d "${srcdir}/${_gitname}-build" ]
33         then
34                 rm -rf "${srcdir}/${_gitname}-build"
35         fi
37         cp -r "${srcdir}/${_gitname}" "${srcdir}/${_gitname}-build"
38         cd "${srcdir}/${_gitname}-build"
39         
40         msg "Starting make..."
42         mkdir -p build
43         cd build
45         cmake -DCMAKE_BUILD_TYPE=Release \
46                 -DCMAKE_INSTALL_PREFIX=/usr \
47                 -DAPVLV_WITH_UMD=yes  ..
48         make
51 package()
53         cd "${srcdir}/${_gitname}-build"/build
54         make DESTDIR=${pkgdir} install