add harvested dev-util/cdecl to save from deprecation
[portage-squeep] / net-p2p / dogecoind / dogecoind-1.8.0.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="5"
6
7 DB_VER="5.1"
8
9 inherit autotools db-use eutils versionator systemd user
10
11 MyPV="${PV/_/}"
12 MyPN="dogecoin"
13 MyP="${MyPN}-${MyPV}"
14
15 DESCRIPTION="P2P Internet currency based on Bitcoin but wow such doge"
16 HOMEPAGE="https://dogecoin.com/"
17 SRC_URI="https://github.com/${MyPN}/${MyPN}/archive/v${MyPV}.tar.gz -> ${MyPN}-v${PV}.tgz"
18
19 LICENSE="MIT ISC GPL-2"
20 SLOT="0"
21 KEYWORDS="~amd64 ~x86"
22 IUSE="debug examples logrotate upnp +wallet test"
23
24 RDEPEND="
25 >=dev-libs/boost-1.48.0[threads(+)]
26 dev-libs/openssl:0[-bindist]
27 logrotate? (
28 app-admin/logrotate
29 )
30 upnp? (
31 net-libs/miniupnpc
32 )
33 wallet? (
34 sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
35 )
36 "
37 DEPEND="${RDEPEND}
38 >=app-shells/bash-4.1
39 sys-apps/sed
40 "
41
42 S="${WORKDIR}/${MyP}"
43
44 pkg_setup() {
45 local UG='dogecoin'
46 enewgroup "${UG}"
47 enewuser "${UG}" -1 -1 /var/lib/dogecoin "${UG}"
48 }
49
50 src_prepare() {
51 eautoreconf
52 }
53
54 src_configure() {
55 econf \
56 $(use_enable wallet) \
57 $(use_enable test tests) \
58 --disable-hardening \
59 $(use_enable debug) \
60 $(use_with upnp miniupnpc) \
61 --with-gui=no
62 }
63
64 src_test() {
65 emake check
66 }
67
68 src_install() {
69 dobin "src/${PN}"
70 dobin "src/dogecoin-cli"
71
72 insinto /etc/dogecoin
73 newins "${FILESDIR}/dogecoin.conf" dogecoin.conf
74 fowners dogecoin:dogecoin /etc/dogecoin/dogecoin.conf
75 fperms 600 /etc/dogecoin/dogecoin.conf
76
77 newconfd "${FILESDIR}/dogecoin.confd" "${PN}"
78 newinitd "${FILESDIR}/dogecoin.initd" "${PN}"
79 # systemd_dounit "${FILESDIR}/dogecoind.service"
80
81 keepdir /var/lib/dogecoin/.dogecoin
82 fperms 700 /var/lib/dogecoin
83 fowners dogecoin:dogecoin /var/lib/dogecoin/
84 fowners dogecoin:dogecoin /var/lib/dogecoin/.dogecoin
85 dosym /etc/dogecoin/dogecoin.conf /var/lib/dogecoin/.dogecoin/dogecoin.conf
86
87 dodoc doc/README.md RELEASE_NOTES_1_8.md
88 # doman contrib/debian/manpages/{dogecoind.1,dogecoin.conf.5}
89
90 # if use bash-completion; then
91 # newbashcomp "contrib/${PN}.bash-completion" "${PN}"
92 # fi
93
94 if use examples; then
95 docinto examples
96 dodoc -r contrib/{README.md,bitrpc,pyminer,spendfrom,linearize,qos}
97 fi
98
99 if use logrotate; then
100 insinto /etc/logrotate.d
101 newins "${FILESDIR}/dogecoind.logrotate" dogecoind
102 fi
103 }