summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b06fa920fc47cd71e745a7edefefaeef158662cc (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: Rowan Decker <rdecker@scu.edu>
# Contributor: Eric Toombs <ee double you toombs at you waterloo dot see eh?>
# Contributor: Afri 5chdn <aur@cach.co>
# Contributor: Andy Weidenbaum <archbaum@gmail.com>

pkgname=ethminer-git
pkgver=0.14.0.1.20180216.07f5d714e
pkgrel=1
pkgdesc="Ethereum miner with CUDA and stratum support. chfast's version."
arch=('i686' 'x86_64')
makedepends=(
  'gcc6'
  'cmake'
  'git'
  'opencl-headers'
)
optdepends=(
  'solidity: The Solidity Contract-Oriented Programming Language'
)
groups=('ethereum')
url="https://github.com/ethereum-mining/ethminer"
license=('GPL')
source=(
  "$pkgname::git+https://github.com/ethereum-mining/ethminer"
)
sha256sums=(
  "SKIP"
)
provides=(
  'ethminer'
)
conflicts=(
  'ethminer'
  'ethereum'
  'ethereum-git'
  'cpp-ethereum'
)

pkgver() {
  cd "$pkgname"
  echo "`grep -m1 "PROJECT_VERSION" CMakeLists.txt | tr -cd '[[:digit:]].'`.`date +%Y%m%d`.`git log --pretty=format:%h -n 1`"
}

build() {
  msg 'Updating...'
  cd "$pkgname"
  git submodule update --init --recursive

  msg 'Building...'
  mkdir -p build && pushd build
  unset CFLAGS #march=native can break the build if set in makepkg.conf
  unset CXXFLAGS
  cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DETHASHCUDA=ON \
      -DCMAKE_C_COMPILER=/usr/bin/gcc-6 \
      -DCMAKE_CXX_COMPILER=/usr/bin/g++-6 \
      -DCMAKE_RANLIB=/usr/bin/gcc-ranlib-6 \
      -DCMAKE_AR=/usr/bin/gcc-ar-6
  cmake --build .
  popd
}

package() {
  cd "${pkgname}/build"

  msg 'Installing...'
  DESTDIR="${pkgdir}" make install
}