blob: f92040e060112fe34ba3511c146e2ed547e08153 (
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
|
# Maintainer: Endlesseden <eden AT rose DOT place>
pkgname=ethash-lib-git
_pkgname=ethash
pkgver=0.9.0.r3.g902f37e
pkgrel=1
pkgdesc="C/C++ implementation of Ethash – the Ethereum Proof of Work algorithm. - Git"
arch=('any')
url="https://github.com/chfast/ethash"
license=('GPL3')
makedepends=('cmake' 'perl' 'python' 'git')
provides=("$_pkgname" "$_pkgname-lib" "$_pkgname-git" "$pkgname")
conflicts=("$_pkgname" "$_pkgname-lib")
source=($_pkgname-git::"git+$url.git")
sha256sums=('SKIP')
options=(!ccache)
export cuda=0 # change this to cuda=1 if you want to build with cuda.
if [ "$cuda" -gt "0" ]; then
export cudaopts="-DCMAKE_C_COMPILER=/opt/cuda/bin/gcc -DCMAKE_CXX_COMPILER=/opt/cuda/bin/g++"
echo "Cuda Superpowers Enabled."
makedepends+=('cuda')
else
export cudaopts='-DETHASH_BUILD_TESTS=OFF'
fi
pkgver() {
cd "$srcdir/"$_pkgname-git""
git describe | sed 's,v,,g; s,-,.r,; s,-,.,g'
}
prepare () {
cd "$srcdir"/"$_pkgname-git"
git submodule update --init --recursive
}
build () {
cd "$srcdir/$_pkgname-git"
if [ -d build ]; then
rm -r build
fi
mkdir build && cd build
if [ $cuda -gt "0" ]; then
echo "Building with Cuda"
fi
cmake .. \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_INSTALL_SBINDIR="bin" \
-DETHASH_NATIVE=ON \
-DNATIVE=ON \
$cudaopts
# cmake --build .. # BUGGED!
make
}
package() {
cd "$_pkgname-git/build"
make DESTDIR=$pkgdir install
}
|