summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 03ca850ce52c074ef247326247cf5402471695e9 (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
# Maintainer: Dominik Wetzel <dimonok at web dot de>

pkgname=clblast-git
_gitname=CLBlast
pkgver=1.6.1.5.gbcd294a9
pkgrel=2
pkgdesc="Tuned OpenCL BLAS library (works with OpenCL 1.1)"
arch=('i686' 'x86_64')
url="https://github.com/CNugteren/CLBlast"
license=('Apache')
depends=("opencl-headers" "ocl-icd")
makedepends=('git' 'cmake')
provides=("clblast")
conflicts=("clblast")
source=("git+https://github.com/CNugteren/${_gitname}.git")
md5sums=('SKIP')

pkgver() {
  cd ${_gitname}
  git describe --always --tags | sed -e 's/-/./g' -e 's/v//g'
}

prepare() {
  cd ${_gitname}
  rm -rf _build
  mkdir _build
  cd _build
  cmake .. -DCMAKE_BUILD_TYPE=Release "-DCMAKE_INSTALL_PREFIX=${pkgdir}/usr" "-DNETLIB=ON"
}

build() {
  cd ${_gitname}
  cmake --build ./_build
}

#package() {
#  cd ${_gitname}/_build
#  make install
#}

package() {
  cd ${_gitname}
  cmake --install _build
  #mv "${pkgdir}/usr/lib64" "${pkgdir}/usr/lib"
  sed -i "/^prefix=/c\prefix=/usr" "${pkgdir}/usr/lib/pkgconfig/clblast.pc"
#  mkdir "${pkgdir}/usr/include/${_gitname}/"
#  mv -t "${pkgdir}/usr/include/${_gitname}/" "${pkgdir}"/usr/include/*.h
}