summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f67c46801866c1ec871e0fb74904710d18acec10 (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=lycklig
pkgname=lycklig-git
pkgver=20180813
pkgrel=1
pkgdesc="Image processing for lucky imaging."
arch=( i686 x86_64 )
url="https://github.com/AD-Vega/${_pkgname}.git"
license=('GPL3')
depends=( opencv python-pyqt5 python-scipy )
makedepends=( git cmake boost tclap )
checkdepends=()
optdepends=()
provides=( ${_pkgname} )
conflicts=( ${_pkgname} )
replaces=()
backup=()
options=()
install=
changelog=
source=()
noextract=()
md5sums=() #generate with 'makepkg -g'

_gitroot="${url}"
_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 --depth=1 $_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: