blob: 18d02c156707a5ce2c1d7d77ba33b9486510c35b (
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# 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=2
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'
'chrpath'
'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
# build python interface
cd "$srcdir/thundersvm/python"
# python setup.py build
}
check_thundersvm-git() {
echo "Running test for thundersvm..."
cd "$srcdir/thundersvm/build"
make runtest
}
package() {
cd "$srcdir/thundersvm/build/bin"
chrpath -d thundersvm-predict
chrpath -d thundersvm-train
install -Dm755 thundersvm-predict "$pkgdir/usr/bin/thundersvm-predict"
install -Dm755 thundersvm-train "$pkgdir/usr/bin/thundersvm-train"
cd "$srcdir/thundersvm/build/lib"
install -Dm755 libthundersvm.so "$pkgdir/usr/lib/libthundersvm.so"
cd "$srcdir/thundersvm"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
cd "$srcdir/thundersvm/python"
#python setup.py install --root="$pkgdir" --optimize=1 --skip-build
}
|