summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksandr Dubinsky2017-06-15 12:15:44 +0000
committerAleksandr Dubinsky2017-06-15 12:15:44 +0000
commit1215d4857ba47a1ec582bc653e19773132fc2e96 (patch)
tree9767d13c4b2912038394f13aafeec7fee7baa61c
downloadaur-1215d4857ba47a1ec582bc653e19773132fc2e96.tar.gz
Initial commit
-rw-r--r--.SRCINFO32
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD86
-rw-r--r--boost-no-mt-suffix.patch11
-rw-r--r--use-system-libraries.patch11
-rw-r--r--use-system-rust.patch10
6 files changed, 153 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..f8795ec32315
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,32 @@
+pkgbase = zencash
+ pkgdesc = The zencash cryptocurrency daemon and tools.
+ pkgver = 2.0.9
+ pkgrel = 2
+ url = https://zencash.io/
+ arch = x86_64
+ license = MIT
+ checkdepends = python
+ checkdepends = python2
+ checkdepends = python2-pyzmq
+ makedepends = boost
+ makedepends = cargo
+ makedepends = cmake
+ makedepends = git
+ makedepends = python
+ makedepends = wget
+ depends = boost-libs
+ depends = libevent
+ depends = miniupnpc
+ depends = zeromq
+ conflicts = zcash
+ source = git+https://github.com/ZencashOfficial/zen.git#commit=c400f0676d7c2d1facab15563982e4c812f4e6d3
+ source = boost-no-mt-suffix.patch
+ source = use-system-libraries.patch
+ source = use-system-rust.patch
+ sha256sums = SKIP
+ sha256sums = a2ac906ac99757adaa7d5eb7e68d2a64c3d628e71c03264c31edcbb500990569
+ sha256sums = ef8ab26635bb2608f03ddf991da3581060670161938171fa2e413758fa4bad3f
+ sha256sums = 065cd418ca7be72018c7fdada3012872bd079a254a95560312514594381b8028
+
+pkgname = zencash
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..6ffc53353821
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+/pkg
+/src
+/zen \ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..85d3dea2dd8a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,86 @@
+# $Id$
+# Maintainer: A Dubinsky <adubinsky@almson.net>
+# Contributor: Nicola Squartini <tensor5@gmail.com>
+
+pkgname=zencash
+pkgver=2.0.9
+_pkgname=zen
+_commit=c400f0676d7c2d1facab15563982e4c812f4e6d3
+pkgrel=2
+pkgdesc='The zencash cryptocurrency daemon and tools.'
+arch=('x86_64')
+url='https://zencash.io/'
+license=('MIT')
+conflicts=('zcash') # because of libzcashconsensus.so
+depends=('boost-libs' 'libevent' 'miniupnpc' 'zeromq')
+makedepends=('boost' 'cargo' 'cmake' 'git' 'python' 'wget')
+checkdepends=('python' 'python2' 'python2-pyzmq')
+source=("git+https://github.com/ZencashOfficial/zen.git#commit=${_commit}"
+ "boost-no-mt-suffix.patch"
+ "use-system-libraries.patch"
+ "use-system-rust.patch")
+sha256sums=('SKIP'
+ 'a2ac906ac99757adaa7d5eb7e68d2a64c3d628e71c03264c31edcbb500990569'
+ 'ef8ab26635bb2608f03ddf991da3581060670161938171fa2e413758fa4bad3f'
+ '065cd418ca7be72018c7fdada3012872bd079a254a95560312514594381b8028')
+
+prepare() {
+ cd ${_pkgname}
+
+ # Set gitattributes on src/clientversion.cpp
+ mkdir ../${pkgname}-${pkgver}
+ git archive ${_commit} | tar -xC ../${pkgname}-${pkgver}
+ cd ../${pkgname}-${pkgver}
+
+ patch -Np1 -i ../boost-no-mt-suffix.patch
+ patch -Np1 -i ../use-system-libraries.patch
+ patch -Np1 -i ../use-system-rust.patch
+}
+
+build() {
+ cd ${pkgname}-${pkgver}
+
+ cd depends
+ libs=('bdb' 'googletest' 'googlemock' 'librustzcash' 'libsnark')
+ for lib in "${libs[@]}"; do
+ make ${lib}
+ done
+ for lib in "${libs[@]}"; do
+ tar -xzf built/x86_64-unknown-linux-gnu/${lib}/${lib}-*.tar.gz \
+ -C x86_64-unknown-linux-gnu
+ done
+ cd ..
+
+ CPPFLAGS="${CPPFLAGS} -I$PWD/depends/x86_64-unknown-linux-gnu/include"
+ LDFLAGS="${LDFLAGS} -L${PWD}/depends/x86_64-unknown-linux-gnu/lib -L${PWD}/depends/x86_64-unknown-linux-gnu/lib64"
+
+ ./autogen.sh
+ ./configure --prefix=/usr
+ make
+}
+
+check() {
+ cd ${pkgname}-${pkgver}
+
+ # ./qa/zcash/full-test-suite.sh
+
+ # Run the RPC tests
+ # ./zcutil/fetch-params.sh
+ # ./qa/pull-tester/rpc-tests.sh
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+
+ make DESTDIR="${pkgdir}" install
+
+ for ext in '-cli' '-tx' 'd'; do
+ sed -i s/zcash/zen/g contrib/bitcoin${ext}.bash-completion
+ install -Dm644 contrib/bitcoin${ext}.bash-completion \
+ "${pkgdir}"/usr/share/bash-completion/completions/zen${ext}
+ done
+
+ rename zcash zen "${pkgdir}"/usr/share/man/man1/*
+
+ install -Dm644 COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/COPYING
+}
diff --git a/boost-no-mt-suffix.patch b/boost-no-mt-suffix.patch
new file mode 100644
index 000000000000..9c87ba6b98ba
--- /dev/null
+++ b/boost-no-mt-suffix.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -799,7 +799,7 @@
+ RUST_LIBS="-lrustzcash"
+ fi
+
+-LIBZCASH_LIBS="-lsnark -lgmp -lgmpxx -lboost_system-mt -lcrypto -lsodium -fopenmp $RUST_LIBS"
++LIBZCASH_LIBS="-lsnark -lgmp -lgmpxx -lboost_system -lcrypto -lsodium -fopenmp $RUST_LIBS"
+
+ CXXFLAGS_TEMP="$CXXFLAGS"
+ LIBS_TEMP="$LIBS"
diff --git a/use-system-libraries.patch b/use-system-libraries.patch
new file mode 100644
index 000000000000..507435ec2cca
--- /dev/null
+++ b/use-system-libraries.patch
@@ -0,0 +1,11 @@
+--- a/depends/packages/libsnark.mk
++++ b/depends/packages/libsnark.mk
+@@ -6,8 +6,6 @@
+ $(package)_sha256_hash=dad153fe46e2e1f33557a195cbe7d69aed8b19ed9befc08ddcb8c6d3c025941f
+ $(package)_git_commit=9ada3f84ab484c57b2247c2f41091fd6a0916573
+
+-$(package)_dependencies=libgmp libsodium
+-
+ define $(package)_build_cmds
+ CXXFLAGS="-fPIC -DBINARY_OUTPUT -DNO_PT_COMPRESSION=1" $(MAKE) lib DEPINST=$(host_prefix) CURVE=ALT_BN128 MULTICORE=1 NO_PROCPS=1 NO_GTEST=1 NO_DOCS=1 STATIC=1 NO_SUPERCOP=1 FEATUREFLAGS=-DMONTGOMERY_OUTPUT OPTFLAGS="-O2 -march=x86-64"
+ endef
diff --git a/use-system-rust.patch b/use-system-rust.patch
new file mode 100644
index 000000000000..f0ac013fef25
--- /dev/null
+++ b/use-system-rust.patch
@@ -0,0 +1,10 @@
+--- a/depends/packages/librustzcash.mk
++++ b/depends/packages/librustzcash.mk
+@@ -5,7 +5,6 @@
+ $(package)_download_file=$($(package)_git_commit).tar.gz
+ $(package)_sha256_hash=a5760a90d4a1045c8944204f29fa2a3cf2f800afee400f88bf89bbfe2cce1279
+ $(package)_git_commit=91348647a86201a9482ad4ad68398152dc3d635e
+-$(package)_dependencies=rust
+
+ define $(package)_build_cmds
+ cargo build --release