summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d64b852b5e079dbc4e0c2303d1d43d8a7dff93a8 (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
# Maintainer: Tobias Borgert <tobias.borgert@gmail.com>

pkgname=swabiancoin
_pkgname_source=SwabianCoin
pkgver=20.02.03
pkgrel=1
pkgdesc="SwabianCoin (SCN) is yet another cryptocurrency"
arch=('x86_64')
url="https://www.swabiancoin.com"
license=('GPL3')
depends=('boost' 'openssl' 'curl' 'gflags')
makedepends=('cmake' 'gtest')
source=(https://github.com/SwabianCoin/SwabianCoin/archive/v$pkgver.tar.gz
	arch-linux-compat.diff)
sha256sums=('fbd9dc4debfd5fa3d815dd8594dbe5063b87c9f9073553c310cf345597f59ea5'
            'f09b58c15426cc76ae26e5f88c01ff4b32ac2e7e1247dd06328f0b1c60e88167')

prepare() {
  cd $_pkgname_source-$pkgver
  patch --forward --strip=1 --input="../arch-linux-compat.diff"
}

build() {
	cd $_pkgname_source-$pkgver
	mkdir -p build
	cd build
	cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
		 -DCMAKE_BUILD_TYPE=Release \
		 -DBUILD_UNIT_TESTS=ON
	make
}

check() {
    cd $_pkgname_source-$pkgver/build
    ./runTests
}

package() {
	cd $_pkgname_source-$pkgver/build
	DESTDIR="$pkgdir" make install
	mv "$pkgdir/usr/bin/full_node_cli" "$pkgdir/usr/bin/scn_full_node_cli"
	mv "$srcdir/$_pkgname_source-$pkgver/build/runTests" "$pkgdir/usr/bin/scn_run_tests"
	rm -rf "$pkgdir/usr/include" "$pkgdir/usr/lib" "$pkgdir/usr/share" 
}