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

Contents of /net-p2p/bitcoind/bitcoind-0.6.5_rc2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Apr 14 18:49:43 2013 UTC (17 months ago) by blueness
Branch: MAIN
Changes since 1.1: +2 -2 lines
Fix dependency on openssl, bug #465888

(Portage version: 2.1.11.55/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)

1 # Copyright 1999-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.6.5_rc2.ebuild,v 1.1 2013/04/07 23:18:41 blueness Exp $
4
5 EAPI="4"
6
7 DB_VER="4.8"
8
9 inherit db-use eutils versionator toolchain-funcs
10
11 DESCRIPTION="Original Bitcoin crypto-currency wallet for automated services"
12 HOMEPAGE="http://bitcoin.org/"
13 SRC_URI="http://gitorious.org/bitcoin/bitcoind-stable/archive-tarball/v${PV/_/} -> bitcoin-v${PV}-r1.tgz
14 logrotate? ( https://github.com/bitcoin/bitcoin/commit/9af080c351c40a4f56d37174253d33a9f4ffdb69.diff -> 0.6.3-reopen_log_file.patch )
15 "
16
17 LICENSE="MIT ISC GPL-2"
18 SLOT="0"
19 KEYWORDS="~amd64 ~arm ~x86"
20 IUSE="examples logrotate upnp"
21
22 RDEPEND="
23 >=dev-libs/boost-1.41.0[threads(+)]
24 dev-libs/openssl:0[-bindist]
25 logrotate? (
26 app-admin/logrotate
27 )
28 upnp? (
29 net-libs/miniupnpc
30 )
31 sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
32 "
33 DEPEND="${RDEPEND}
34 >=app-shells/bash-4.1
35 "
36
37 S="${WORKDIR}/bitcoin-bitcoind-stable"
38
39 pkg_setup() {
40 local UG='bitcoin'
41 enewgroup "${UG}"
42 enewuser "${UG}" -1 -1 /var/lib/bitcoin "${UG}"
43 }
44
45 src_prepare() {
46 cd src || die
47 use logrotate && epatch "${DISTDIR}/0.6.3-reopen_log_file.patch"
48 }
49
50 src_compile() {
51 OPTS=()
52
53 OPTS+=("DEBUGFLAGS=")
54 OPTS+=("CXXFLAGS=${CXXFLAGS}")
55 OPTS+=("LDFLAGS=${LDFLAGS}")
56
57 OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")")
58 OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}")
59
60 if use upnp; then
61 OPTS+=(USE_UPNP=1)
62 else
63 OPTS+=(USE_UPNP=)
64 fi
65
66 # Workaround for bug #440034
67 share/genbuild.sh src/obj/build.h
68
69 cd src || die
70 emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" ${PN}
71 }
72
73 src_test() {
74 cd src || die
75 emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" test_bitcoin
76 ./test_bitcoin || die 'Tests failed'
77 }
78
79 src_install() {
80 dobin src/${PN}
81
82 insinto /etc/bitcoin
83 newins "${FILESDIR}/bitcoin.conf" bitcoin.conf
84 fowners bitcoin:bitcoin /etc/bitcoin/bitcoin.conf
85 fperms 600 /etc/bitcoin/bitcoin.conf
86
87 newconfd "${FILESDIR}/bitcoin.confd" ${PN}
88 newinitd "${FILESDIR}/bitcoin.initd" ${PN}
89
90 keepdir /var/lib/bitcoin/.bitcoin
91 fperms 700 /var/lib/bitcoin
92 fowners bitcoin:bitcoin /var/lib/bitcoin/
93 fowners bitcoin:bitcoin /var/lib/bitcoin/.bitcoin
94 dosym /etc/bitcoin/bitcoin.conf /var/lib/bitcoin/.bitcoin/bitcoin.conf
95
96 dodoc doc/README
97
98 if use examples; then
99 docinto examples
100 dodoc -r contrib/{bitrpc,pyminer,wallettools}
101 fi
102
103 if use logrotate; then
104 insinto /etc/logrotate.d
105 newins "${FILESDIR}/bitcoind.logrotate" bitcoind
106 fi
107 }

  ViewVC Help
Powered by ViewVC 1.1.20