summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeng-Yu Lin <kengyu@lexical.tw>2019-01-31 16:12:44 +0100
committerKeng-Yu Lin <kengyu@lexical.tw>2019-01-31 16:12:44 +0100
commit216df820033fca971eeada8e8396505524f87e85 (patch)
treec4a6664c4198c6ee0996074cfbb97e72484e4abd
Import dogecoin_1.10.0-7.debian.tar.xz
[dgit import tarball dogecoin 1.10.0-7 dogecoin_1.10.0-7.debian.tar.xz]
-rw-r--r--changelog71
-rw-r--r--compat1
-rw-r--r--control20
-rw-r--r--copyright156
-rw-r--r--dogecoin-qt.desktop12
-rw-r--r--dogecoin.manpages4
-rw-r--r--install7
-rw-r--r--manpages/dogecoin-cli.163
-rw-r--r--manpages/dogecoin-qt.1206
-rw-r--r--manpages/dogecoin.conf.589
-rw-r--r--manpages/dogecoind.1209
-rw-r--r--patches/0001-configure.ac_use_PIC.patch11
-rw-r--r--patches/0002-rename-libbitcoinconsensus-to-libdogecoinconsensus.patch524
-rw-r--r--patches/0003-reproducible-build.patch11
-rw-r--r--patches/0004-rename-RAND_egd.patch17
-rw-r--r--patches/0005-openssl_1_1_fixes.patch126
-rw-r--r--patches/0006-fix_ftbfs.patch78
-rw-r--r--patches/series6
-rwxr-xr-xrules26
-rw-r--r--source/format1
-rw-r--r--source/include-binaries1
-rw-r--r--watch4
22 files changed, 1643 insertions, 0 deletions
diff --git a/changelog b/changelog
new file mode 100644
index 0000000..91fcd54
--- /dev/null
+++ b/changelog
@@ -0,0 +1,71 @@
+dogecoin (1.10.0-7) unstable; urgency=medium
+
+ [Giovanni Mascellani]
+ * Fix some API usages that changed between Boost 1.62 and
+ Boost 1.67 (Closes: #914146)
+
+ -- Keng-Yu Lin <kengyu@lexical.tw> Thu, 31 Jan 2019 23:12:44 +0800
+
+dogecoin (1.10.0-6) unstable; urgency=low
+
+ * Update Standards-Version to 4.2.1
+ * Use boost 1.62 to prevent FTBFS with boost 1.67 (Closes: #914146)
+ - When I fixed this bug, boost 1.62 is in buster repo.
+ * Remove debian/dogecoin.triggers to fix lintian error:
+ repeated-trigger-name
+
+ -- Keng-Yu Lin <kengyu@lexical.tw> Thu, 06 Dec 2018 00:15:04 +0800
+
+dogecoin (1.10.0-5) unstable; urgency=low
+
+ [Niels Thykier]
+ * Fix memory leak in
+ debian/patches/0005-openssl_1_1_fixes.patch (Closes: #850223)
+
+ -- Keng-Yu Lin <kengyu@lexical.tw> Thu, 26 Jan 2017 16:08:49 +0800
+
+dogecoin (1.10.0-4) unstable; urgency=low
+
+ * Fix errors with OpenSSL 1.1 (Closes: #846767)
+
+ -- Keng-Yu Lin <kengyu@lexical.tw> Thu, 29 Dec 2016 17:16:08 +0800
+
+dogecoin (1.10.0-3) unstable; urgency=low
+
+ [Reiner Herrmann]
+ * Using C locale for sorting for reproducible builds (Closes: #828969)
+
+ -- Keng-Yu Lin <kengyu@lexical.tw> Fri, 28 Oct 2016 13:06:18 +0800
+
+dogecoin (1.10.0-2) unstable; urgency=low
+
+ * Remove libdogecoinconsensus.la. Fixed lintian error.
+
+ -- Keng-Yu Lin <kengyu@lexical.tw> Wed, 02 Mar 2016 23:47:07 +0800
+
+dogecoin (1.10.0-1) unstable; urgency=low
+
+ * New upstream release
+ * Add 0001-rename-libbitcoinconsensus-to-libdogecoinconsensus.patch
+ (Closes: #813973, #813974)
+
+ -- Keng-Yu Lin <kengyu@lexical.tw> Wed, 24 Feb 2016 14:30:15 +0800
+
+dogecoin (1.8.10-2) unstable; urgency=low
+
+ * Add --disable-test due to coredump (will report upstream) (Closes: #793840)
+ * Note: libboost and gcc5 transition fixes (Closes: #812656)
+
+ -- Keng-Yu Lin <kengyu@lexical.tw> Sat, 20 Feb 2016 06:54:43 +0800
+
+dogecoin (1.8.10-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Keng-Yu Lin <kengyu@lexical.tw> Wed, 03 Feb 2016 12:12:02 +0800
+
+dogecoin (1.8.0-1) unstable; urgency=low
+
+ * Initial release (Closes: #748799)
+
+ -- Keng-Yu Lin <kengyu@lexical.tw> Thu, 20 Nov 2014 23:58:33 +0800
diff --git a/compat b/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/compat
@@ -0,0 +1 @@
+9
diff --git a/control b/control
new file mode 100644
index 0000000..11c3574
--- /dev/null
+++ b/control
@@ -0,0 +1,20 @@
+Source: dogecoin
+Section: utils
+Priority: optional
+Maintainer: Keng-Yu Lin <kengyu@lexical.tw>
+Build-Depends: debhelper (>= 9), dh-autoreconf, automake, autoconf, pkg-config, libdb++-dev, libminiupnpc-dev, libboost-system1.62-dev, libboost-filesystem1.62-dev, libboost-program-options1.62-dev, libboost-thread1.62-dev, libboost-chrono1.62-dev, libboost-test1.62-dev, libssl-dev, libprotobuf-dev, protobuf-compiler, qtbase5-dev, qttools5-dev-tools, libqrencode-dev, python
+Standards-Version: 4.2.1
+Homepage: http://dogecoin.com/
+
+Package: dogecoin
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: peer-to-peer network based digital currency
+ Dogecoin is a free open source peer-to-peer electronic cash system that
+ is completely decentralized, without the need for a central server or
+ trusted parties. Users hold the crypto keys to their own money and
+ transact directly with each other, with the help of a P2P network to
+ check for double-spending.
+ .
+ Full transaction history is stored locally at each client. This
+ requires 20+ GB of space, slowly growing.
diff --git a/copyright b/copyright
new file mode 100644
index 0000000..f76959d
--- /dev/null
+++ b/copyright
@@ -0,0 +1,156 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: Dogecoin
+Upstream-Contact: Billy Markus <billym2k@gmail.com>
+Source: https://github.com/dogecoin/dogecoin
+
+Files: *
+Copyright: 2009-2012, Bitcoin Core Developers
+ 2013-2014, Dogecoin Developers
+License: Expat
+Comment: The Bitcoin Core Developers encompasses the current developers listed
+ on bitcoin.org, as well as the numerous contributors to the project.
+ The Dogecoin Core Developers encompasses the current developers
+ listed on dogecoin.com, as well as the numerous contributors to the
+ project.
+
+Files: src/json/*
+Copyright: 2007-2009, John W. Wilkinson
+License: Expat
+
+Files: debian/*
+Copyright: 2010-2011, Jonas Smedegaard <dr@jones.dk>
+ 2011, Matt Corallo <matt@bluematt.me>
+ 2014, Keng-Yu Lin <kengyu@lexical.tw>
+License: GPL-2+
+
+Files: debian/manpages/*
+Copyright: Micah Anderson <micah@debian.org>
+ 2014, Keng-Yu Lin <kengyu@lexical.tw>
+License: GPL-3+
+
+Files: src/qt/res/icons/clock*.png
+ src/qt/res/icons/tx*.png
+ src/qt/res/src/*.svg
+Copyright: Wladimir van der Laan
+License: Expat
+
+Files: src/qt/res/icons/address-book.png
+ src/qt/res/icons/export.png
+ src/qt/res/icons/history.png
+ src/qt/res/icons/key.png
+ src/qt/res/icons/lock_*.png
+ src/qt/res/icons/overview.png
+ src/qt/res/icons/receive.png
+ src/qt/res/icons/send.png
+ src/qt/res/icons/synced.png
+ src/qt/res/icons/filesave.png
+Copyright: David Vignoni (david@icon-king.com)
+ ICON KING - www.icon-king.com
+License: LGPL
+Comment: NUVOLA ICON THEME for KDE 3.x
+ Original icons: kaddressbook
+ klipper_dock
+ view-list-text
+ key-password
+ encrypted/decrypted
+ go-home
+ go-down
+ go-next
+ dialog-ok
+ Site: http://www.icon-king.com/projects/nuvola/
+
+Files: src/qt/res/icons/connect*.png
+Copyright: schollidesign
+License: GPL-3+
+Comment: Icon Pack: Human-O2
+ Site: http://findicons.com/icon/93743/blocks_gnome_netstatus_0
+
+Files: src/qt/res/icons/transaction*.png
+Copyright: md2k7
+License: Expat
+Comment: Site: https://bitcointalk.org/index.php?topic=15276.0
+
+Files: src/qt/res/icons/configure.png
+ src/qt/res/icons/quit.png
+ src/qt/res/icons/editcopy.png
+ src/qt/res/icons/editpaste.png
+ src/qt/res/icons/add.png
+ src/qt/res/icons/edit.png
+ src/qt/res/icons/remove.png
+Copyright: http://www.everaldo.com
+License: LGPL
+Comment: Icon Pack: Crystal SVG
+
+Files: src/qt/res/icons/bitcoin.png
+ src/qt/res/icons/toolbar.png
+Copyright: Bitboy (optimized for 16x16 by Wladimir van der Laan)
+License: PUB-DOM
+Comment: Site: https://bitcointalk.org/?topic=1756.0
+
+License: Expat
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+License: GPL-2+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+ .
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+Comment:
+ On Debian systems the GNU General Public License (GPL) version 2 is
+ located in '/usr/share/common-licenses/GPL-2'.
+ .
+ You should have received a copy of the GNU General Public License along
+ with this program. If not, see <http://www.gnu.org/licenses/>.
+
+License: GPL-3+
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU General Public License, Version 3 or any
+ later version published by the Free Software Foundation.
+Comment:
+ On Debian systems the GNU General Public License (GPL) version 3 is
+ located in '/usr/share/common-licenses/GPL-3'.
+ .
+ You should have received a copy of the GNU General Public License along
+ with this program. If not, see <http://www.gnu.org/licenses/>.
+
+License: LGPL
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+Comment:
+ On Debian systems the GNU Lesser General Public License (LGPL) is
+ located in '/usr/share/common-licenses/LGPL'.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+License: PUB-DOM
+ This work is in the public domain.
diff --git a/dogecoin-qt.desktop b/dogecoin-qt.desktop
new file mode 100644
index 0000000..1bc3779
--- /dev/null
+++ b/dogecoin-qt.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=Dogecoin
+Comment=Dogecoin P2P Cryptocurrency
+Comment[fr]=Dogecoin, monnaie virtuelle cryptographique pair à pair
+Comment[tr]=Dogecoin, eşten eşe kriptografik sanal para birimi
+Exec=dogecoin-qt %u
+Terminal=false
+Type=Application
+Icon=dogecoin128
+MimeType=x-scheme-handler/dogecoin;
+Categories=Office;Finance;
diff --git a/dogecoin.manpages b/dogecoin.manpages
new file mode 100644
index 0000000..88c0634
--- /dev/null
+++ b/dogecoin.manpages
@@ -0,0 +1,4 @@
+debian/manpages/dogecoind.1
+debian/manpages/dogecoin.conf.5
+debian/manpages/dogecoin-qt.1
+debian/manpages/dogecoin-cli.1
diff --git a/install b/install
new file mode 100644
index 0000000..aab8da2
--- /dev/null
+++ b/install
@@ -0,0 +1,7 @@
+debian/dogecoin-qt.desktop usr/share/applications
+share/pixmaps/bitcoin128.png usr/share/pixmaps
+#debian/dogecoin/usr/lib/x86_64-linux-gnu/libbitcoinconsensus.a /usr/lib/x86_64-linux-gnu/dogecoin/
+#debian/dogecoin/usr/lib/x86_64-linux-gnu/libbitcoinconsensus.la /usr/lib/x86_64-linux-gnu/dogecoin/
+#debian/dogecoin/usr/lib/x86_64-linux-gnu/libbitcoinconsensus.so /usr/lib/x86_64-linux-gnu/dogecoin/
+#debian/dogecoin/usr/lib/x86_64-linux-gnu/libbitcoinconsensus.so.0 /usr/lib/x86_64-linux-gnu/dogecoin/
+#debian/dogecoin/usr/lib/x86_64-linux-gnu/libbitcoinconsensus.so.0.0.0 /use/lib/x86_64-linux-gnu/dogecoin/
diff --git a/manpages/dogecoin-cli.1 b/manpages/dogecoin-cli.1
new file mode 100644
index 0000000..ceebf7b
--- /dev/null
+++ b/manpages/dogecoin-cli.1
@@ -0,0 +1,63 @@
+.TH DOGECOIN-CLI "1" "November 2014" "dogecoin-cli 1.8" "User Commands"
+.SH NAME
+dogecoin-cli \- Dogecoin Core RPC client
+.SH DESCRIPTION
+Dogecoin Core RPC client
+.SS "Usage:"
+.TP
+dogecoin\-cli [options] <command> [params]
+Send command to Dogecoin Core
+.TP
+dogecoin\-cli [options] help
+List commands
+.TP
+dogecoin\-cli [options] help <command>
+Get help for a command
+.SH OPTIONS
+.TP
+\-?
+This help message
+.TP
+\fB\-conf=\fR<file>
+Specify configuration file (default: dogecoin.conf)
+.TP
+\fB\-datadir=\fR<dir>
+Specify data directory
+.TP
+\fB\-testnet\fR
+Use the test network
+.TP
+\fB\-regtest\fR
+Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.
+.TP
+\fB\-rpcconnect=\fR<ip>
+Send commands to node running on <ip> (default: 127.0.0.1)
+.TP
+\fB\-rpcport=\fR<port>
+Connect to JSON\-RPC on <port> (default: 22555 or testnet: 44555)
+.TP
+\fB\-rpcwait\fR
+Wait for RPC server to start
+.TP
+\fB\-rpcuser=\fR<user>
+Username for JSON\-RPC connections
+.TP
+\fB\-rpcpassword=\fR<pw>
+Password for JSON\-RPC connections
+.PP
+SSL options: (see the Bitcoin Wiki for SSL setup instructions)
+.TP
+\fB\-rpcssl\fR
+Use OpenSSL (https) for JSON\-RPC connections
+.SH "SEE ALSO"
+The full documentation for
+.B dogecoin-cli
+is maintained as a Texinfo manual. If the
+.B info
+and
+.B dogecoin-cli
+programs are properly installed at your site, the command
+.IP
+.B info dogecoin-cli
+.PP
+should give you access to the complete manual.
diff --git a/manpages/dogecoin-qt.1 b/manpages/dogecoin-qt.1
new file mode 100644
index 0000000..0a4137c
--- /dev/null
+++ b/manpages/dogecoin-qt.1
@@ -0,0 +1,206 @@
+.TH DOGECOIN-QT "1" "November 2014" "dogecoin-qt 1.8"
+.SH NAME
+dogecoin-qt \- peer-to-peer network based digital currency
+.SH DESCRIPTION
+.SS "Usage:"
+.IP
+dogecoin\-qt [command\-line options]
+.SH OPTIONS
+.TP
+\-?
+This help message
+.TP
+\fB\-conf=\fR<file>
+Specify configuration file (default: dogecoin.conf)
+.TP
+\fB\-pid=\fR<file>
+Specify pid file (default: dogecoind.pid)
+.TP
+\fB\-gen\fR
+Generate coins
+.TP
+\fB\-gen\fR=\fI0\fR
+Don't generate coins
+.TP
+\fB\-datadir=\fR<dir>
+Specify data directory
+.TP
+\fB\-dbcache=\fR<n>
+Set database cache size in megabytes (default: 25)
+.TP
+\fB\-timeout=\fR<n>
+Specify connection timeout in milliseconds (default: 5000)
+.TP
+\fB\-proxy=\fR<ip:port>
+Connect through socks proxy
+.TP
+\fB\-socks=\fR<n>
+Select the version of socks proxy to use (4\-5, default: 5)
+.TP
+\fB\-tor=\fR<ip:port>
+Use proxy to reach tor hidden services (default: same as \fB\-proxy\fR)
+.TP
+\fB\-dns\fR
+Allow DNS lookups for \fB\-addnode\fR, \fB\-seednode\fR and \fB\-connect\fR
+.TP
+\fB\-port=\fR<port>
+Listen for connections on <port> (default: 8333 or testnet: 18333)
+.TP
+\fB\-maxconnections=\fR<n>
+Maintain at most <n> connections to peers (default: 125)
+.TP
+\fB\-addnode=\fR<ip>
+Add a node to connect to and attempt to keep the connection open
+.TP
+\fB\-connect=\fR<ip>
+Connect only to the specified node(s)
+.TP
+\fB\-seednode=\fR<ip>
+Connect to a node to retrieve peer addresses, and disconnect
+.TP
+\fB\-externalip=\fR<ip>
+Specify your own public address
+.TP
+\fB\-onlynet=\fR<net>
+Only connect to nodes in network <net> (IPv4, IPv6 or Tor)
+.TP
+\fB\-discover\fR
+Discover own IP address (default: 1 when listening and no \fB\-externalip\fR)
+.TP
+\fB\-checkpoints\fR
+Only accept block chain matching built\-in checkpoints (default: 1)
+.TP
+\fB\-listen\fR
+Accept connections from outside (default: 1 if no \fB\-proxy\fR or \fB\-connect\fR)
+.TP
+\fB\-bind=\fR<addr>
+Bind to given address and always listen on it. Use [host]:port notation for IPv6
+.TP
+\fB\-dnsseed\fR
+Find peers using DNS lookup (default: 1 unless \fB\-connect\fR)
+.TP
+\fB\-banscore=\fR<n>
+Threshold for disconnecting misbehaving peers (default: 100)
+.TP
+\fB\-bantime=\fR<n>
+Number of seconds to keep misbehaving peers from reconnecting (default: 86400)
+.TP
+\fB\-maxreceivebuffer=\fR<n>
+Maximum per\-connection receive buffer, <n>*1000 bytes (default: 5000)
+.TP
+\fB\-maxsendbuffer=\fR<n>
+Maximum per\-connection send buffer, <n>*1000 bytes (default: 1000)
+.TP
+\fB\-upnp\fR
+Use UPnP to map the listening port (default: 1 when listening)
+.TP
+\fB\-paytxfee=\fR<amt>
+Fee per KB to add to transactions you send
+.TP
+\fB\-server\fR
+Accept command line and JSON\-RPC commands
+.TP
+\fB\-testnet\fR
+Use the test network
+.TP
+\fB\-debug\fR
+Output extra debugging information. Implies all other \fB\-debug\fR* options
+.TP
+\fB\-debugnet\fR
+Output extra network debugging information
+.TP
+\fB\-logtimestamps\fR
+Prepend debug output with timestamp
+.TP
+\fB\-shrinkdebugfile\fR
+Shrink debug.log file on client startup (default: 1 when no \fB\-debug\fR)
+.TP
+\fB\-printtoconsole\fR
+Send trace/debug info to console instead of debug.log file
+.TP
+\fB\-rpcuser=\fR<user>
+Username for JSON\-RPC connections
+.TP
+\fB\-rpcpassword=\fR<pw>
+Password for JSON\-RPC connections
+.TP
+\fB\-rpcport=\fR<port>
+Listen for JSON\-RPC connections on <port> (default: 8332 or testnet: 18332)
+.TP
+\fB\-rpcallowip=\fR<ip>
+Allow JSON\-RPC connections from specified IP address
+.TP
+\fB\-rpcthreads=\fR<n>
+Set the number of threads to service RPC calls (default: 4)
+.TP
+\fB\-blocknotify=\fR<cmd>
+Execute command when the best block changes (%s in cmd is replaced by block hash)
+.TP
+\fB\-walletnotify=\fR<cmd>
+Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)
+.TP
+\fB\-alertnotify=\fR<cmd>
+Execute command when a relevant alert is received (%s in cmd is replaced by message)
+.TP
+\fB\-upgradewallet\fR
+Upgrade wallet to latest format
+.TP
+\fB\-keypool=\fR<n>
+Set key pool size to <n> (default: 100)
+.TP
+\fB\-rescan\fR
+Rescan the block chain for missing wallet transactions
+.TP
+\fB\-salvagewallet\fR
+Attempt to recover private keys from a corrupt wallet.dat
+.TP
+\fB\-checkblocks=\fR<n>
+How many blocks to check at startup (default: 288, 0 = all)
+.TP
+\fB\-checklevel=\fR<n>
+How thorough the block verification is (0\-4, default: 3)
+.TP
+\fB\-txindex\fR
+Maintain a full transaction index (default: 0)
+.TP
+\fB\-loadblock=\fR<file>
+Imports blocks from external blk000??.dat file
+.TP
+\fB\-reindex\fR
+Rebuild block chain index from current blk000??.dat files
+.TP
+\fB\-par=\fR<n>
+Set the number of script verification threads (1\-16, 0=auto, default: 0)
+.SS "Block creation options:"
+.TP
+\fB\-blockminsize=\fR<n>
+Set minimum block size in bytes (default: 0)
+.TP
+\fB\-blockmaxsize=\fR<n>
+Set maximum block size in bytes (default: 250000)
+.HP
+\fB\-blockprioritysize=\fR<n> Set maximum size of high\-priority/low\-fee transactions in bytes (default: 27000)
+.PP
+SSL options: (see the Dogecoin Wiki for SSL setup instructions)
+.TP
+\fB\-rpcssl\fR
+Use OpenSSL (https) for JSON\-RPC connections
+.TP
+\fB\-rpcsslcertificatechainfile=\fR<file.cert>
+Server certificate file (default: server.cert)
+.TP
+\fB\-rpcsslprivatekeyfile=\fR<file.pem>
+Server private key (default: server.pem)
+.TP
+\fB\-rpcsslciphers=\fR<ciphers>
+Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)
+.SS "UI options:"
+.TP
+\fB\-lang=\fR<lang>
+Set language, for example "de_DE" (default: system locale)
+.TP
+\fB\-min\fR
+Start minimized
+.TP
+\fB\-splash\fR
+Show splash screen on startup (default: 1)
diff --git a/manpages/dogecoin.conf.5 b/manpages/dogecoin.conf.5
new file mode 100644
index 0000000..73a18da
--- /dev/null
+++ b/manpages/dogecoin.conf.5
@@ -0,0 +1,89 @@
+.TH DOGECOIN.CONF "5" "November 2014" "dogecoin.conf 1.8"
+.SH NAME
+dogecoin.conf \- dogecoin configuration file
+.SH SYNOPSIS
+All command-line options (except for '\-datadir' and '\-conf') may be specified in a configuration file, and all configuration file options may also be specified on the command line. Command-line options override values set in the configuration file.
+.TP
+The configuration file is a list of 'setting=value' pairs, one per line, with optional comments starting with the '#' character.
+.TP
+The configuration file is not automatically created; you can create it using your favorite plain-text editor. By default, dogecoind(1) will look for a file named dogecoin.conf(5) in the dogecoin data directory, but both the data directory and the configuration file path may be changed using the '\-datadir' and '\-conf' command-line arguments.
+.SH LOCATION
+dogecoin.conf should be located in $HOME/.dogecoin
+.SH NETWORK-RELATED SETTINGS
+.TP
+.TP
+\fBtestnet=\fR[\fI'1'\fR|\fI'0'\fR]
+Enable or disable run on the test network instead of the real *dogecoin* network.
+.TP
+\fBproxy=\fR\fI'127.0.0.1:9050'\fR
+Connect via a socks4 proxy.
+.TP
+\fBaddnode=\fR\fI'10.0.0.2:8333'\fR
+Use as many *addnode=* settings as you like to connect to specific peers.
+.TP
+\fBconnect=\fR\fI'10.0.0.1:8333'\fR
+Use as many *connect=* settings as you like to connect ONLY to specific peers.
+.TP
+\fRmaxconnections=\fR\fI'value'\fR
+Maximum number of inbound+outbound connections.
+.SH JSON-RPC OPTIONS
+.TP
+\fBserver=\fR[\fI'1'\fR|\fI'0'\fR]
+Tells *dogecoin* to accept or not accept JSON-RPC commands.
+.TP
+\fBrpcuser=\fR\fI'username'\fR
+You must set *rpcuser* to secure the JSON-RPC api.
+.TP
+\fBrpcpassword=\fR\fI'password'\fR
+You must set *rpcpassword* to secure the JSON-RPC api.
+.TP
+\fBrpcallowip=\fR\fI'192.168.1.*'\fR
+By default, only RPC connections from localhost are allowed. Specify as many *rpcallowip=* settings as you like to allow connections from other hosts (and you may use * as a wildcard character).
+.TP
+\fBrpcport=\fR\fI'8332'\fR
+Listen for RPC connections on this TCP port.
+.TP
+\fBrpcconnect=\fR\fI'127.0.0.1'\fR
+You can use *dogecoin* or *dogecoind(1)* to send commands to *dogecoin*/*dogecoind(1)* running on another host using this option.
+.TP
+\fBrpcssl=\fR\fI'1'\fR
+Use Secure Sockets Layer (also known as TLS or HTTPS) to communicate with *dogecoin* '\-server' or *dogecoind(1)*. Example of OpenSSL settings used when *rpcssl*='1':
+.TP
+\fB\-rpcsslciphers=\fR<ciphers>
+Acceptable ciphers (default: TLSv1+HIGH:\:!SSLv2:\:!aNULL:\:!eNULL:\:!AH:\:!3DES:\:@STRENGTH)
+.TP
+\fBrpcsslcertificatechainfile=\fR\fI'server.cert'\fR
+.TP
+\fBrpcsslprivatekeyfile=\fR\fI'server.pem'\fR
+.TP
+.SH MISCELLANEOUS OPTIONS
+.TP
+\fBgen=\fR[\fI'0'\fR|\fI'1'\fR]
+Enable or disable attempt to generate dogecoins.
+.TP
+\fB4way=\fR[\fI'0'\fR|\fI'1'\fR]
+Enable or disable use SSE instructions to try to generate dogecoins faster.
+.TP
+\fBkeypool=\fR\fI'100'\fR
+Pre-generate this many public/private key pairs, so wallet backups will be valid for both prior transactions and several dozen future transactions.
+.TP
+\fBpaytxfee=\fR\fI'0.00'\fR
+Pay an optional transaction fee every time you send dogecoins. Transactions with fees are more likely than free transactions to be included in generated blocks, so may be validated sooner.
+.TP
+\fBallowreceivebyip=\fR\fI'1'\fR
+Allow direct connections for the 'pay via IP address' feature.
+.TP
+.SH USER INTERFACE OPTIONS
+.TP
+\fBmin=\fR[\fI'0'\fR|\fI'1'\fR]
+Enable or disable start dogecoind minimized.
+.TP
+\fBminimizetotray=\fR[\fI'0'\fR|\fI'1'\fR]
+Enable or disable minimize to the system tray.
+.SH "SEE ALSO"
+dogecoind(1)
+.SH AUTHOR
+This manual page was written by Micah Anderson <micah@debian.org> for the Debian system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 or any later version published by the Free Software Foundation.
+
+On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
+
diff --git a/manpages/dogecoind.1 b/manpages/dogecoind.1
new file mode 100644
index 0000000..5bef0c4
--- /dev/null
+++ b/manpages/dogecoind.1
@@ -0,0 +1,209 @@
+.TH DOGECOIND "1" "November 2014" "dogecoind 1.8"
+.SH NAME
+dogecoind \- peer-to-peer network based digital currency
+.SH SYNOPSIS
+dogecoin [options] <command> [params]
+.TP
+dogecoin [options] help <command> \- Get help for a command
+.SH DESCRIPTION
+This manual page documents the dogecoind program. Dogecoin is a peer-to-peer digital currency. Peer-to-peer (P2P) means that there is no central authority to issue new money or keep track of transactions. Instead, these tasks are managed collectively by the nodes of the network. Advantages:
+
+Dogecoins can be sent easily through the Internet, without having to trust middlemen. Transactions are designed to be irreversible. Be safe from instability caused by fractional reserve banking and central banks. The limited inflation of the Dogecoin system’s money supply is distributed evenly (by CPU power) throughout the network, not monopolized by banks.
+
+.SH OPTIONS
+.TP
+\fB\-conf=\fR<file>
+Specify configuration file (default: dogecoin.conf)
+.TP
+\fB\-gen\fR
+Generate coins
+.TP
+\fB\-gen\fR=\fI0\fR
+Don't generate coins
+.TP
+\fB\-min\fR
+Start minimized
+.TP
+\fB\-datadir=\fR<dir>
+Specify data directory
+.TP
+\fB\-proxy=\fR<ip:port>
+Connect through socks4 proxy
+.TP
+\fB\-addnode=\fR<ip>
+Add a node to connect to
+.TP
+\fB\-connect=\fR<ip>
+Connect only to the specified node
+.TP
+\fB\-paytxfee=\fR<amt>
+Fee per KB to add to transactions you send
+.TP
+\fB\-server\fR
+Accept command line and JSON\-RPC commands
+.TP
+\fB\-daemon\fR
+Run in the background as a daemon and accept commands
+.TP
+\fB\-testnet\fR
+Use the test network
+.TP
+\fB\-rpcuser=\fR<user>
+Username for JSON\-RPC connections
+.TP
+\fB\-rpcpassword=\fR<pw>
+Password for JSON\-RPC connections
+.TP
+\fB\-rpcport=\fR<port>
+Listen for JSON\-RPC connections on <port>
+.TP
+\fB\-rpcallowip=\fR<ip>
+Allow JSON\-RPC connections from specified IP address
+.TP
+\fB\-rpcconnect=\fR<ip>
+Send commands to node running on <ip>
+.PP
+SSL options: (see the Dogecoin Wiki for SSL setup instructions)
+.TP
+\fB\-rpcssl\fR=\fI1\fR
+Use OpenSSL (https) for JSON\-RPC connections
+.TP
+\fB\-rpcsslcertificatchainfile=\fR<file.cert>
+Server certificate file (default: server.cert)
+.TP
+\fB\-rpcsslprivatekeyfile=\fR<file.pem>
+Server private key (default: server.pem)
+.TP
+\fB\-rpcsslciphers=\fR<ciphers>
+Acceptable ciphers (default: TLSv1+HIGH:\:!SSLv2:\:!aNULL:\:!eNULL:\:!AH:\:!3DES:\:@STRENGTH)
+.TP
+\-?
+This help message
+.SH COMMANDS
+.TP
+\fBbackupwallet 'destination'\fR
+Safely copies *wallet.dat* to 'destination', which can be a directory or a path with filename.
+.TP
+\fBgetaccount 'dogecoinaddress'\fR
+Returns the account associated with the given address.
+.TP
+\fBsetaccount 'dogecoinaddress' ['account']\fR
+Sets the ['account'] associated with the given address. ['account'] may be omitted to remove an address from ['account'].
+.TP
+\fBgetaccountaddress 'account'\fR
+Returns a new dogecoin address for 'account'.
+.TP
+\fBgetaddressesbyaccount 'account'\fR
+Returns the list of addresses associated with the given 'account'.
+.TP
+\fBgetbalance 'account'\fR
+Returns the server's available balance, or the balance for 'account'.
+.TP
+\fBgetblockcount\fR
+Returns the number of blocks in the longest block chain.
+.TP
+\fBgetblocknumber\fR
+Returns the block number of the latest block in the longest block chain.
+.TP
+\fBgetconnectioncount\fR
+Returns the number of connections to other nodes.
+.TP
+\fBgetdifficulty\fR
+Returns the proof-of-work difficulty as a multiple of the minimum difficulty.
+.TP
+\fBgetgenerate\fR
+Returns boolean true if server is trying to generate dogecoins, false otherwise.
+.TP
+\fBsetgenerate 'generate' ['genproclimit']\fR
+Generation is limited to ['genproclimit'] processors, \-1 is unlimited.
+.TP
+\fBgethashespersec\fR
+Returns a recent hashes per second performance measurement while generating.
+.TP
+\fBgetinfo\fR
+Returns an object containing server information.
+.TP
+\fBgetnewaddress 'account'\fR
+Returns a new dogecoin address for receiving payments. If 'account' is specified (recommended), it is added to the address book so payments received with the address will be credited to 'account'.
+.TP
+\fBgetreceivedbyaccount 'account' ['minconf=1']\fR
+Returns the total amount received by addresses associated with 'account' in transactions with at least ['minconf'] confirmations.
+.TP
+\fBgetreceivedbyaddress 'dogecoinaddress' ['minconf=1']\fR
+Returns the total amount received by 'dogecoinaddress' in transactions with at least ['minconf'] confirmations.
+.TP
+\fBgettransaction 'txid'\fR
+Returns information about a specific transaction, given hexadecimal transaction ID.
+.TP
+\fBgetwork 'data'\fR
+If 'data' is specified, tries to solve the block and returns true if it was successful. If 'data' is not specified, returns formatted hash 'data' to work on:
+
+ "midstate" : precomputed hash state after hashing the first half of the data.
+ "data" : block data.
+ "hash1" : formatted hash buffer for second hash.
+ "target" : little endian hash target.
+.TP
+\fBhelp 'command'\fR
+List commands, or get help for a command.
+.TP
+\fBlistaccounts ['minconf=1']\fR
+List accounts and their current balances.
+ *note: requires dogecoin 0.3.20 or later.
+.TP
+\fBlistreceivedbyaccount ['minconf=1'] ['includeempty=false']\fR
+['minconf'] is the minimum number of confirmations before payments are included. ['includeempty'] whether to include addresses that haven't received any payments. Returns an array of objects containing:
+
+ "account" : the account of the receiving address.
+ "amount" : total amount received by the address.
+ "confirmations" : number of confirmations of the most recent transaction included.
+.TP
+\fBlistreceivedbyaddress ['minconf=1'] ['includeempty=false']\fR
+['minconf'] is the minimum number of confirmations before payments are included. ['includeempty'] whether to include addresses that haven't received any payments. Returns an array of objects containing:
+
+ "address" : receiving address.
+ "account" : the account of the receiving address.
+ "amount" : total amount received by the address.
+ "confirmations" : number of confirmations of the most recent transaction included.
+.TP
+\fBlisttransactions 'account' ['count=10']\fR
+Returns a list of the last ['count'] transactions for 'account' \- for all accounts if 'account' is not specified or is "*". Each entry in the list may contain:
+
+ "category" : will be generate, send, receive, or move.
+ "amount" : amount of transaction.
+ "fee" : Fee (if any) paid (only for send transactions).
+ "confirmations" : number of confirmations (only for generate/send/receive).
+ "txid" : transaction ID (only for generate/send/receive).
+ "otheraccount" : account funds were moved to or from (only for move).
+ "message" : message associated with transaction (only for send).
+ "to" : message-to associated with transaction (only for send).
+
+ *note: requires dogecoin 0.3.20 or later.
+.TP
+\fBmove <'fromaccount'> <'toaccount'> <'amount'> ['minconf=1'] ['comment']\fR
+Moves funds between accounts.
+.TP
+\fBsendfrom* <'account'> <'dogecoinaddress'> <'amount'> ['minconf=1'] ['comment'] ['comment-to']\fR
+Sends amount from account's balance to 'dogecoinaddress'. This method will fail if there is less than amount dogecoins with ['minconf'] confirmations in the account's balance (unless account is the empty-string-named default account; it behaves like the *sendtoaddress* method). Returns transaction ID on success.
+.TP
+\fBsendtoaddress 'dogecoinaddress' 'amount' ['comment'] ['comment-to']\fR
+Sends amount from the server's available balance to 'dogecoinaddress'. amount is a real and is rounded to the nearest 0.01. Returns transaction id on success.
+.TP
+\fBstop\fR
+Stops the dogecoin server.
+.TP
+\fBvalidateaddress 'dogecoinaddress'\fR
+Checks that 'dogecoinaddress' looks like a proper dogecoin address. Returns an object containing:
+
+ "isvalid" : true or false.
+ "ismine" : true if the address is in the server's wallet.
+ "address" : dogecoinaddress.
+
+ *note: ismine and address are only returned if the address is valid.
+
+.SH "SEE ALSO"
+dogecoin.conf(5)
+.SH AUTHOR
+This manual page was written by Micah Anderson <micah@debian.org> for the Debian system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 or any later version published by the Free Software Foundation.
+
+On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
+
diff --git a/patches/0001-configure.ac_use_PIC.patch b/patches/0001-configure.ac_use_PIC.patch
new file mode 100644
index 0000000..fe9db0a
--- /dev/null
+++ b/patches/0001-configure.ac_use_PIC.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -417,7 +417,7 @@
+
+ if test x$TARGET_OS != xwindows; then
+ # All windows code is PIC, forcing it on just adds useless compile warnings
+- AX_CHECK_COMPILE_FLAG([-fPIE],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fPIE"])
++ AX_CHECK_COMPILE_FLAG([-fPIC],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fPIC"])
+ AX_CHECK_LINK_FLAG([[-pie]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"])
+ fi
+
diff --git a/patches/0002-rename-libbitcoinconsensus-to-libdogecoinconsensus.patch b/patches/0002-rename-libbitcoinconsensus-to-libdogecoinconsensus.patch
new file mode 100644
index 0000000..239f829
--- /dev/null
+++ b/patches/0002-rename-libbitcoinconsensus-to-libdogecoinconsensus.patch
@@ -0,0 +1,524 @@
+From 1a9b78f89d7999df16d5b114eea0b2645b5d19eb Mon Sep 17 00:00:00 2001
+From: Patrick Lodder <patrick.lodder@intellibiz.org>
+Date: Sat, 13 Feb 2016 12:06:49 +0100
+Subject: [PATCH] rename libbitcoinconsensus to libdogecoinconsensus
+
+Changes all consensus library name tags from bitcoinconsensus
+to dogecoinconsensus to prevent packagers from having to deal
+with our shared library and headers having the same name as
+Bitcoin's.
+
+Also changes all exported names to create incompatibility
+between the two libraries, so that one cannot accidentally link
+code for bitcoin consensus but instead get dogecoin consensus.
+---
+ .gitignore | 2 +-
+ Makefile.am | 2 +-
+ configure.ac | 2 +-
+ libbitcoinconsensus.pc.in | 11 -----
+ libdogecoinconsensus.pc.in | 11 +++++
+ src/Makefile.am | 20 ++++-----
+ src/script/bitcoinconsensus.cpp | 91 ----------------------------------------
+ src/script/bitcoinconsensus.h | 68 ------------------------------
+ src/script/dogecoinconsensus.cpp | 91 ++++++++++++++++++++++++++++++++++++++++
+ src/script/dogecoinconsensus.h | 68 ++++++++++++++++++++++++++++++
+ src/test/script_tests.cpp | 4 +-
+ 11 files changed, 185 insertions(+), 185 deletions(-)
+ delete mode 100644 libbitcoinconsensus.pc.in
+ create mode 100644 libdogecoinconsensus.pc.in
+ delete mode 100644 src/script/bitcoinconsensus.cpp
+ delete mode 100644 src/script/bitcoinconsensus.h
+ create mode 100644 src/script/dogecoinconsensus.cpp
+ create mode 100644 src/script/dogecoinconsensus.h
+
+diff --git a/.gitignore b/.gitignore
+index a809323..a0a22be 100644
+--- a/.gitignore
++++ b/.gitignore
+@@ -112,4 +112,4 @@ qa/pull-tester/test.*/*
+
+ /doc/doxygen/
+
+-libbitcoinconsensus.pc
++libdogecoinconsensus.pc
+diff --git a/Makefile.am b/Makefile.am
+index 60d7b04..e7012e3 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -6,7 +6,7 @@ GZIP_ENV="-9n"
+
+ if BUILD_BITCOIN_LIBS
+ pkgconfigdir = $(libdir)/pkgconfig
+-pkgconfig_DATA = libbitcoinconsensus.pc
++pkgconfig_DATA = libdogecoinconsensus.pc
+ endif
+
+ BITCOIND_BIN=$(top_builddir)/src/dogecoind$(EXEEXT)
+diff --git a/configure.ac b/configure.ac
+index 5453481..1849ccf 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -709,7 +709,7 @@ AC_MSG_CHECKING([whether to build libraries])
+ AM_CONDITIONAL([BUILD_BITCOIN_LIBS], [test x$build_bitcoin_libs = xyes])
+ if test x$build_bitcoin_libs = xyes; then
+ AC_DEFINE(HAVE_CONSENSUS_LIB, 1, [Define this symbol if the consensus lib has been built])
+- AC_CONFIG_FILES([libbitcoinconsensus.pc:libbitcoinconsensus.pc.in])
++ AC_CONFIG_FILES([libdogecoinconsensus.pc:libdogecoinconsensus.pc.in])
+ fi
+ AC_MSG_RESULT($build_bitcoin_libs)
+
+diff --git a/libbitcoinconsensus.pc.in b/libbitcoinconsensus.pc.in
+deleted file mode 100644
+index 3ca1696..0000000
+--- a/libbitcoinconsensus.pc.in
++++ /dev/null
+@@ -1,11 +0,0 @@
+-prefix=@prefix@
+-exec_prefix=@exec_prefix@
+-libdir=@libdir@
+-includedir=@includedir@
+-
+-Name: Bitcoin Core consensus library
+-Description: Library for the Bitcoin consensus protocol.
+-Version: @PACKAGE_VERSION@
+-Libs: -L${libdir} -lbitcoinconsensus
+-Cflags: -I${includedir}
+-Requires.private: libcrypto
+diff --git a/libdogecoinconsensus.pc.in b/libdogecoinconsensus.pc.in
+new file mode 100644
+index 0000000..9b5e5d7
+--- /dev/null
++++ b/libdogecoinconsensus.pc.in
+@@ -0,0 +1,11 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: Dogecoin Core consensus library
++Description: Library for the Dogecoin consensus protocol.
++Version: @PACKAGE_VERSION@
++Libs: -L${libdir} -ldogecoinconsensus
++Cflags: -I${includedir}
++Requires.private: libcrypto
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 53601a1..35f5a6d 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -50,8 +50,8 @@ EXTRA_LIBRARIES += libbitcoin_wallet.a
+ endif
+
+ if BUILD_BITCOIN_LIBS
+-lib_LTLIBRARIES = libbitcoinconsensus.la
+-LIBBITCOIN_CONSENSUS=libbitcoinconsensus.la
++lib_LTLIBRARIES = libdogecoinconsensus.la
++LIBBITCOIN_CONSENSUS=libdogecoinconsensus.la
+ else
+ LIBBITCOIN_CONSENSUS=
+ endif
+@@ -375,10 +375,10 @@ dogecoin_tx_LDADD = \
+ dogecoin_tx_LDADD += $(BOOST_LIBS) $(CRYPTO_LIBS)
+ #
+
+-# bitcoinconsensus library #
++# dogecoinconsensus library #
+ if BUILD_BITCOIN_LIBS
+-include_HEADERS = script/bitcoinconsensus.h
+-libbitcoinconsensus_la_SOURCES = \
++include_HEADERS = script/dogecoinconsensus.h
++libdogecoinconsensus_la_SOURCES = \
+ crypto/hmac_sha512.cpp \
+ crypto/ripemd160.cpp \
+ crypto/scrypt.cpp \
+@@ -390,19 +390,19 @@ libbitcoinconsensus_la_SOURCES = \
+ hash.cpp \
+ primitives/transaction.cpp \
+ pubkey.cpp \
+- script/bitcoinconsensus.cpp \
++ script/dogecoinconsensus.cpp \
+ script/interpreter.cpp \
+ script/script.cpp \
+ uint256.cpp \
+ utilstrencodings.cpp
+
+ if GLIBC_BACK_COMPAT
+- libbitcoinconsensus_la_SOURCES += compat/glibc_compat.cpp
++ libdogecoinconsensus_la_SOURCES += compat/glibc_compat.cpp
+ endif
+
+-libbitcoinconsensus_la_LDFLAGS = -no-undefined $(RELDFLAGS)
+-libbitcoinconsensus_la_LIBADD = $(CRYPTO_LIBS)
+-libbitcoinconsensus_la_CPPFLAGS = $(CRYPTO_CFLAGS) -I$(builddir)/obj -DBUILD_BITCOIN_INTERNAL
++libdogecoinconsensus_la_LDFLAGS = -no-undefined $(RELDFLAGS)
++libdogecoinconsensus_la_LIBADD = $(CRYPTO_LIBS)
++libdogecoinconsensus_la_CPPFLAGS = $(CRYPTO_CFLAGS) -I$(builddir)/obj -DBUILD_BITCOIN_INTERNAL
+
+ endif
+ #
+diff --git a/src/script/bitcoinconsensus.cpp b/src/script/bitcoinconsensus.cpp
+deleted file mode 100644
+index b0d5faa..0000000
+--- a/src/script/bitcoinconsensus.cpp
++++ /dev/null
+@@ -1,91 +0,0 @@
+-// Copyright (c) 2009-2010 Satoshi Nakamoto
+-// Copyright (c) 2009-2014 The Bitcoin Core developers
+-// Distributed under the MIT software license, see the accompanying
+-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+-
+-#include "bitcoinconsensus.h"
+-
+-#include "primitives/transaction.h"
+-#include "script/interpreter.h"
+-#include "version.h"
+-
+-namespace {
+-
+-/** A class that deserializes a single CTransaction one time. */
+-class TxInputStream
+-{
+-public:
+- TxInputStream(int nTypeIn, int nVersionIn, const unsigned char *txTo, size_t txToLen) :
+- m_type(nTypeIn),
+- m_version(nVersionIn),
+- m_data(txTo),
+- m_remaining(txToLen)
+- {}
+-
+- TxInputStream& read(char* pch, size_t nSize)
+- {
+- if (nSize > m_remaining)
+- throw std::ios_base::failure(std::string(__func__) + ": end of data");
+-
+- if (pch == NULL)
+- throw std::ios_base::failure(std::string(__func__) + ": bad destination buffer");
+-
+- if (m_data == NULL)
+- throw std::ios_base::failure(std::string(__func__) + ": bad source buffer");
+-
+- memcpy(pch, m_data, nSize);
+- m_remaining -= nSize;
+- m_data += nSize;
+- return *this;
+- }
+-
+- template<typename T>
+- TxInputStream& operator>>(T& obj)
+- {
+- ::Unserialize(*this, obj, m_type, m_version);
+- return *this;
+- }
+-
+-private:
+- const int m_type;
+- const int m_version;
+- const unsigned char* m_data;
+- size_t m_remaining;
+-};
+-
+-inline int set_error(bitcoinconsensus_error* ret, bitcoinconsensus_error serror)
+-{
+- if (ret)
+- *ret = serror;
+- return 0;
+-}
+-
+-} // anon namespace
+-
+-int bitcoinconsensus_verify_script(const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen,
+- const unsigned char *txTo , unsigned int txToLen,
+- unsigned int nIn, unsigned int flags, bitcoinconsensus_error* err)
+-{
+- try {
+- TxInputStream stream(SER_NETWORK, PROTOCOL_VERSION, txTo, txToLen);
+- CTransaction tx;
+- stream >> tx;
+- if (nIn >= tx.vin.size())
+- return set_error(err, bitcoinconsensus_ERR_TX_INDEX);
+- if (tx.GetSerializeSize(SER_NETWORK, PROTOCOL_VERSION) != txToLen)
+- return set_error(err, bitcoinconsensus_ERR_TX_SIZE_MISMATCH);
+-
+- // Regardless of the verification result, the tx did not error.
+- set_error(err, bitcoinconsensus_ERR_OK);
+-
+- return VerifyScript(tx.vin[nIn].scriptSig, CScript(scriptPubKey, scriptPubKey + scriptPubKeyLen), flags, TransactionSignatureChecker(&tx, nIn), NULL);
+- } catch (const std::exception&) {
+- return set_error(err, bitcoinconsensus_ERR_TX_DESERIALIZE); // Error deserializing
+- }
+-}
+-
+-unsigned int bitcoinconsensus_version()
+-{
+- // Just use the API version for now
+- return BITCOINCONSENSUS_API_VER;
+-}
+diff --git a/src/script/bitcoinconsensus.h b/src/script/bitcoinconsensus.h
+deleted file mode 100644
+index 0320577..0000000
+--- a/src/script/bitcoinconsensus.h
++++ /dev/null
+@@ -1,68 +0,0 @@
+-// Copyright (c) 2009-2010 Satoshi Nakamoto
+-// Copyright (c) 2009-2014 The Bitcoin Core developers
+-// Distributed under the MIT software license, see the accompanying
+-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+-
+-#ifndef BITCOIN_BITCOINCONSENSUS_H
+-#define BITCOIN_BITCOINCONSENSUS_H
+-
+-#if defined(BUILD_BITCOIN_INTERNAL) && defined(HAVE_CONFIG_H)
+-#include "config/bitcoin-config.h"
+- #if defined(_WIN32)
+- #if defined(DLL_EXPORT)
+- #if defined(HAVE_FUNC_ATTRIBUTE_DLLEXPORT)
+- #define EXPORT_SYMBOL __declspec(dllexport)
+- #else
+- #define EXPORT_SYMBOL
+- #endif
+- #endif
+- #elif defined(HAVE_FUNC_ATTRIBUTE_VISIBILITY)
+- #define EXPORT_SYMBOL __attribute__ ((visibility ("default")))
+- #endif
+-#elif defined(MSC_VER) && !defined(STATIC_LIBBITCOINCONSENSUS)
+- #define EXPORT_SYMBOL __declspec(dllimport)
+-#endif
+-
+-#ifndef EXPORT_SYMBOL
+- #define EXPORT_SYMBOL
+-#endif
+-
+-#ifdef __cplusplus
+-extern "C" {
+-#endif
+-
+-#define BITCOINCONSENSUS_API_VER 0
+-
+-typedef enum bitcoinconsensus_error_t
+-{
+- bitcoinconsensus_ERR_OK = 0,
+- bitcoinconsensus_ERR_TX_INDEX,
+- bitcoinconsensus_ERR_TX_SIZE_MISMATCH,
+- bitcoinconsensus_ERR_TX_DESERIALIZE,
+-} bitcoinconsensus_error;
+-
+-/** Script verification flags */
+-enum
+-{
+- bitcoinconsensus_SCRIPT_FLAGS_VERIFY_NONE = 0,
+- bitcoinconsensus_SCRIPT_FLAGS_VERIFY_P2SH = (1U << 0), // evaluate P2SH (BIP16) subscripts
+- bitcoinconsensus_SCRIPT_FLAGS_VERIFY_DERSIG = (1U << 2), // enforce strict DER (BIP66) compliance
+-};
+-
+-/// Returns 1 if the input nIn of the serialized transaction pointed to by
+-/// txTo correctly spends the scriptPubKey pointed to by scriptPubKey under
+-/// the additional constraints specified by flags.
+-/// If not NULL, err will contain an error/success code for the operation
+-EXPORT_SYMBOL int bitcoinconsensus_verify_script(const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen,
+- const unsigned char *txTo , unsigned int txToLen,
+- unsigned int nIn, unsigned int flags, bitcoinconsensus_error* err);
+-
+-EXPORT_SYMBOL unsigned int bitcoinconsensus_version();
+-
+-#ifdef __cplusplus
+-} // extern "C"
+-#endif
+-
+-#undef EXPORT_SYMBOL
+-
+-#endif // BITCOIN_BITCOINCONSENSUS_H
+diff --git a/src/script/dogecoinconsensus.cpp b/src/script/dogecoinconsensus.cpp
+new file mode 100644
+index 0000000..177b3dc
+--- /dev/null
++++ b/src/script/dogecoinconsensus.cpp
+@@ -0,0 +1,91 @@
++// Copyright (c) 2009-2010 Satoshi Nakamoto
++// Copyright (c) 2009-2014 The Bitcoin Core developers
++// Distributed under the MIT software license, see the accompanying
++// file COPYING or http://www.opensource.org/licenses/mit-license.php.
++
++#include "dogecoinconsensus.h"
++
++#include "primitives/transaction.h"
++#include "script/interpreter.h"
++#include "version.h"
++
++namespace {
++
++/** A class that deserializes a single CTransaction one time. */
++class TxInputStream
++{
++public:
++ TxInputStream(int nTypeIn, int nVersionIn, const unsigned char *txTo, size_t txToLen) :
++ m_type(nTypeIn),
++ m_version(nVersionIn),
++ m_data(txTo),
++ m_remaining(txToLen)
++ {}
++
++ TxInputStream& read(char* pch, size_t nSize)
++ {
++ if (nSize > m_remaining)
++ throw std::ios_base::failure(std::string(__func__) + ": end of data");
++
++ if (pch == NULL)
++ throw std::ios_base::failure(std::string(__func__) + ": bad destination buffer");
++
++ if (m_data == NULL)
++ throw std::ios_base::failure(std::string(__func__) + ": bad source buffer");
++
++ memcpy(pch, m_data, nSize);
++ m_remaining -= nSize;
++ m_data += nSize;
++ return *this;
++ }
++
++ template<typename T>
++ TxInputStream& operator>>(T& obj)
++ {
++ ::Unserialize(*this, obj, m_type, m_version);
++ return *this;
++ }
++
++private:
++ const int m_type;
++ const int m_version;
++ const unsigned char* m_data;
++ size_t m_remaining;
++};
++
++inline int set_error(dogecoinconsensus_error* ret, dogecoinconsensus_error serror)
++{
++ if (ret)
++ *ret = serror;
++ return 0;
++}
++
++} // anon namespace
++
++int dogecoinconsensus_verify_script(const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen,
++ const unsigned char *txTo , unsigned int txToLen,
++ unsigned int nIn, unsigned int flags, dogecoinconsensus_error* err)
++{
++ try {
++ TxInputStream stream(SER_NETWORK, PROTOCOL_VERSION, txTo, txToLen);
++ CTransaction tx;
++ stream >> tx;
++ if (nIn >= tx.vin.size())
++ return set_error(err, dogecoinconsensus_ERR_TX_INDEX);
++ if (tx.GetSerializeSize(SER_NETWORK, PROTOCOL_VERSION) != txToLen)
++ return set_error(err, dogecoinconsensus_ERR_TX_SIZE_MISMATCH);
++
++ // Regardless of the verification result, the tx did not error.
++ set_error(err, dogecoinconsensus_ERR_OK);
++
++ return VerifyScript(tx.vin[nIn].scriptSig, CScript(scriptPubKey, scriptPubKey + scriptPubKeyLen), flags, TransactionSignatureChecker(&tx, nIn), NULL);
++ } catch (const std::exception&) {
++ return set_error(err, dogecoinconsensus_ERR_TX_DESERIALIZE); // Error deserializing
++ }
++}
++
++unsigned int dogecoinconsensus_version()
++{
++ // Just use the API version for now
++ return DOGECOINCONSENSUS_API_VER;
++}
+diff --git a/src/script/dogecoinconsensus.h b/src/script/dogecoinconsensus.h
+new file mode 100644
+index 0000000..bcfdb3d
+--- /dev/null
++++ b/src/script/dogecoinconsensus.h
+@@ -0,0 +1,68 @@
++// Copyright (c) 2009-2010 Satoshi Nakamoto
++// Copyright (c) 2009-2014 The Bitcoin Core developers
++// Distributed under the MIT software license, see the accompanying
++// file COPYING or http://www.opensource.org/licenses/mit-license.php.
++
++#ifndef BITCOIN_BITCOINCONSENSUS_H
++#define BITCOIN_BITCOINCONSENSUS_H
++
++#if defined(BUILD_BITCOIN_INTERNAL) && defined(HAVE_CONFIG_H)
++#include "config/bitcoin-config.h"
++ #if defined(_WIN32)
++ #if defined(DLL_EXPORT)
++ #if defined(HAVE_FUNC_ATTRIBUTE_DLLEXPORT)
++ #define EXPORT_SYMBOL __declspec(dllexport)
++ #else
++ #define EXPORT_SYMBOL
++ #endif
++ #endif
++ #elif defined(HAVE_FUNC_ATTRIBUTE_VISIBILITY)
++ #define EXPORT_SYMBOL __attribute__ ((visibility ("default")))
++ #endif
++#elif defined(MSC_VER) && !defined(STATIC_LIBBITCOINCONSENSUS)
++ #define EXPORT_SYMBOL __declspec(dllimport)
++#endif
++
++#ifndef EXPORT_SYMBOL
++ #define EXPORT_SYMBOL
++#endif
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#define DOGECOINCONSENSUS_API_VER 0
++
++typedef enum dogecoinconsensus_error_t
++{
++ dogecoinconsensus_ERR_OK = 0,
++ dogecoinconsensus_ERR_TX_INDEX,
++ dogecoinconsensus_ERR_TX_SIZE_MISMATCH,
++ dogecoinconsensus_ERR_TX_DESERIALIZE,
++} dogecoinconsensus_error;
++
++/** Script verification flags */
++enum
++{
++ dogecoinconsensus_SCRIPT_FLAGS_VERIFY_NONE = 0,
++ dogecoinconsensus_SCRIPT_FLAGS_VERIFY_P2SH = (1U << 0), // evaluate P2SH (BIP16) subscripts
++ dogecoinconsensus_SCRIPT_FLAGS_VERIFY_DERSIG = (1U << 2), // enforce strict DER (BIP66) compliance
++};
++
++/// Returns 1 if the input nIn of the serialized transaction pointed to by
++/// txTo correctly spends the scriptPubKey pointed to by scriptPubKey under
++/// the additional constraints specified by flags.
++/// If not NULL, err will contain an error/success code for the operation
++EXPORT_SYMBOL int dogecoinconsensus_verify_script(const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen,
++ const unsigned char *txTo , unsigned int txToLen,
++ unsigned int nIn, unsigned int flags, dogecoinconsensus_error* err);
++
++EXPORT_SYMBOL unsigned int dogecoinconsensus_version();
++
++#ifdef __cplusplus
++} // extern "C"
++#endif
++
++#undef EXPORT_SYMBOL
++
++#endif // BITCOIN_BITCOINCONSENSUS_H
+diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
+index c0614cc..5ffa356 100644
+--- a/src/test/script_tests.cpp
++++ b/src/test/script_tests.cpp
+@@ -16,7 +16,7 @@
+ #include "test/test_bitcoin.h"
+
+ #if defined(HAVE_CONSENSUS_LIB)
+-#include "script/bitcoinconsensus.h"
++#include "script/dogecoinconsensus.h"
+ #endif
+
+ #include <fstream>
+@@ -99,7 +99,7 @@ void DoTest(const CScript& scriptPubKey, const CScript& scriptSig, int flags, bo
+ #if defined(HAVE_CONSENSUS_LIB)
+ CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
+ stream << tx2;
+- BOOST_CHECK_MESSAGE(bitcoinconsensus_verify_script(begin_ptr(scriptPubKey), scriptPubKey.size(), (const unsigned char*)&stream[0], stream.size(), 0, flags, NULL) == expect,message);
++ BOOST_CHECK_MESSAGE(dogecoinconsensus_verify_script(begin_ptr(scriptPubKey), scriptPubKey.size(), (const unsigned char*)&stream[0], stream.size(), 0, flags, NULL) == expect,message);
+ #endif
+ }
+
+--
+1.9.1
+
diff --git a/patches/0003-reproducible-build.patch b/patches/0003-reproducible-build.patch
new file mode 100644
index 0000000..6217e4b
--- /dev/null
+++ b/patches/0003-reproducible-build.patch
@@ -0,0 +1,11 @@
+--- a/src/leveldb/build_detect_platform
++++ b/src/leveldb/build_detect_platform
+@@ -176,7 +176,7 @@
+ PRUNE_TEST="-name *test*.cc -prune"
+ PRUNE_BENCH="-name *_bench.cc -prune"
+ PRUNE_TOOL="-name leveldb_main.cc -prune"
+-PORTABLE_FILES=`find $DIRS $PRUNE_TEST -o $PRUNE_BENCH -o $PRUNE_TOOL -o -name '*.cc' -print | sort | sed "s,^$PREFIX/,," | tr "\n" " "`
++PORTABLE_FILES=`find $DIRS $PRUNE_TEST -o $PRUNE_BENCH -o $PRUNE_TOOL -o -name '*.cc' -print | LC_ALL=C sort | sed "s,^$PREFIX/,," | tr "\n" " "`
+
+ set +f # re-enable globbing
+
diff --git a/patches/0004-rename-RAND_egd.patch b/patches/0004-rename-RAND_egd.patch
new file mode 100644
index 0000000..e366154
--- /dev/null
+++ b/patches/0004-rename-RAND_egd.patch
@@ -0,0 +1,17 @@
+--- dogecoin-1.10.4.orig/configure.ac
++++ dogecoin-1.10.4/configure.ac
+@@ -679,14 +679,6 @@
+ fi
+ fi
+
+-AC_CHECK_LIB([crypto],[RAND_egd],[],[
+- AC_ARG_WITH([libressl],
+- [AS_HELP_STRING([--with-libressl],[Build with system LibreSSL (default is no; DANGEROUS; NOT SUPPORTED)])],
+- [AC_MSG_WARN([Detected LibreSSL: This is NOT supported, and may break consensus compatibility!])],
+- [AC_MSG_ERROR([Detected LibreSSL: This is NOT supported, and may break consensus compatibility!])]
+- )
+-])
+-
+ CFLAGS_TEMP="$CFLAGS"
+ LIBS_TEMP="$LIBS"
+ CFLAGS="$CFLAGS $SSL_CFLAGS $CRYPTO_CFLAGS"
diff --git a/patches/0005-openssl_1_1_fixes.patch b/patches/0005-openssl_1_1_fixes.patch
new file mode 100644
index 0000000..11739cf
--- /dev/null
+++ b/patches/0005-openssl_1_1_fixes.patch
@@ -0,0 +1,126 @@
+--- dogecoin-1.10.0.orig/src/ecwrapper.cpp
++++ dogecoin-1.10.0/src/ecwrapper.cpp
+@@ -18,7 +18,7 @@
+ * recid selects which key is recovered
+ * if check is non-zero, additional checks are performed
+ */
+-int ECDSA_SIG_recover_key_GFp(EC_KEY *eckey, ECDSA_SIG *ecsig, const unsigned char *msg, int msglen, int recid, int check)
++int ECDSA_SIG_recover_key_GFp(EC_KEY *eckey, ECDSA_SIG *ecsig, const BIGNUM *r, const BIGNUM *s, const unsigned char *msg, int msglen, int recid, int check)
+ {
+ if (!eckey) return 0;
+
+@@ -36,6 +36,7 @@
+ EC_POINT *Q = NULL;
+ BIGNUM *rr = NULL;
+ BIGNUM *zero = NULL;
++
+ int n = 0;
+ int i = recid / 2;
+
+@@ -47,7 +48,7 @@
+ x = BN_CTX_get(ctx);
+ if (!BN_copy(x, order)) { ret=-1; goto err; }
+ if (!BN_mul_word(x, i)) { ret=-1; goto err; }
+- if (!BN_add(x, x, ecsig->r)) { ret=-1; goto err; }
++ if (!BN_add(x, x, r)) { ret=-1; goto err; }
+ field = BN_CTX_get(ctx);
+ if (!EC_GROUP_get_curve_GFp(group, field, NULL, NULL, ctx)) { ret=-2; goto err; }
+ if (BN_cmp(x, field) >= 0) { ret=0; goto err; }
+@@ -68,9 +69,9 @@
+ if (!BN_zero(zero)) { ret=-1; goto err; }
+ if (!BN_mod_sub(e, zero, e, order, ctx)) { ret=-1; goto err; }
+ rr = BN_CTX_get(ctx);
+- if (!BN_mod_inverse(rr, ecsig->r, order, ctx)) { ret=-1; goto err; }
++ if (!BN_mod_inverse(rr, r, order, ctx)) { ret=-1; goto err; }
+ sor = BN_CTX_get(ctx);
+- if (!BN_mod_mul(sor, ecsig->s, rr, order, ctx)) { ret=-1; goto err; }
++ if (!BN_mod_mul(sor, s, rr, order, ctx)) { ret=-1; goto err; }
+ eor = BN_CTX_get(ctx);
+ if (!BN_mod_mul(eor, e, rr, order, ctx)) { ret=-1; goto err; }
+ if (!EC_POINT_mul(group, Q, eor, R, sor, ctx)) { ret=-2; goto err; }
+@@ -152,9 +153,10 @@
+ if (rec<0 || rec>=3)
+ return false;
+ ECDSA_SIG *sig = ECDSA_SIG_new();
+- BN_bin2bn(&p64[0], 32, sig->r);
+- BN_bin2bn(&p64[32], 32, sig->s);
+- bool ret = ECDSA_SIG_recover_key_GFp(pkey, sig, (unsigned char*)&hash, sizeof(hash), rec, 0) == 1;
++ BIGNUM *r, *s;
++ BN_bin2bn(&p64[0], 32, r);
++ BN_bin2bn(&p64[32], 32, s);
++ bool ret = ECDSA_SIG_recover_key_GFp(pkey, sig, r, s, (unsigned char*)&hash, sizeof(hash), rec, 0) == 1;
+ ECDSA_SIG_free(sig);
+ return ret;
+ }
+--- dogecoin-1.10.0.orig/src/wallet/crypter.cpp
++++ dogecoin-1.10.0/src/wallet/crypter.cpp
+@@ -58,15 +58,17 @@
+ int nCLen = nLen + AES_BLOCK_SIZE, nFLen = 0;
+ vchCiphertext = std::vector<unsigned char> (nCLen);
+
+- EVP_CIPHER_CTX ctx;
++ EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();
++ if(!ctx) return false;
+
+ bool fOk = true;
+
+- EVP_CIPHER_CTX_init(&ctx);
+- if (fOk) fOk = EVP_EncryptInit_ex(&ctx, EVP_aes_256_cbc(), NULL, chKey, chIV) != 0;
+- if (fOk) fOk = EVP_EncryptUpdate(&ctx, &vchCiphertext[0], &nCLen, &vchPlaintext[0], nLen) != 0;
+- if (fOk) fOk = EVP_EncryptFinal_ex(&ctx, (&vchCiphertext[0]) + nCLen, &nFLen) != 0;
+- EVP_CIPHER_CTX_cleanup(&ctx);
++ EVP_CIPHER_CTX_init(ctx);
++ if (fOk) fOk = EVP_EncryptInit_ex(ctx, EVP_aes_256_cbc(), NULL, chKey, chIV) != 0;
++ if (fOk) fOk = EVP_EncryptUpdate(ctx, &vchCiphertext[0], &nCLen, &vchPlaintext[0], nLen) != 0;
++ if (fOk) fOk = EVP_EncryptFinal_ex(ctx, (&vchCiphertext[0]) + nCLen, &nFLen) != 0;
++ EVP_CIPHER_CTX_cleanup(ctx);
++ EVP_CIPHER_CTX_free(ctx);
+
+ if (!fOk) return false;
+
+@@ -85,15 +87,15 @@
+
+ vchPlaintext = CKeyingMaterial(nPLen);
+
+- EVP_CIPHER_CTX ctx;
++ EVP_CIPHER_CTX *ctx;
+
+ bool fOk = true;
+
+- EVP_CIPHER_CTX_init(&ctx);
+- if (fOk) fOk = EVP_DecryptInit_ex(&ctx, EVP_aes_256_cbc(), NULL, chKey, chIV) != 0;
+- if (fOk) fOk = EVP_DecryptUpdate(&ctx, &vchPlaintext[0], &nPLen, &vchCiphertext[0], nLen) != 0;
+- if (fOk) fOk = EVP_DecryptFinal_ex(&ctx, (&vchPlaintext[0]) + nPLen, &nFLen) != 0;
+- EVP_CIPHER_CTX_cleanup(&ctx);
++ EVP_CIPHER_CTX_init(ctx);
++ if (fOk) fOk = EVP_DecryptInit_ex(ctx, EVP_aes_256_cbc(), NULL, chKey, chIV) != 0;
++ if (fOk) fOk = EVP_DecryptUpdate(ctx, &vchPlaintext[0], &nPLen, &vchCiphertext[0], nLen) != 0;
++ if (fOk) fOk = EVP_DecryptFinal_ex(ctx, (&vchPlaintext[0]) + nPLen, &nFLen) != 0;
++ EVP_CIPHER_CTX_cleanup(ctx);
+
+ if (!fOk) return false;
+
+--- dogecoin-1.10.0.orig/src/qt/paymentrequestplus.cpp
++++ dogecoin-1.10.0/src/qt/paymentrequestplus.cpp
+@@ -161,14 +161,16 @@
+ std::string data_to_verify; // Everything but the signature
+ rcopy.SerializeToString(&data_to_verify);
+
+- EVP_MD_CTX ctx;
++ EVP_MD_CTX *ctx = EVP_MD_CTX_new();
+ EVP_PKEY *pubkey = X509_get_pubkey(signing_cert);
+- EVP_MD_CTX_init(&ctx);
+- if (!EVP_VerifyInit_ex(&ctx, digestAlgorithm, NULL) ||
+- !EVP_VerifyUpdate(&ctx, data_to_verify.data(), data_to_verify.size()) ||
+- !EVP_VerifyFinal(&ctx, (const unsigned char*)paymentRequest.signature().data(), (unsigned int)paymentRequest.signature().size(), pubkey)) {
++ EVP_MD_CTX_init(ctx);
++ if (!EVP_VerifyInit_ex(ctx, digestAlgorithm, NULL) ||
++ !EVP_VerifyUpdate(ctx, data_to_verify.data(), data_to_verify.size()) ||
++ !EVP_VerifyFinal(ctx, (const unsigned char*)paymentRequest.signature().data(), (unsigned int)paymentRequest.signature().size(), pubkey)) {
++ EVP_MD_CTX_free(ctx);
+ throw SSLVerifyError("Bad signature, invalid payment request.");
+ }
++ EVP_MD_CTX_free(ctx);
+
+ // OpenSSL API for getting human printable strings from certs is baroque.
+ int textlen = X509_NAME_get_text_by_NID(certname, NID_commonName, NULL, 0);
diff --git a/patches/0006-fix_ftbfs.patch b/patches/0006-fix_ftbfs.patch
new file mode 100644
index 0000000..6695dcc
--- /dev/null
+++ b/patches/0006-fix_ftbfs.patch
@@ -0,0 +1,78 @@
+Description: Fix FTBFS
+ Fix some API usages that changed between Boost 1.62 and Boost 1.67.
+Author: Giovanni Mascellani <gio@debian.org>
+Bug-Debian: https://bugs.debian.org/914146
+
+--- dogecoin-1.10.0.orig/src/bitcoin-cli.cpp
++++ dogecoin-1.10.0/src/bitcoin-cli.cpp
+@@ -105,7 +105,7 @@ Object CallRPC(const string& strMethod,
+ // Connect to localhost
+ bool fUseSSL = GetBoolArg("-rpcssl", false);
+ boost::asio::io_service io_service;
+- boost::asio::ssl::context context(io_service, boost::asio::ssl::context::sslv23);
++ boost::asio::ssl::context context(boost::asio::ssl::context::sslv23);
+ context.set_options(boost::asio::ssl::context::no_sslv2 | boost::asio::ssl::context::no_sslv3);
+ boost::asio::ssl::stream<boost::asio::ip::tcp::socket> sslStream(io_service, context);
+ SSLIOStreamDevice<boost::asio::ip::tcp> d(sslStream, fUseSSL);
+--- dogecoin-1.10.0.orig/src/rpcserver.cpp
++++ dogecoin-1.10.0/src/rpcserver.cpp
+@@ -503,8 +503,8 @@ private:
+ void ServiceConnection(AcceptedConnection *conn);
+
+ //! Forward declaration required for RPCListen
+-template <typename Protocol, typename SocketAcceptorService>
+-static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
++template <typename Protocol>
++static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol> > acceptor,
+ ssl::context& context,
+ bool fUseSSL,
+ boost::shared_ptr< AcceptedConnection > conn,
+@@ -513,8 +513,8 @@ static void RPCAcceptHandler(boost::shar
+ /**
+ * Sets up I/O resources to accept and handle a new connection.
+ */
+-template <typename Protocol, typename SocketAcceptorService>
+-static void RPCListen(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
++template <typename Protocol>
++static void RPCListen(boost::shared_ptr< basic_socket_acceptor<Protocol> > acceptor,
+ ssl::context& context,
+ const bool fUseSSL)
+ {
+@@ -524,7 +524,7 @@ static void RPCListen(boost::shared_ptr<
+ acceptor->async_accept(
+ conn->sslStream.lowest_layer(),
+ conn->peer,
+- boost::bind(&RPCAcceptHandler<Protocol, SocketAcceptorService>,
++ boost::bind(&RPCAcceptHandler<Protocol>,
+ acceptor,
+ boost::ref(context),
+ fUseSSL,
+@@ -536,8 +536,8 @@ static void RPCListen(boost::shared_ptr<
+ /**
+ * Accept and handle incoming connection.
+ */
+-template <typename Protocol, typename SocketAcceptorService>
+-static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
++template <typename Protocol>
++static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol> > acceptor,
+ ssl::context& context,
+ const bool fUseSSL,
+ boost::shared_ptr< AcceptedConnection > conn,
+@@ -631,7 +631,7 @@ void StartRPCThreads()
+
+ assert(rpc_io_service == NULL);
+ rpc_io_service = new boost::asio::io_service();
+- rpc_ssl_context = new ssl::context(*rpc_io_service, ssl::context::sslv23);
++ rpc_ssl_context = new ssl::context(ssl::context::sslv23);
+
+ const bool fUseSSL = GetBoolArg("-rpcssl", false);
+
+@@ -650,7 +650,7 @@ void StartRPCThreads()
+ else LogPrintf("ThreadRPCServer ERROR: missing server private key file %s\n", pathPKFile.string());
+
+ string strCiphers = GetArg("-rpcsslciphers", "TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH");
+- SSL_CTX_set_cipher_list(rpc_ssl_context->impl(), strCiphers.c_str());
++ SSL_CTX_set_cipher_list(rpc_ssl_context->native_handle(), strCiphers.c_str());
+ }
+
+ std::vector<ip::tcp::endpoint> vEndpoints;
diff --git a/patches/series b/patches/series
new file mode 100644
index 0000000..efa699d
--- /dev/null
+++ b/patches/series
@@ -0,0 +1,6 @@
+0001-configure.ac_use_PIC.patch
+0002-rename-libbitcoinconsensus-to-libdogecoinconsensus.patch
+0003-reproducible-build.patch
+0004-rename-RAND_egd.patch
+0005-openssl_1_1_fixes.patch
+0006-fix_ftbfs.patch
diff --git a/rules b/rules
new file mode 100755
index 0000000..af3b8f5
--- /dev/null
+++ b/rules
@@ -0,0 +1,26 @@
+#!/usr/bin/make -f
+#DH_VERBOSE = 1
+
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/default.mk
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
+export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+
+%:
+ dh $@ --with autoreconf
+
+override_dh_auto_configure:
+ ./autogen.sh
+ dh_auto_configure -- --with-incompatible-bdb --with-gui=qt5 --enable-upnp-default --disable-tests
+
+override_dh_auto_install:
+ dh_auto_install
+ rm -f $(CURDIR)/debian/dogecoin/usr/bin/test_dogecoin
+ rm -f $(CURDIR)/debian/dogecoin/usr/bin/test_dogecoin-qt
+ find $(CURDIR)/debian/dogecoin/ -name libdogecoinconsensus.la -exec rm -f {} \;
+
+override_dh_install:
+ dh_install
+ mv $(CURDIR)/debian/dogecoin/usr/share/pixmaps/bitcoin128.png $(CURDIR)/debian/dogecoin/usr/share/pixmaps/dogecoin128.png
diff --git a/source/format b/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/source/include-binaries b/source/include-binaries
new file mode 100644
index 0000000..805b43e
--- /dev/null
+++ b/source/include-binaries
@@ -0,0 +1 @@
+share/pixmaps/dogecoin128.png
diff --git a/watch b/watch
new file mode 100644
index 0000000..8d3f183
--- /dev/null
+++ b/watch
@@ -0,0 +1,4 @@
+version=3
+
+opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/dogecoin-$1\.tar\.gz/ \
+ https://github.com/dogecoin/dogecoin/tags .*/v?([\d\.]*)\.tar\.gz