summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9a17eb03fc20f1c586649cbd57a9dff33698e05a (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
64
65
# Maintainer: Anatol Pomozov <anatol.pomozov@gmail.com>

pkgname=liblikely-git
pkgver=r582.58f1e78
pkgrel=1
pkgdesc='An image recognition runtime for heterogenous architectures'
arch=(i686 x86_64)
url='http://liblikely.org/'
license=(Apache2)
depends=(xz libjpeg libpng libtiff jasper ncurses)
makedepends=(git cmake)
options=(!emptydirs)
_branch=gh-pages
source=(git://github.com/biometrics/likely#branch=$_branch
        git://github.com/biometrics/likely-data
        git://github.com/llvm-mirror/llvm
        git://github.com/LuaDist/lua
        git://github.com/Itseez/opencv
        git://git.gitorious.org/qcustomplot/qcustomplot.git
        git://github.com/bagder/curl)
sha1sums=('SKIP'
          'SKIP'
          'SKIP'
          'SKIP'
          'SKIP'
          'SKIP'
          'SKIP')

pkgver() {
  cd likely
  # liblikely repo does not have any git tags yet
  echo r$(git rev-list --count $_branch).$(git rev-parse --short $_branch)
}

prepare() {
  cd likely

  git submodule init
  git config submodule.data.url "$srcdir/data"
  git config submodule.llvm.url "$srcdir/llvm"
  git config submodule.lua.url "$srcdir/lua"
  git config submodule.opencv.url "$srcdir/opencv"
  git config submodule.qcustomplot.url "$srcdir/qcustomplot"
  git config submodule.curl.url "$srcdir/curl"
  git submodule update

  mkdir build
}

build() {
  cd likely/build
  cmake "$srcdir/likely" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
  make
}

check() {
  cd likely/build
  make test
}

package() {
  cd likely/build
  make DESTDIR="$pkgdir" install
  rm "$pkgdir/usr/bin/benchmark" # benchmark binary is useless on a user machine
}