From 058156b84b41ad26c4840681dcd2e26d0ab7665c Mon Sep 17 00:00:00 2001 From: David Dawes Date: Sun, 24 Jun 2018 13:25:27 -0700 Subject: [PATCH] Build verus-cli, get dependencies nailed down. (#72) * Build verus-cli, get dependencies nailed down. * Fiddling about with scripts. * Clean READMEs up a bit. --- Makefile.am | 8 ++++---- README-mac.md | 7 +++---- README.md | 4 ++-- configure.ac | 14 +++++++------- kmd/linux/verus-cli/verus | 7 +------ kmd/linux/verus-cli/verusd | 7 +------ src/verus | 2 ++ src/verusd | 4 ++-- zcutil/build-debian-package.sh | 28 ++++++++++++++++++---------- 9 files changed, 40 insertions(+), 41 deletions(-) create mode 100755 src/verus diff --git a/Makefile.am b/Makefile.am index d3171b206..ccd884dd3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,14 +13,14 @@ pkgconfig_DATA = libzcashconsensus.pc endif -BITCOIND_BIN=$(top_builddir)/src/zcashd$(EXEEXT) -BITCOIN_CLI_BIN=$(top_builddir)/src/zcash-cli$(EXEEXT) +BITCOIND_BIN=$(top_builddir)/src/komodod$(EXEEXT) +BITCOIN_CLI_BIN=$(top_builddir)/src/komodo-cli$(EXEEXT) #WALLET_UTILITY_BIN=$(top_builddir)/src/wallet-utility$(EXEEXT) BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT) if TARGET_DARWIN -OSX_APP=Bitcoin-Qt.app -OSX_DMG=Bitcoin-Core.dmg +OSX_APP=Agama.app +OSX_DMG=Agama.dmg OSX_BACKGROUND_IMAGE=background.tiff OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist diff --git a/README-mac.md b/README-mac.md index a7748d81c..1e55bff5a 100644 --- a/README-mac.md +++ b/README-mac.md @@ -15,13 +15,12 @@ brew bundle Get all that installed, then run: ```shell -git clone https://github.com/j-cimb-barker/komodo.git -cd komodo -git checkout dev +git clone https://github.com/VerusCoin/VerusCoin.git +cd VerusCoin ./zcutil/build-mac.sh ``` -To build a distributable version of komodo then run the makeDistrib.sh script after building. +To build a distributable version of VerusCoin then run the makeReleaseMac.sh script after building. This will fix the dependency references and move the komodod and komodo-cli binaries to the kmd/mac/verus-cli directory along with the 6 libraries required for it to work properly. When you are done building, you need to do a few things in the [Configuration](https://github.com/zcash/zcash/wiki/1.0-User-Guide#configuration) section of the Zcash User Guide differently because we are on the Mac. All instances of `~/.zcash` need to be replaced by `~/Library/Application\ Support/Zcash` The fetch-params.sh script, however, has already been altered to fetch the proving keys into the correct directory to conform to Mac specific naming conventions. diff --git a/README.md b/README.md index 466588ecf..812697f52 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -## VerusCoin version 0.3.7-beta -VerusCoin is a new, mineable and stakeable cryptocurrency. It is a live fork of Komodo that retains its Zcash lineage and improves it. VerusCoin will leverage the Komodo platform and dPoW notarization for enhanced security and cross-chain interoperability. We have added a variation of a zawy12, lwma difficulty algorithm, a new CPU-optimized hash algorithm and a new algorithm for fair proof of stake. We plan to describe these changes and vision going forward in an upcoming white paper. +## VerusCoin version 0.3.8-beta +VerusCoin is a new, mineable and stakeable cryptocurrency. It is a live fork of Komodo that retains its Zcash lineage and improves it. VerusCoin will leverage the Komodo platform and dPoW notarization for enhanced security and cross-chain interoperability. We have added a variation of a zawy12, lwma difficulty algorithm, a new CPU-optimized hash algorithm and a new algorithm for fair proof of stake. We describe these changes and vision going forward in a [our Phase I white paper](http://185.25.51.16/papers/VerusPhaseI.pdf) and [our Vision](http://185.25.51.16/papers/VerusVision.pdf). - [VerusCoin web site https://veruscoin.io/ Wallets and CLI tools](https://veruscoin.io/) - [VerusCoin Explorer](https://explorer.veruscoin.io/) diff --git a/configure.ac b/configure.ac index 7de40ff26..eda8fa433 100644 --- a/configure.ac +++ b/configure.ac @@ -7,16 +7,16 @@ define(_CLIENT_VERSION_BUILD, 50) define(_ZC_BUILD_VAL, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD), m4_eval(_CLIENT_VERSION_BUILD < 50), 1, m4_eval(_CLIENT_VERSION_BUILD - 24), m4_eval(_CLIENT_VERSION_BUILD == 50), 1, , m4_eval(_CLIENT_VERSION_BUILD - 50))) define(_CLIENT_VERSION_SUFFIX, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, _CLIENT_VERSION_REVISION-beta$1, m4_eval(_CLIENT_VERSION_BUILD < 50), 1, _CLIENT_VERSION_REVISION-rc$1, m4_eval(_CLIENT_VERSION_BUILD == 50), 1, _CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION-$1))) define(_CLIENT_VERSION_IS_RELEASE, true) -define(_COPYRIGHT_YEAR, 2017) -AC_INIT([Zcash],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_SUFFIX(_ZC_BUILD_VAL)],[https://github.com/zcash/zcash/issues],[zcash]) +define(_COPYRIGHT_YEAR, 2018) +AC_INIT([Verus-CLI],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_SUFFIX(_ZC_BUILD_VAL)],[https://github.com/VerusCoin/VerusCoin/issues],[verus-cli]) AC_CONFIG_SRCDIR([src/main.cpp]) AC_CONFIG_HEADERS([src/config/bitcoin-config.h]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([build-aux/m4]) -BITCOIN_DAEMON_NAME=zcashd -BITCOIN_CLI_NAME=zcash-cli -BITCOIN_TX_NAME=zcash-tx +BITCOIN_DAEMON_NAME=komodod +BITCOIN_CLI_NAME=komodo-cli +BITCOIN_TX_NAME=komodo-tx dnl Unless the user specified ARFLAGS, force it to be cr AC_ARG_VAR(ARFLAGS, [Flags for the archiver, defaults to if not set]) @@ -232,7 +232,7 @@ CPPFLAGS="$CPPFLAGS -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS" AC_ARG_WITH([utils], [AS_HELP_STRING([--with-utils], - [build zcash-cli zcash-tx wallet-utility (default=yes)])], + [build komodo-cli komodo-tx wallet-utility (default=yes)])], [build_bitcoin_utils=$withval], [build_bitcoin_utils=yes]) @@ -805,7 +805,7 @@ AC_MSG_CHECKING([whether to build bitcoind]) AM_CONDITIONAL([BUILD_BITCOIND], [test x$build_bitcoind = xyes]) AC_MSG_RESULT($build_bitcoind) -AC_MSG_CHECKING([whether to build utils (zcash-cli zcash-tx wallet-utility)]) +AC_MSG_CHECKING([whether to build utils (komodo-cli komodo-tx wallet-utility)]) AM_CONDITIONAL([BUILD_BITCOIN_UTILS], [test x$build_bitcoin_utils = xyes]) AC_MSG_RESULT($build_bitcoin_utils) diff --git a/kmd/linux/verus-cli/verus b/kmd/linux/verus-cli/verus index 67f0e9334..8f6f56892 100755 --- a/kmd/linux/verus-cli/verus +++ b/kmd/linux/verus-cli/verus @@ -1,7 +1,2 @@ #!/bin/bash - -#set working directory to the location of this script -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -cd $DIR - -./komodo-cli -ac_name=VRSC "$@" +komodo-cli -ac_name=VRSC "$@" diff --git a/kmd/linux/verus-cli/verusd b/kmd/linux/verus-cli/verusd index 11b4d57fb..7863a1e0f 100755 --- a/kmd/linux/verus-cli/verusd +++ b/kmd/linux/verus-cli/verusd @@ -1,7 +1,2 @@ #!/bin/bash - -#set working directory to the location of this script -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -cd $DIR - -./komodod -ac_name=VRSC -ac_algo=verushash -ac_cc=1 -ac_supply=0 -ac_eras=3 -ac_reward=0,38400000000,2400000000 -ac_halving=1,43200,1051920 -ac_decay=100000000,0,0 -ac_end=10080,226080,0 -addnode=185.25.48.236 -addnode=185.64.105.111 -ac_timelockgte=19200000000 -ac_timeunlockfrom=129600 -ac_timeunlockto=1180800 -ac_veruspos=50 -gen -genproclimit=0 "$@" +komodod -ac_name=VRSC -ac_algo=verushash -ac_cc=1 -ac_supply=0 -ac_eras=3 -ac_reward=0,38400000000,2400000000 -ac_halving=1,43200,1051920 -ac_decay=100000000,0,0 -ac_end=10080,226080,0 -addnode=185.25.48.236 -addnode=185.64.105.111 -ac_timelockgte=19200000000 -ac_timeunlockfrom=129600 -ac_timeunlockto=1180800 -ac_veruspos=50 -gen -genproclimit=0 "$@" diff --git a/src/verus b/src/verus new file mode 100755 index 000000000..8f6f56892 --- /dev/null +++ b/src/verus @@ -0,0 +1,2 @@ +#!/bin/bash +komodo-cli -ac_name=VRSC "$@" diff --git a/src/verusd b/src/verusd index 7ec4f6246..25def9f4f 100755 --- a/src/verusd +++ b/src/verusd @@ -1,2 +1,2 @@ -./komodod -ac_name=VRSC -ac_algo=verushash -ac_cc=1 -ac_veruspos=50 -ac_supply=0 -ac_eras=3 -ac_reward=0,38400000000,2400000000 -ac_halving=1,43200,1051920 -ac_decay=100000000,0,0 -ac_end=10080,226080,0 -ac_timelockgte=19200000000 -ac_timeunlockfrom=129600 -ac_timeunlockto=1180800 -addnode=185.25.48.72 -addnode=185.25.48.236 -addnode=185.64.105.111 "$@" - +#!/bin/bash +komodod -ac_name=VRSC -ac_algo=verushash -ac_cc=1 -ac_supply=0 -ac_eras=3 -ac_reward=0,38400000000,2400000000 -ac_halving=1,43200,1051920 -ac_decay=100000000,0,0 -ac_end=10080,226080,0 -addnode=185.25.48.72 -addnode=185.25.48.236 -addnode=185.64.105.111 -ac_timelockgte=19200000000 -ac_timeunlockfrom=129600 -ac_timeunlockto=1180800 -ac_veruspos=50 -gen -genproclimit=0 "$@" diff --git a/zcutil/build-debian-package.sh b/zcutil/build-debian-package.sh index 870530083..ea3bccc17 100755 --- a/zcutil/build-debian-package.sh +++ b/zcutil/build-debian-package.sh @@ -5,8 +5,8 @@ set -e set -x -BUILD_PATH="/tmp/zcbuild" -PACKAGE_NAME="zcash" +BUILD_PATH="/tmp/verus-cli" +PACKAGE_NAME="verus-cli" SRC_PATH=`pwd` SRC_DEB=$SRC_PATH/contrib/debian SRC_DOC=$SRC_PATH/doc @@ -17,7 +17,11 @@ if [ ! -d $BUILD_PATH ]; then mkdir $BUILD_PATH fi -PACKAGE_VERSION=$($SRC_PATH/src/zcashd --version | grep version | cut -d' ' -f4 | tr -d v) +## PACKAGE_VERSION=$($SRC_PATH/src/zcashd --version | grep version | cut -d' ' -f4 | tr -d v) +## Need version setting from environment +PACKAGE_VERSION=0.3.7-beta +## +## Also, what does the sed end up doing? DEBVERSION=$(echo $PACKAGE_VERSION | sed 's/-beta/~beta/' | sed 's/-rc/~rc/' | sed 's/-/+/') BUILD_DIR="$BUILD_PATH/$PACKAGE_NAME-$PACKAGE_VERSION-amd64" @@ -38,8 +42,12 @@ chmod 0755 -R $BUILD_DIR/* #cp $SRC_DEB/preinst $BUILD_DIR/DEBIAN #cp $SRC_DEB/prerm $BUILD_DIR/DEBIAN # Copy binaries -cp $SRC_PATH/src/zcashd $DEB_BIN -cp $SRC_PATH/src/zcash-cli $DEB_BIN +cp $SRC_PATH/src/komodod $DEB_BIN +strip $DEB_BIN/komodod +cp $SRC_PATH/src/verusd $DEB_BIN +cp $SRC_PATH/src/komodo-cli $DEB_BIN +strip $DEB_BIN/komodo-cli +cp $SRC_PATH/src/verus $DEB_BIN cp $SRC_PATH/zcutil/fetch-params.sh $DEB_BIN/zcash-fetch-params # Copy docs cp $SRC_PATH/doc/release-notes/release-notes-1.0.0.md $DEB_DOC/changelog @@ -47,8 +55,8 @@ cp $SRC_DEB/changelog $DEB_DOC/changelog.Debian cp $SRC_DEB/copyright $DEB_DOC cp -r $SRC_DEB/examples $DEB_DOC # Copy manpages -cp $SRC_DOC/man/zcashd.1 $DEB_MAN -cp $SRC_DOC/man/zcash-cli.1 $DEB_MAN +cp $SRC_DOC/man/komodod.1 $DEB_MAN +cp $SRC_DOC/man/komodo-cli.1 $DEB_MAN cp $SRC_DOC/man/zcash-fetch-params.1 $DEB_MAN # Copy bash completion files cp $SRC_PATH/contrib/zcashd.bash-completion $DEB_CMP/zcashd @@ -56,14 +64,14 @@ cp $SRC_PATH/contrib/zcash-cli.bash-completion $DEB_CMP/zcash-cli # Gzip files gzip --best -n $DEB_DOC/changelog gzip --best -n $DEB_DOC/changelog.Debian -gzip --best -n $DEB_MAN/zcashd.1 -gzip --best -n $DEB_MAN/zcash-cli.1 +gzip --best -n $DEB_MAN/komodod.1 +gzip --best -n $DEB_MAN/komodo-cli.1 gzip --best -n $DEB_MAN/zcash-fetch-params.1 cd $SRC_PATH/contrib # Create the control file -dpkg-shlibdeps $DEB_BIN/zcashd $DEB_BIN/zcash-cli +dpkg-shlibdeps $DEB_BIN/komodod $DEB_BIN/komodo-cli dpkg-gencontrol -P$BUILD_DIR -v$DEBVERSION # Create the Debian package