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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Apr 14 18:49:43 2013 UTC (17 months, 1 week 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.4.9_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
10
11 DESCRIPTION="Original Bitcoin crypto-currency wallet for automated services"
12 HOMEPAGE="http://bitcoin.org/"
13 SRC_URI="http://gitorious.org/bitcoin/${PN}-stable/archive-tarball/v${PV/_/} -> bitcoin-v${PV}.tgz
14 bip16? ( http://luke.dashjr.org/programs/bitcoin/files/bip16/0.4.7-Minimal-support-for-mining-BIP16-pay-to-script-hash-.patch.xz )
15 "
16
17 LICENSE="MIT ISC GPL-2"
18 SLOT="0"
19 KEYWORDS="~amd64 ~x86"
20 IUSE="+bip16 logrotate ssl upnp"
21
22 RDEPEND="
23 >=dev-libs/boost-1.41.0[threads(+)]
24 dev-libs/crypto++
25 dev-libs/openssl:0[-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-${PN}-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 cp "${FILESDIR}/0.4.2-Makefile.gentoo" "Makefile" || die
49 if use bip16; then
50 epatch "${WORKDIR}/0.4.7-Minimal-support-for-mining-BIP16-pay-to-script-hash-.patch"
51 fi
52 use logrotate && epatch "${FILESDIR}/0.4.7-reopen_log_file.patch"
53 }
54
55 src_compile() {
56 local OPTS=()
57
58 OPTS+=("CXXFLAGS=${CXXFLAGS}")
59 OPTS+=( "LDFLAGS=${LDFLAGS}")
60
61 OPTS+=("DB_CXXFLAGS=-I$(db_includedir "${DB_VER}")")
62 OPTS+=("DB_LDFLAGS=-ldb_cxx-${DB_VER}")
63
64 use ssl && OPTS+=(USE_SSL=1)
65 use upnp && OPTS+=(USE_UPNP=1)
66
67 cd src || die
68 emake "${OPTS[@]}" ${PN}
69 }
70
71 src_install() {
72 dobin src/${PN}
73
74 insinto /etc/bitcoin
75 newins "${FILESDIR}/bitcoin.conf" bitcoin.conf
76 fowners bitcoin:bitcoin /etc/bitcoin/bitcoin.conf
77 fperms 600 /etc/bitcoin/bitcoin.conf
78
79 newconfd "${FILESDIR}/bitcoin.confd" ${PN}
80 newinitd "${FILESDIR}/bitcoin.initd" ${PN}
81
82 keepdir /var/lib/bitcoin/.bitcoin
83 fperms 700 /var/lib/bitcoin
84 fowners bitcoin:bitcoin /var/lib/bitcoin/
85 fowners bitcoin:bitcoin /var/lib/bitcoin/.bitcoin
86 dosym /etc/bitcoin/bitcoin.conf /var/lib/bitcoin/.bitcoin/bitcoin.conf
87
88 dodoc doc/README
89
90 if use logrotate; then
91 insinto /etc/logrotate.d
92 newins "${FILESDIR}/bitcoind.logrotate" bitcoind
93 fi
94 }

  ViewVC Help
Powered by ViewVC 1.1.20