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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Apr 14 18:49:43 2013 UTC (16 months, 2 weeks 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 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.7.3_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}.tgz
14 "
15
16 LICENSE="MIT ISC GPL-2"
17 SLOT="0"
18 KEYWORDS="~amd64 ~arm ~x86"
19 IUSE="examples ipv6 logrotate upnp"
20
21 RDEPEND="
22 >=dev-libs/boost-1.41.0[threads(+)]
23 dev-libs/openssl:0[-bindist]
24 logrotate? (
25 app-admin/logrotate
26 )
27 upnp? (
28 net-libs/miniupnpc
29 )
30 sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
31 "
32 DEPEND="${RDEPEND}
33 >=app-shells/bash-4.1
34 "
35
36 S="${WORKDIR}/bitcoin-bitcoind-stable"
37
38 pkg_setup() {
39 local UG='bitcoin'
40 enewgroup "${UG}"
41 enewuser "${UG}" -1 -1 /var/lib/bitcoin "${UG}"
42 }
43
44 src_compile() {
45 OPTS=()
46
47 OPTS+=("DEBUGFLAGS=")
48 OPTS+=("CXXFLAGS=${CXXFLAGS}")
49 OPTS+=("LDFLAGS=${LDFLAGS}")
50
51 OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")")
52 OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}")
53
54 if use upnp; then
55 OPTS+=(USE_UPNP=1)
56 else
57 OPTS+=(USE_UPNP=)
58 fi
59 use ipv6 || OPTS+=("USE_IPV6=-")
60
61 # Workaround for bug #440034
62 share/genbuild.sh src/obj/build.h
63
64 cd src || die
65 emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" ${PN}
66 }
67
68 src_test() {
69 cd src || die
70 emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" test_bitcoin
71 ./test_bitcoin || die 'Tests failed'
72 }
73
74 src_install() {
75 dobin src/${PN}
76
77 insinto /etc/bitcoin
78 newins "${FILESDIR}/bitcoin.conf" bitcoin.conf
79 fowners bitcoin:bitcoin /etc/bitcoin/bitcoin.conf
80 fperms 600 /etc/bitcoin/bitcoin.conf
81
82 newconfd "${FILESDIR}/bitcoin.confd" ${PN}
83 newinitd "${FILESDIR}/bitcoin.initd" ${PN}
84
85 keepdir /var/lib/bitcoin/.bitcoin
86 fperms 700 /var/lib/bitcoin
87 fowners bitcoin:bitcoin /var/lib/bitcoin/
88 fowners bitcoin:bitcoin /var/lib/bitcoin/.bitcoin
89 dosym /etc/bitcoin/bitcoin.conf /var/lib/bitcoin/.bitcoin/bitcoin.conf
90
91 dodoc doc/README
92
93 if use examples; then
94 docinto examples
95 dodoc -r contrib/{bitrpc,pyminer,wallettools}
96 fi
97
98 if use logrotate; then
99 insinto /etc/logrotate.d
100 newins "${FILESDIR}/bitcoind.logrotate" bitcoind
101 fi
102 }

  ViewVC Help
Powered by ViewVC 1.1.20