dogecoind-1.7.0-r1 now based on bitcoin 0.9
authorJustin Wind <justin.wind+git@gmail.com>
Tue, 20 May 2014 17:12:40 +0000 (10:12 -0700)
committerJustin Wind <justin.wind+git@gmail.com>
Tue, 20 May 2014 17:12:40 +0000 (10:12 -0700)
net-p2p/dogecoind/dogecoind-1.7.0-r1.ebuild [new file with mode: 0755]

diff --git a/net-p2p/dogecoind/dogecoind-1.7.0-r1.ebuild b/net-p2p/dogecoind/dogecoind-1.7.0-r1.ebuild
new file mode 100755 (executable)
index 0000000..911ea5f
--- /dev/null
@@ -0,0 +1,109 @@
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+DB_VER="5.1"
+
+inherit autotools bash-completion-r1 db-use eutils versionator systemd user
+
+MyPV="${PV/_/}"
+MyPN="dogecoin"
+MyP="${MyPN}-${MyPV}"
+
+DESCRIPTION="P2P Internet currency based on Bitcoin but wow such doge"
+HOMEPAGE="https://dogecoin.com/"
+SRC_URI="https://github.com/${MyPN}/${MyPN}/archive/v${MyPV}.tar.gz -> ${MyPN}-v${PV}.tgz"
+
+LICENSE="MIT ISC GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="bash-completion debug examples ipv6 logrotate upnp +wallet"
+
+RDEPEND="
+       >=dev-libs/boost-1.41.0[threads(+)]
+       dev-libs/openssl:0[-bindist]
+       logrotate? (
+               app-admin/logrotate
+       )
+       upnp? (
+               net-libs/miniupnpc
+       )
+       sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
+"
+DEPEND="${RDEPEND}
+       >=app-shells/bash-4.1
+       sys-apps/sed
+"
+
+S="${WORKDIR}/${MyP}"
+
+pkg_setup() {
+       local UG='dogecoin'
+       enewgroup "${UG}"
+       enewuser "${UG}" -1 -1 /var/lib/dogecoin "${UG}"
+}
+
+src_prepare() {
+       # bitcoin for some reason doesn't use embedded leveldb
+       # but we will, because version/bug pinning is a good thing
+#      rm -r src/leveldb
+#      sed -e 's/^\(LIBLEVELDB=\).*$/\1-lleveldb/' \
+#              -e 's/^\(LIBMEMENV=\).*$/\1-lmemenv/' \
+#              -e 's/^\(AM_CONDITIONAL(\[EMBEDDED_LEVELDB\],\[\).*\(\])\)$/\1false\2/' \
+#              -i configure.ac
+
+       eautoreconf
+}
+
+src_configure() {
+       econf \
+               --disable-silent-rules \
+               $(use_enable wallet) \
+               $(use_enable ipv6) \
+               $(use_enable test tests) \
+               --disable-hardening \
+               --disable-ccache \
+               $(use_enable debug) \
+               $(use_with upnp miniupnpc) \
+               --without-gui
+}
+
+src_test() {
+       emake check
+}
+
+src_install() {
+       dobin "src/${PN}"
+
+       insinto /etc/dogecoin
+       newins "${FILESDIR}/dogecoin.conf" dogecoin.conf
+       fowners dogecoin:dogecoin /etc/dogecoin/dogecoin.conf
+       fperms 600 /etc/dogecoin/dogecoin.conf
+
+       newconfd "${FILESDIR}/dogecoin.confd" "${PN}"
+       newinitd "${FILESDIR}/dogecoin.initd-r1" "${PN}"
+       systemd_dounit "${FILESDIR}/dogecoind.service"
+
+       keepdir /var/lib/dogecoin/.dogecoin
+       fperms 700 /var/lib/dogecoin
+       fowners dogecoin:dogecoin /var/lib/dogecoin/
+       fowners dogecoin:dogecoin /var/lib/dogecoin/.dogecoin
+       dosym /etc/dogecoin/dogecoin.conf /var/lib/dogecoin/.dogecoin/dogecoin.conf
+
+       dodoc doc/README.md doc/release-notes.md
+       doman contrib/debian/manpages/{dogecoind.1,dogecoin.conf.5}
+
+       if use bash-completion; then
+               newbashcomp "contrib/${PN}.bash-completion" "${PN}"
+       fi
+
+       if use examples; then
+               docinto examples
+               dodoc -r contrib/{README.md,bitrpc,pyminer,spendfrom,linearize,qos}
+       fi
+
+       if use logrotate; then
+               insinto /etc/logrotate.d
+               newins "${FILESDIR}/dogecoind.logrotate" dogecoind
+       fi
+}