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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Mon Oct 8 18:04:56 2012 UTC (2 years, 2 months ago) by blueness
Branch: MAIN
Version bumps to address bug #435216

(Portage version: 2.1.11.9/cvs/Linux x86_64)

1 # Copyright 1999-2012 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.8_rc2.ebuild,v 1.1 2012/09/16 12:30:48 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 eligius? (
16 !bip16? ( http://luke.dashjr.org/programs/bitcoin/files/eligius_sendfee/0.4.5rc1-eligius_sendfee.patch.xz )
17 )
18 "
19
20 LICENSE="MIT ISC GPL-2"
21 SLOT="0"
22 KEYWORDS="~amd64 ~x86"
23 IUSE="+bip16 +eligius logrotate ssl upnp"
24
25 RDEPEND="
26 >=dev-libs/boost-1.41.0
27 dev-libs/crypto++
28 dev-libs/openssl[-bindist]
29 logrotate? (
30 app-admin/logrotate
31 )
32 upnp? (
33 net-libs/miniupnpc
34 )
35 sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
36 "
37 DEPEND="${RDEPEND}
38 >=app-shells/bash-4.1
39 "
40
41 S="${WORKDIR}/bitcoin-${PN}-stable"
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 cd src || die
51 cp "${FILESDIR}/0.4.2-Makefile.gentoo" "Makefile" || die
52 if use bip16; then
53 epatch "${WORKDIR}/0.4.7-Minimal-support-for-mining-BIP16-pay-to-script-hash-.patch"
54 use eligius && epatch "${FILESDIR}/0.4.4+bip16-eligius_sendfee.patch"
55 else
56 use eligius && epatch "${WORKDIR}/0.4.5rc1-eligius_sendfee.patch"
57 fi
58 use logrotate && epatch "${FILESDIR}/0.4.7-reopen_log_file.patch"
59 }
60
61 src_compile() {
62 local OPTS=()
63 local BOOST_PKG BOOST_VER BOOST_INC
64
65 OPTS+=("CXXFLAGS=${CXXFLAGS}")
66 OPTS+=( "LDFLAGS=${LDFLAGS}")
67
68 OPTS+=("DB_CXXFLAGS=-I$(db_includedir "${DB_VER}")")
69 OPTS+=("DB_LDFLAGS=-ldb_cxx-${DB_VER}")
70
71 BOOST_PKG="$(best_version 'dev-libs/boost')"
72 BOOST_VER="$(get_version_component_range 1-2 "${BOOST_PKG/*boost-/}")"
73 BOOST_VER="$(replace_all_version_separators _ "${BOOST_VER}")"
74 BOOST_INC="/usr/include/boost-${BOOST_VER}"
75 OPTS+=("BOOST_CXXFLAGS=-I${BOOST_INC}")
76 OPTS+=("BOOST_LIB_SUFFIX=-${BOOST_VER}")
77
78 use ssl && OPTS+=(USE_SSL=1)
79 use upnp && OPTS+=(USE_UPNP=1)
80
81 cd src || die
82 emake "${OPTS[@]}" ${PN}
83 }
84
85 src_install() {
86 dobin src/${PN}
87
88 insinto /etc/bitcoin
89 newins "${FILESDIR}/bitcoin.conf" bitcoin.conf
90 fowners bitcoin:bitcoin /etc/bitcoin/bitcoin.conf
91 fperms 600 /etc/bitcoin/bitcoin.conf
92
93 newconfd "${FILESDIR}/bitcoin.confd" ${PN}
94 newinitd "${FILESDIR}/bitcoin.initd" ${PN}
95
96 keepdir /var/lib/bitcoin/.bitcoin
97 fperms 700 /var/lib/bitcoin
98 fowners bitcoin:bitcoin /var/lib/bitcoin/
99 fowners bitcoin:bitcoin /var/lib/bitcoin/.bitcoin
100 dosym /etc/bitcoin/bitcoin.conf /var/lib/bitcoin/.bitcoin/bitcoin.conf
101
102 dodoc doc/README
103
104 if use logrotate; then
105 insinto /etc/logrotate.d
106 newins "${FILESDIR}/bitcoind.logrotate" bitcoind
107 fi
108 }

  ViewVC Help
Powered by ViewVC 1.1.20