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

Contents of /net-p2p/bitcoind/bitcoind-0.6.4_rc4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Thu Dec 6 13:21:24 2012 UTC (16 months, 1 week ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Version bumps

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

1 blueness 1.1 # Copyright 2010-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 blueness 1.2 # $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoind/bitcoind-0.6.4_rc4.ebuild,v 1.1 2012/10/29 01:31:05 blueness 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="http://gitorious.org/bitcoin/bitcoind-stable/archive-tarball/392d30f0 -> 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     LICENSE="MIT ISC GPL-2"
19     SLOT="0"
20     KEYWORDS="~amd64 ~arm ~x86"
21     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-bitcoind-stable"
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     # Workaround for bug #440034
77     share/genbuild.sh src/obj/build.h
78    
79     cd src || die
80     emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" ${PN}
81     }
82    
83     src_test() {
84     cd src || die
85     emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" test_bitcoin
86     ./test_bitcoin || die 'Tests failed'
87     }
88    
89     src_install() {
90     dobin src/${PN}
91    
92     insinto /etc/bitcoin
93     newins "${FILESDIR}/bitcoin.conf" bitcoin.conf
94     fowners bitcoin:bitcoin /etc/bitcoin/bitcoin.conf
95     fperms 600 /etc/bitcoin/bitcoin.conf
96    
97     newconfd "${FILESDIR}/bitcoin.confd" ${PN}
98     newinitd "${FILESDIR}/bitcoin.initd" ${PN}
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
107    
108     if use examples; then
109     docinto examples
110     dodoc -r contrib/{bitrpc,pyminer,wallettools}
111     fi
112    
113     if use logrotate; then
114     insinto /etc/logrotate.d
115     newins "${FILESDIR}/bitcoind.logrotate" bitcoind
116     fi
117     }

  ViewVC Help
Powered by ViewVC 1.1.20