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

Contents of /net-p2p/bitcoind/bitcoind-0.5.7_rc3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sun Apr 7 23:18:41 2013 UTC (19 months, 2 weeks ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Version bumps and cleanup

(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.5.7_rc3.ebuild,v 1.2 2013/01/13 22:34:40 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 bip16? ( http://luke.dashjr.org/programs/bitcoin/files/bip16/0.5.6-Minimal-support-for-mining-BIP16-pay-to-script-hash-.patch.xz )
15 eligius? (
16 !bip16? ( http://luke.dashjr.org/programs/bitcoin/files/eligius_sendfee/0.5.0.6rc1-eligius_sendfee.patch.xz )
17 )
18 "
19
20 LICENSE="MIT ISC GPL-2"
21 SLOT="0"
22 KEYWORDS="~amd64 ~arm ~x86"
23 IUSE="+bip16 +eligius examples logrotate ssl upnp"
24
25 RDEPEND="
26 >=dev-libs/boost-1.41.0[threads(+)]
27 dev-libs/openssl[-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 "
36 DEPEND="${RDEPEND}
37 >=app-shells/bash-4.1
38 "
39
40 S="${WORKDIR}/bitcoin-bitcoind-stable"
41
42 pkg_setup() {
43 local UG='bitcoin'
44 enewgroup "${UG}"
45 enewuser "${UG}" -1 -1 /var/lib/bitcoin "${UG}"
46 }
47
48 src_prepare() {
49 cd src || die
50 if use bip16; then
51 epatch "${WORKDIR}/0.5.6-Minimal-support-for-mining-BIP16-pay-to-script-hash-.patch"
52 use eligius && epatch "${FILESDIR}/0.5.0.5+bip16-eligius_sendfee.patch"
53 else
54 use eligius && epatch "${WORKDIR}/0.5.0.6rc1-eligius_sendfee.patch"
55 fi
56 use logrotate && epatch "${FILESDIR}/0.4.7-reopen_log_file.patch"
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 use ssl && OPTS+=(USE_SSL=1)
70 if use upnp; then
71 OPTS+=(USE_UPNP=1)
72 else
73 OPTS+=(USE_UPNP=)
74 fi
75
76 cd src || die
77 emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" ${PN}
78 }
79
80 src_test() {
81 cd src || die
82 emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" test_bitcoin
83 ./test_bitcoin || die 'Tests failed'
84 }
85
86 src_install() {
87 dobin src/${PN}
88
89 insinto /etc/bitcoin
90 newins "${FILESDIR}/bitcoin.conf" bitcoin.conf
91 fowners bitcoin:bitcoin /etc/bitcoin/bitcoin.conf
92 fperms 600 /etc/bitcoin/bitcoin.conf
93
94 newconfd "${FILESDIR}/bitcoin.confd" ${PN}
95 newinitd "${FILESDIR}/bitcoin.initd" ${PN}
96
97 keepdir /var/lib/bitcoin/.bitcoin
98 fperms 700 /var/lib/bitcoin
99 fowners bitcoin:bitcoin /var/lib/bitcoin/
100 fowners bitcoin:bitcoin /var/lib/bitcoin/.bitcoin
101 dosym /etc/bitcoin/bitcoin.conf /var/lib/bitcoin/.bitcoin/bitcoin.conf
102
103 dodoc doc/README
104
105 if use examples; then
106 docinto examples
107 dodoc -r contrib/{bitrpc,pyminer,wallettools}
108 fi
109
110 if use logrotate; then
111 insinto /etc/logrotate.d
112 newins "${FILESDIR}/bitcoind.logrotate" bitcoind
113 fi
114 }

  ViewVC Help
Powered by ViewVC 1.1.20