summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 66e7380b2b75bb9a593a20e00760e98e0a53ff97 (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
pkgname=raiblocks-git
pkgver=9.0.r11.gc55c1bc9
pkgrel=2
pkgdesc="RaiBlocks is a cryptocurrency designed from the ground up for scalable instant transactions and zero transaction fees."
arch=('i686' 'x86_64')
url="http://raiblocks.com/"
license=('BSD 2-clause')
depends=('qt5-base'  'boost' 'boost-libs')
provides=(raiblocks)
pkgver() {
  cd "raiblocks"
  git describe --long --tags | sed 's/^[vV]//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

source=(raiblocks.desktop
        raiblocks128.png
        git+https://github.com/clemahieu/raiblocks.git
	git+https://github.com/boostorg/beast.git
        git+https://github.com/weidai11/cryptopp.git
        git+https://github.com/LMDB/lmdb.git
        git+https://github.com/miniupnp/miniupnp.git
        git+https://github.com/clemahieu/phc-winner-argon2.git)
md5sums=('2a43d03fef957acdff063c3890c71552'
         'cc6dea992d6be78427c2bab5640eaef0'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP')

prepare() {
  cd "$srcdir/raiblocks"

  git submodule init

  git config submodule.beast.url $srcdir/beast
  git config submodule.cryptopp.url $srcdir/cryptopp
  git config submodule.lmdb.url $srcdir/lmdb
  git config submodule.miniupnp.url $srcdir/miniupnp
  git config submodule.phc-winner-argon2.url $srcdir/phc-winner-argon2
  git submodule sync lmdb
  git submodule update

  if grep avx2 /proc/cpuinfo; then
    echo "build with AVX2 optimizations"
    cmake -D RAIBLOCKS_GUI=ON -D ENABLE_AVX2=ON -D PERMUTE_WITH_GATHER=ON -D PERMUTE_WITH_SHUFFLES=ON ./
  else
    echo "build without AVX2 optimizations"
    cmake -D RAIBLOCKS_GUI=ON ./
  fi
}

build() {
  cd "$srcdir/raiblocks"
  make rai_wallet
  make rai_node  
}

package() {
  cd "$srcdir/raiblocks"

  install -Dm755 rai_wallet "$pkgdir"/usr/bin/rai_wallet
  install -Dm755 rai_node "$pkgdir"/usr/bin/rai_node
  install -Dm644 librai_lib.so "$pkgdir"/usr/lib/librai_lib.so

  install -Dm644 "$srcdir"/raiblocks128.png "$pkgdir"/usr/share/pixmaps/raiblocks128.png
  install -Dm644 "$srcdir"/raiblocks.desktop "$pkgdir"/usr/share/applications/raiblocks.desktop
}

# vim:set ts=2 sw=2 et: