export CANNREF=master
export DEST_DIR=~/.canncoin
export CANN_BUILD_LOC=~/cann-build
# init env
mkdir -p $CANN_BUILD_LOC
pushd $CANN_BUILD_LOC
mkdir -p canncoin-deps
pushd canncoin-deps
mkdir -p lib
export CANN_DEPS_LOC=$CANN_BUILD_LOC/canncoin-deps
export CANN_STAGE_LOC=$CANN_DEPS_LOC/staging
mkdir -p $DEST_DIR
mkdir -p $DEST_DIR/lib
# openssl
wget '
https://www.openssl.org/source/openssl-1.0.1h.tar.gz'
echo "9d1c8a9836aa63e2c6adb684186cbd4371c9e9dcc01d6e3bb447abf2d4d3d093 openssl-1.0.1h.tar.gz" | sha256sum -c
tar xzf openssl-1.0.1h.tar.gz
pushd openssl-1.0.1h
./config no-shared no-zlib no-dso no-krb5 --openssldir=$CANN_STAGE_LOC -fPIC
make
make install_sw
popd
# boost
wget '
https://downloads.sourceforge.net/project/boost/boost/1.55.0/boost_1_55_0.tar.bz2'
echo "fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52 boost_1_55_0.tar.bz2" | sha256sum -c
tar --warning=no-timestamp -xjf boost_1_55_0.tar.bz2
pushd boost_1_55_0
./bootstrap.sh --without-icu
./bjam toolset=gcc threadapi=pthread threading=multi variant=release link=static runtime-link=shared --without-mpi --without-python -sNO_BZIP2=1 --layout=tagged --build-type=complete --prefix="$CANN_STAGE_LOC" $MAKEOPTS -d+2 install
popd
# berkeley db
wget '
http://download.oracle.com/berkeley-db/db-5.1.29.NC.tar.gz'
echo "08238e59736d1aacdd47cfb8e68684c695516c37f4fbe1b8267dde58dc3a576c db-5.1.29.NC.tar.gz" | sha256sum -c
tar xzf db-5.1.29.NC.tar.gz
pushd db-5.1.29.NC/build_unix
../dist/configure --prefix="$CANN_STAGE_LOC" --enable-cxx --disable-shared --with-pic
make $MAKEOPTS library_build
make install_lib install_include
popd
# copy libs to dest dirs
cp -r $CANN_STAGE_LOC/lib/*.a $CANN_STAGE_LOC/lib/pkgconfig $DEST_DIR/lib/
popd
# canncoin
git clone
https://github.com/cannabiscoindev/cannabiscoin420pushd canncoin
git checkout $CANNREF
---------------------------------- here, we need an autogen.sh and configure.ac in the /blob/master/ directory. after paste i will provide 2 working examples from doge-centos-------------------------
./autogen.sh
./configure --disable-upnp-default --prefix=$DEST_DIR --with-boost=$DEST_DIR --disable-maintainer-mode --disable-dependency-tracking PKG_CONFIG_PATH="$CANN_STAGE_LOC/lib/pkgconfig" CPPFLAGS="-I$CANN_STAGE_LOC/include ${OPTFLAGS}" LDFLAGS="-L$DEST_DIR/lib ${OPTFLAGS}" CXXFLAGS="${OPTFLAGS}" BOOST_CHRONO_EXTRALIBS="-lrt"
pushd src
make canncoind canncoin-cli
strip canncoind
strip canncoin-cli
cp canncoind canncoin-cli $DEST_DIR
popd
popd
popd
rm -rf cann-build
-----------------------------------------------------below are 2 examples of autogen.sh and configure.ac for dogecoin-centos-compile-----------------------------------------------------------------
https://github.com/dogecoin/dogecoin/blob/master/configure.achttps://github.com/dogecoin/dogecoin/blob/master/autogen.sh