summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorfelics2018-06-13 12:06:17 +0200
committerfelics2018-06-13 12:06:17 +0200
commitc501a41018e6ac8bdd4ceb858911634833e49c45 (patch)
treee8778907070ca2df0a2135416f362c92c5342321
downloadaur-c501a41018e6ac8bdd4ceb858911634833e49c45.tar.gz
Initial Commit
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD63
-rw-r--r--license.txt21
3 files changed, 106 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..aac275c68d9a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = nyu-hpc-opencl-demo-git
+ pkgdesc = OpenCL demo and OpenCL print devices from the NYU HPC lecture.
+ pkgver = 20150501+6cf0f31
+ pkgrel = 1
+ epoch = 0
+ url = https://github.com/hpc12/tools/
+ arch = i386
+ arch = i686
+ arch = x86_64
+ license = custom
+ makedepends = git
+ depends = opencl-icd-loader
+ provides = nyu-hpc-opencl-demo=20150501+6cf0f31
+ provides = cl-demo
+ conflicts = nyu-hpc-opencl-demo
+ source = nyu-hpc-opencl-demo::git+git://github.com/hpc12/tools/
+ source = license.txt
+ sha256sums = SKIP
+ sha256sums = 67586be98c23bf64f949659d889ee74d04b7cc3c3c2e172ffaf9b65bb6d7ee53
+
+pkgname = nyu-hpc-opencl-demo-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..9985a24ecd7e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,63 @@
+# Maintainer: dreieck
+
+_pkgname=nyu-hpc-opencl-demo
+pkgname="${_pkgname}-git"
+epoch=0
+pkgver=20150501+6cf0f31
+pkgrel=1
+pkgdesc="OpenCL demo and OpenCL print devices from the NYU HPC lecture."
+arch=('i386' 'i686' 'x86_64')
+url="https://github.com/hpc12/tools/"
+license=('custom')
+depends=(
+ 'opencl-icd-loader'
+)
+makedepends=('git')
+optdepends=()
+provides=(
+ "${_pkgname}=${pkgver}"
+ "cl-demo"
+)
+conflicts=("${_pkgname}")
+source=(
+ "${_pkgname}::git+git://github.com/hpc12/tools/"
+ 'license.txt'
+)
+sha256sums=(
+ 'SKIP'
+ '67586be98c23bf64f949659d889ee74d04b7cc3c3c2e172ffaf9b65bb6d7ee53'
+)
+
+pkgver() {
+ cd "${srcdir}/${_pkgname}"
+ _date_rev="$(git log -n1 --format=tformat:'%cI+%h' | sed 's|T[^+]*||' | tr -d '-')"
+ if [ -z "${_date_rev}" ]; then
+ {
+ echo "error: pkgver() could not retrieve version or revision. Please check."
+ echo "Aborting."
+ } > /dev/stderr
+ return 1
+ fi
+ echo "${_date_rev}"
+}
+
+prepare() {
+ # Upstream might have compiled binaries already included. Remove in that case.
+ cd "${srcdir}/${_pkgname}"
+ rm -f cl-demo print-devices
+}
+
+build() {
+ cd "${srcdir}/${_pkgname}"
+ OPENCL_INC=/usr/include/ocl_icd.h OPENCL_LIB=/usr/lib/libOpenCL.so make
+}
+
+package() {
+ cd "${srcdir}/${_pkgname}"
+
+ for _executable in cl-demo print-devices; do
+ install -Dvm755 "${_executable}" "${pkgdir}/usr/bin/${_executable}"
+ done
+
+ install -Dvm644 "${srcdir}/license.txt" "${pkgdir}/usr/share/licenses/${pkgname}/lincense.txt"
+}
diff --git a/license.txt b/license.txt
new file mode 100644
index 000000000000..929d87737df7
--- /dev/null
+++ b/license.txt
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2010 Andreas Kloeckner
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */