summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0be8a5c9efa1153dc058d486e61b6e5bec8b44d0 (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
# Maintainer: slava.ganzin <slava.ganzin@gmail.com>
pkgname=deepdetect-git
pkgver=r544.c8556f0
pkgrel=1
arch=('i686' 'x86_64')
pkgdesc="Open Source + Deep Learning + API + Server"
url="http://www.deepdetect.com/"
license=('GPL')
depends=(
'eigen'
'google-glog'
'gflags'
'opencv'
'cpp-netlib'
'boost'
'curl'
'libcurlpp'
'utf8cpp'
'openblas-lapack'
'protobuf'
'hdf5'
'leveldb'
'snappy'
'lmdb'
'python'
)
makedepends=('git' 'gcc' 'make' 'cmake')
optdepends=('cuda: GPL processing')
provides=()
source=("$pkgname::git+https://github.com/beniz/deepdetect.git")
md5sums=('SKIP')
install=$pkgname.install


pkgver() {
  cd "$srcdir/$pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  sed -i s/find.*Eigen.*// $pkgname/CMakeLists.txt
  mkdir $srcdir/$pkgname/build
  cd $srcdir/$pkgname/build
  cmake .. -DEIGEN3_INCLUDE_DIR=/usr/include/eigen3
  make
  # -j $((`nproc` -1))
  for f in `find $srcdir -name "*.py"`; do
    sed -i s/env\ python$/env\ python2/ $f;
  done
}

package() {
  mkdir  $pkgdir/usr/{lib,share,bin}/$pkgname -p
  install -Dm755 $srcdir/$pkgname/build/main/dede $pkgdir/usr/bin/dede
  install -Dm755 $srcdir/$pkgname/build/caffe_dd/src/caffe_dd/build/lib/* $pkgdir/usr/lib
  cp -r  $srcdir/$pkgname $pkgdir/usr/share
}