summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 69b0b08cefe08079b1ef786810b47218ced7557d (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
# Maintainer: mnovick1988 <anonymous>
# Contributor: Giovanni Condello <condellog@gmail.com>
# Contributor: Lukas Jirkovsky <l.jirkovsky@gmail.com>
# Contributor: St├ęphane Gaudreault <stephane@archlinux.org>
# Contributor: Sylvain HENRY <hsyl20@yahoo.fr>

pkgname=opencl-headers-svn
pkgver=2.1.r32373
pkgrel=1
epoch=1
pkgdesc='OpenCL 2.1 (Open Computing Language) header files (svn version)'
arch=('any')
url='http://www.khronos.org/registry/cl/'
license=('custom')
makedepends=('subversion')
optdepends=('libcl: OpenCL library')
provides=('opencl-headers')
conflicts=('opencl-headers')
source=("$pkgname::svn+https://cvs.khronos.org/svn/repos/registry/trunk/public/cl/api/2.1/")
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/$pkgname"
  local ver="$(svnversion)"
  printf "2.1.r%s" "${ver//[[:alpha:]]}"
}

package() {
  cd "$srcdir/$pkgname"

  install -d -m 755 "$pkgdir"/usr/include/CL

  for h in $(ls -1 *.h *.hpp); do
     install -m 644 $h "$pkgdir"/usr/include/CL/
  done

  # extract the license from cl.h
  install -d -m 755 "$pkgdir"/usr/share/licenses/$pkgname
  sed '/#ifndef __OPENCL_CL_H/,$ d' cl.h > "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}