summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 88b77f0f7de56fe337d8277d8917b6f13716b7ac (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
# Maintainer:  rubenvb <vanboxem.ruben@gmail.com>

pkgname=clfft-git
pkgver=2.12.2.r0.gce107c4
pkgrel=1
pkgdesc="A software library containing FFT functions written in OpenCL (git)"
arch=("i686" "x86_64")
url="https://github.com/clMathLibraries/clFFT"
license=('APACHE')
depends=('ocl-icd')
makedepends=('opencl-headers' 'cmake')

source=("git+https://github.com/clMathLibraries/clFFT.git")
md5sums=(SKIP)

if [ "$CARCH" == "x86_64" ]; then
_bits=64
elif [ "$CARCH" == "i686" ]; then
_bits=32
fi

pkgver() {
  cd "clFFT"
  # cutting off 'foo-' prefix that presents in the git tag
  git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  mkdir -p "${srcdir}/build"
  cd "${srcdir}/build"
  cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr "../clFFT/src"
  make
}

check() {
  cd "${srcdir}/build"
#  ./staging/Test
}

package() {
  cd "${srcdir}/build"
  make install DESTDIR=${pkgdir}
  rm -rf "${pkgdir}/usr/bin"
  mv "${pkgdir}/usr/lib${_bits}" "${pkgdir}/usr/lib"
  rm "${pkgdir}/usr/lib/libStatTimer.so"
}