summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e887f3ca4bd476c2c8d016c98938228509a17dac (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Maintainer: Jure Varlec <jure.varlec@ad-vega.si>
_pkgname=qarv
pkgname=qarv-git
pkgver=20190728
pkgrel=1
pkgdesc="Qt GUI and API interfaces to ethernet cameras via Aravis"
arch=( i686 x86_64 )
url="https://github.com/AD-Vega/${_pkgname}"
license=('GPL3')
depends=( qt5-base qt5-svg aravis ffmpeg opencv gstreamer )
makedepends=( git cmake doxygen graphviz )
checkdepends=()
optdepends=()
provides=( ${_pkgname} )
conflicts=( ${_pkgname} )
replaces=()
backup=()
options=()
install=$pkgname.install
changelog=
source=()
noextract=()
md5sums=() #generate with 'makepkg -g'

_gitroot="https://github.com/AD-Vega/${_pkgname}.git"
_gitname="master"

build() {
  cd "$srcdir"
  msg "Connecting to Git server...."

  if [ -d $_gitname ] ; then
    cd $_gitname && git pull --rebase origin
    msg "The local files are updated."
  else
    git clone $_gitroot $_gitname
    cd $_gitname
    git checkout $_gitname
    cd -
  fi

  msg "Git checkout done."
  msg "Starting make..."

  cd $srcdir
  [ -d build ] && rm -r build
  mkdir build
  cd build
  cmake -DCMAKE_INSTALL_PREFIX=/usr/ "$srcdir/$_gitname/"
  make doc
  make
}

package() {
  cd "$srcdir/build"
  make DESTDIR="$pkgdir/" install
  local docdest="$pkgdir/usr/share/doc/$pkgname/"
  mkdir -p "$docdest"
  cp "$srcdir/$_gitname/"{README,NEWS,AUTHORS} "$docdest"
  cp -r apidoc/html "$docdest/api"
}

# vim:set ts=2 sw=2 et: