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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Tue Feb 19 12:44:52 2013 UTC (20 months ago) by blueness
Branch: MAIN
Changes since 1.1: +2 -2 lines
Keyword ~arm since dev-libs/leveldb is now keyworded

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

1 blueness 1.1 # Copyright 2010-2013 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.8.0.ebuild,v 1.1 2013/02/19 12:20:02 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     MyPV="${PV/_/}"
12     MyPN="bitcoin"
13     MyP="${MyPN}-${MyPV}"
14    
15     DESCRIPTION="Original Bitcoin crypto-currency wallet for automated services"
16     HOMEPAGE="http://bitcoin.org/"
17     SRC_URI="https://github.com/${MyPN}/${MyPN}/archive/v${MyPV}.tar.gz -> ${MyPN}-v${PV}.tgz
18     "
19    
20     LICENSE="MIT ISC GPL-2"
21     SLOT="0"
22 blueness 1.2 KEYWORDS="~amd64 ~arm ~x86"
23 blueness 1.1 IUSE="examples ipv6 logrotate 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     =dev-libs/leveldb-1.9.0*
36     "
37     DEPEND="${RDEPEND}
38     >=app-shells/bash-4.1
39     "
40    
41     S="${WORKDIR}/${MyP}"
42    
43     pkg_setup() {
44     local UG='bitcoin'
45     enewgroup "${UG}"
46     enewuser "${UG}" -1 -1 /var/lib/bitcoin "${UG}"
47     }
48    
49     src_prepare() {
50     epatch "${FILESDIR}/${PV}-sys_leveldb.patch"
51     rm -r src/leveldb
52     }
53    
54     src_compile() {
55     OPTS=()
56    
57     OPTS+=("DEBUGFLAGS=")
58     OPTS+=("CXXFLAGS=${CXXFLAGS}")
59     OPTS+=("LDFLAGS=${LDFLAGS}")
60    
61     OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")")
62     OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}")
63    
64     if use upnp; then
65     OPTS+=(USE_UPNP=1)
66     else
67     OPTS+=(USE_UPNP=)
68     fi
69     use ipv6 || OPTS+=("USE_IPV6=-")
70    
71     OPTS+=("USE_SYSTEM_LEVELDB=1")
72    
73     cd src || die
74     emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" ${PN}
75     }
76    
77     src_test() {
78     cd src || die
79     emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" test_bitcoin
80     ./test_bitcoin || die 'Tests failed'
81     }
82    
83     src_install() {
84     dobin src/${PN}
85    
86     insinto /etc/bitcoin
87     newins "${FILESDIR}/bitcoin.conf" bitcoin.conf
88     fowners bitcoin:bitcoin /etc/bitcoin/bitcoin.conf
89     fperms 600 /etc/bitcoin/bitcoin.conf
90    
91     newconfd "${FILESDIR}/bitcoin.confd" ${PN}
92     newinitd "${FILESDIR}/bitcoin.initd" ${PN}
93    
94     keepdir /var/lib/bitcoin/.bitcoin
95     fperms 700 /var/lib/bitcoin
96     fowners bitcoin:bitcoin /var/lib/bitcoin/
97     fowners bitcoin:bitcoin /var/lib/bitcoin/.bitcoin
98     dosym /etc/bitcoin/bitcoin.conf /var/lib/bitcoin/.bitcoin/bitcoin.conf
99    
100     dodoc doc/README
101    
102     if use examples; then
103     docinto examples
104     dodoc -r contrib/{bitrpc,pyminer,spendfrom,tidy_datadir.sh,wallettools}
105     fi
106    
107     if use logrotate; then
108     insinto /etc/logrotate.d
109     newins "${FILESDIR}/bitcoind.logrotate" bitcoind
110     fi
111     }

  ViewVC Help
Powered by ViewVC 1.1.20