summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 282b02f5d162fa22095f227c878f1ab1a9336d9d (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
# Maintainer: Jure Varlec <jure.varlec@ad-vega.si>
_pkgname=arif
pkgname=arif-git
pkgver=20220418
pkgrel=1
pkgdesc="ADV Realtime Image Filtering: quality filtering for lucky imaging."
arch=( i686 x86_64 )
url="https://github.com/AD-Vega/${_pkgname}"
license=('GPL3')
depends=( qarv boost-libs )
makedepends=( git cmake boost tclap )
checkdepends=()
optdepends=()
provides=( ${_pkgname} )
conflicts=( ${_pkgname} )
replaces=()
backup=()
options=()
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
}

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

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