summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 077aaf9f40a3d081a8aedb33b1e8356caaa0ad67 (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
# Maintainer: Endlesseden <eden AT rose DOT place>

pkgname=ethash-lib
_pkgname=ethash
pkgver=r506.e4a15c3
pkgrel=1
pkgdesc="C/C++ implementation of Ethash – the Ethereum Proof of Work algorithm"
arch=('any')
url="https://github.com/chfast/ethash"
license=('GPL3')
makedepends=('cmake' 'gcc' 'perl' 'python' 'git')
provides=("$_pkgname")
conflicts=("$_pkgname")
source=($_pkgname::"git+${url}.git")
sha256sums=('SKIP')
options=(!ccache)

pkgver() {
        cd "$srcdir/${_pkgname}"
        printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build () {
  cd "$srcdir/${_pkgname}"
  git submodule update --init --recursive

  if [ -d build ]; then
  rm -r build
  fi
  mkdir build && cd build
  
  cmake \
  -DCMAKE_INSTALL_PREFIX="/usr" \
  -DCMAKE_INSTALL_SBINDIR="bin" \
  -DETHASH_NATIVE=ON \
  -DNATIVE=ON ..
  cmake --build ..
}

package() {
  cd "$_pkgname/build"
  make DESTDIR=$pkgdir install
}