summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2249988f52d3d9f67208053b9780e5e356f62d12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Contributor: thorsten w. <p@thorsten-wissmann.de>
pkgname=katarakt-git
pkgver=20130311
pkgrel=1
pkgdesc="A simple PDF viewer with two layouts"
arch=('i686' 'x86_64')
url="http://git.informatik.uni-erlangen.de/?p=katarakt"
license=('BSD')
depends=( qt4 poppler-qt )
optdepends=( )
makedepends=( asciidoc )
provides=( )
backup=( )
source=( )
md5sums=( )
_gitroot="git://git.informatik.uni-erlangen.de/katarakt"
_gitname="katarakt"

build() {
  cd $srcdir
  echo "Fetching source from GIT"
  if ! [ -d "$_gitname" ] ; then
    # if git dir does not exist yet
    # then clone git repo
    git clone "$_gitroot" || return 1
    cd "$_gitname"
  else
    # else pull sources
    cd "$_gitname" && git pull origin || return 1
  fi
  # compile
  qmake-qt4
  make
  a2x -f manpage -a "date=`date +%Y-%m-%d`" doc/katarakt.txt
}

package() {
  cd $srcdir/$_gitname
  install -D -m755 katarakt "${pkgdir}/usr/bin/katarakt"
  install -D -m644 doc/katarakt.txt "${pkgdir}/usr/share/doc/${pkgname}/katarakt"
  install -D -m644 doc/katarakt.1 "${pkgdir}/usr/share/man/man1/katarakt.1"
  install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}