summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorDarcy Hu2018-10-05 10:37:54 +0800
committerDarcy Hu2018-10-05 10:37:54 +0800
commit8f4379531c80c7aa45aac0d897dcb99e5556a60b (patch)
tree752fde13bf252b2bb5b1a9fffb67937ef2345e7b /PKGBUILD
downloadaur-8f4379531c80c7aa45aac0d897dcb99e5556a60b.tar.gz
Create package
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD57
1 files changed, 57 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..47ed00da1eb
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,57 @@
+# Maintainer: Darcy Hu <hot123tea123@gmail.com>
+
+# ThunderSVM without python, R, or MATLAB interface
+# python package not working, not sure how to package R package and MATLAB toolbox
+
+pkgname=thundersvm-git
+pkgver=r779.5f66a3e
+pkgrel=1
+pkgdesc="A fast SVM library on GPUs and CPUs"
+arch=('x86_64')
+url="https://github.com/Xtra-Computing/thundersvm"
+license=('APL')
+depends=('cuda')
+makedepends=('git'
+ 'cmake'
+ 'eigen'
+ 'cuda'
+ 'gtest'
+ 'gcc7')
+provides=("thundersvm")
+conflicts=("thundersvm")
+source=('thundersvm::git+https://github.com/hubutui/thundersvm.git')
+noextract=()
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/thundersvm"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ rm -rf "$srcdir/thundersvm/build"
+ mkdir "$srcdir/thundersvm/build"
+ cd "$srcdir/thundersvm/build"
+ # change -DUSE_CUDA to OFF if not build with GPU support
+ cmake -DCMAKE_C_COMPILER=gcc-7 \
+ -DCMAKE_CXX_COMPILER=g++-7 \
+ -DUSE_CUDA=ON \
+ -DUSE_EIGEN=ON \
+ -DBUILD_TESTS=ON ..
+ make
+}
+
+check_thundersvm-git() {
+ echo "Running test for thundersvm..."
+ cd "$srcdir/thundersvm/build"
+ make runtest
+}
+
+package() {
+ cd "$srcdir/thundersvm/build/bin"
+ install -Dm755 thundersvm-predict "$pkgdir/usr/bin/thundersvm-predict"
+ install -Dm755 thundersvm-train "$pkgdir/usr/bin/thundersvm-train"
+ cd "$srcdir/thundersvm"
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+