/[gentoo-x86]/net-p2p/bitcoind/bitcoind-0.8.5.ebuild
Gentoo

Contents of /net-p2p/bitcoind/bitcoind-0.8.5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Thu Sep 26 17:30:52 2013 UTC (6 months, 2 weeks ago) by ago
Branch: MAIN
Changes since 1.4: +2 -2 lines
Stable for arm, wrt bug #480096

(Portage version: 2.1.12.2/cvs/Linux ppc64, RepoMan options: --include-arches="arm", signed Manifest commit with key 7194459F)

1 # Copyright 2010-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoind/bitcoind-0.8.5.ebuild,v 1.4 2013/09/22 06:48:39 ago Exp $
4
5 EAPI="4"
6
7 DB_VER="4.8"
8
9 inherit bash-completion-r1 db-use eutils versionator systemd toolchain-funcs
10
11 MyPV="${PV/_/}"
12 MyPN="bitcoin"
13 MyP="${MyPN}-${MyPV}"
14
15 DESCRIPTION="Original Bitcoin crypto-currency wallet for automated services"
16 HOMEPAGE="http://bitcoin.org/"
17 SRC_URI="https://github.com/${MyPN}/${MyPN}/archive/v${MyPV}.tar.gz -> ${MyPN}-v${PV}.tgz
18 "
19
20 LICENSE="MIT ISC GPL-2"
21 SLOT="0"
22 KEYWORDS="amd64 arm x86"
23 IUSE="bash-completion examples ipv6 logrotate upnp"
24
25 RDEPEND="
26 >=dev-libs/boost-1.41.0[threads(+)]
27 dev-libs/openssl:0[-bindist]
28 logrotate? (
29 app-admin/logrotate
30 )
31 upnp? (
32 net-libs/miniupnpc
33 )
34 sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
35 <=dev-libs/leveldb-1.12.0[-snappy]
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='bitcoin'
46 enewgroup "${UG}"
47 enewuser "${UG}" -1 -1 /var/lib/bitcoin "${UG}"
48 }
49
50 src_prepare() {
51 epatch "${FILESDIR}/0.8.2-sys_leveldb.patch"
52 rm -r src/leveldb
53
54 if has_version '>=dev-libs/boost-1.52'; then
55 sed -i 's/\(-l db_cxx\)/-l boost_chrono$(BOOST_LIB_SUFFIX) \1/' src/makefile.unix
56 fi
57 }
58
59 src_compile() {
60 OPTS=()
61
62 OPTS+=("DEBUGFLAGS=")
63 OPTS+=("CXXFLAGS=${CXXFLAGS}")
64 OPTS+=("LDFLAGS=${LDFLAGS}")
65
66 OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")")
67 OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}")
68
69 if use upnp; then
70 OPTS+=(USE_UPNP=1)
71 else
72 OPTS+=(USE_UPNP=)
73 fi
74 use ipv6 || OPTS+=("USE_IPV6=-")
75
76 OPTS+=("USE_SYSTEM_LEVELDB=1")
77
78 cd src || die
79 emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" ${PN}
80 }
81
82 src_test() {
83 cd src || die
84 emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" test_bitcoin
85 ./test_bitcoin || die 'Tests failed'
86 }
87
88 src_install() {
89 dobin src/${PN}
90
91 insinto /etc/bitcoin
92 newins "${FILESDIR}/bitcoin.conf" bitcoin.conf
93 fowners bitcoin:bitcoin /etc/bitcoin/bitcoin.conf
94 fperms 600 /etc/bitcoin/bitcoin.conf
95
96 newconfd "${FILESDIR}/bitcoin.confd" ${PN}
97 newinitd "${FILESDIR}/bitcoin.initd" ${PN}
98 systemd_dounit "${FILESDIR}/bitcoind.service"
99
100 keepdir /var/lib/bitcoin/.bitcoin
101 fperms 700 /var/lib/bitcoin
102 fowners bitcoin:bitcoin /var/lib/bitcoin/
103 fowners bitcoin:bitcoin /var/lib/bitcoin/.bitcoin
104 dosym /etc/bitcoin/bitcoin.conf /var/lib/bitcoin/.bitcoin/bitcoin.conf
105
106 dodoc doc/README.md doc/release-notes.md
107 doman contrib/debian/manpages/{bitcoind.1,bitcoin.conf.5}
108
109 if use bash-completion; then
110 newbashcomp contrib/${PN}.bash-completion ${PN}
111 fi
112
113 if use examples; then
114 docinto examples
115 dodoc -r contrib/{bitrpc,pyminer,spendfrom,tidy_datadir.sh,wallettools}
116 fi
117
118 if use logrotate; then
119 insinto /etc/logrotate.d
120 newins "${FILESDIR}/bitcoind.logrotate" bitcoind
121 fi
122 }

  ViewVC Help
Powered by ViewVC 1.1.20