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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Tue Sep 18 20:47:49 2012 UTC (23 months ago) by johu
Branch: MAIN
Changes since 1.3: +2 -2 lines
Stable for x86, wrt bug #429188

(Portage version: 2.2.0_alpha129/cvs/Linux x86_64)

1 blueness 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 johu 1.4 # $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoind/bitcoind-0.6.3.ebuild,v 1.3 2012/09/15 15:05:41 ago Exp $
4 blueness 1.1
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="https://nodeload.github.com/bitcoin/bitcoin/tarball/v${PV/_/} -> bitcoin-v${PV}.tgz
14     eligius? ( http://luke.dashjr.org/programs/bitcoin/files/bitcoind/eligius/sendfee/0.6.1-eligius_sendfee.patch.xz )
15     logrotate? ( https://github.com/bitcoin/bitcoin/commit/9af080c351c40a4f56d37174253d33a9f4ffdb69.diff -> 0.6.3-reopen_log_file.patch )
16     "
17    
18 blueness 1.2 LICENSE="MIT ISC GPL-2"
19 blueness 1.1 SLOT="0"
20 johu 1.4 KEYWORDS="amd64 ~arm x86"
21 blueness 1.1 IUSE="+eligius examples logrotate upnp"
22    
23     RDEPEND="
24     >=dev-libs/boost-1.41.0
25     dev-libs/openssl[-bindist]
26     logrotate? (
27     app-admin/logrotate
28     )
29     upnp? (
30     net-libs/miniupnpc
31     )
32     sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
33     "
34     DEPEND="${RDEPEND}
35     >=app-shells/bash-4.1
36     "
37    
38     S="${WORKDIR}/bitcoin-bitcoin-bbe1084"
39    
40     pkg_setup() {
41     local UG='bitcoin'
42     enewgroup "${UG}"
43     enewuser "${UG}" -1 -1 /var/lib/bitcoin "${UG}"
44     }
45    
46     src_prepare() {
47     cd src || die
48     use eligius && epatch "${WORKDIR}/0.6.1-eligius_sendfee.patch"
49     use logrotate && epatch "${DISTDIR}/0.6.3-reopen_log_file.patch"
50     }
51    
52     src_compile() {
53     OPTS=()
54     local BOOST_PKG BOOST_VER BOOST_INC
55    
56     OPTS+=("DEBUGFLAGS=")
57     OPTS+=("CXXFLAGS=${CXXFLAGS}")
58     OPTS+=("LDFLAGS=${LDFLAGS}")
59    
60     OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")")
61     OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}")
62    
63     BOOST_PKG="$(best_version 'dev-libs/boost')"
64     BOOST_VER="$(get_version_component_range 1-2 "${BOOST_PKG/*boost-/}")"
65     BOOST_VER="$(replace_all_version_separators _ "${BOOST_VER}")"
66     BOOST_INC="/usr/include/boost-${BOOST_VER}"
67     OPTS+=("BOOST_INCLUDE_PATH=${BOOST_INC}")
68     OPTS+=("BOOST_LIB_SUFFIX=-${BOOST_VER}")
69    
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