summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 429c28f2a9816e2e9ed1bedd90fcba842b988e1f (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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Maintainer: Afri 5chdn <aur@cach.co>
# Contributor: Andy Weidenbaum <archbaum@gmail.com>

pkgname=ethereum-git
pkgver=1.3.0.20170725.b18e9e4ce
pkgrel=1
pkgdesc="The Cpp-Ethereum platform (C++ toolkit, cpp-ethereum including ethminer and eth, latest unstable git version)"
arch=('i686' 'x86_64')
depends=(
  'boost'
  'crypto++'
  'leveldb'
  'ocl-icd'
  'libmicrohttpd'
  'miniupnpc'
  'opencl-headers'
  'libjson-rpc-cpp-git'
)
makedepends=(
  'autoconf'
  'automake'
  'gcc'
  'libtool'
  'cmake'
  'git'
)
optdepends=(
  'solidity: The Solidity Contract-Oriented Programming Language'
)
groups=('ethereum')
url="https://github.com/ethereum/cpp-ethereum"
license=('GPL')
source=(
  "${pkgname%-git}::git+https://github.com/ethereum/cpp-ethereum#branch=develop"
)
sha256sums=(
  "SKIP"
)
provides=(
  'bench'
  'eth'
  'ethkey'
  'ethminer'
  'ethvm'
  'rlp'
)
conflicts=(
  'ethereum'
  'cpp-ethereum'
)
optdepends=(
  'geth: The go-ethereum commandline client (geth cli).'
  'parity: The fast, light, robust Ethereum client.'
)

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

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

  msg 'Building...'
  mkdir -p build && pushd build
  cmake .. -DCMAKE_INSTALL_PREFIX=/usr
  make
  popd
}

package() {
  cd ${pkgname%-git}

  msg 'Installing...'
  make DESTDIR="$pkgdir" install -C build

  msg 'Cleaning up pkgdir...'
  find "$pkgdir" -type d -name .git -exec rm -r '{}' +
  find "$pkgdir" -type f -name .gitignore -exec rm -r '{}' +
}