/[gentoo-x86]/dev-db/mongodb/mongodb-2.2.2.ebuild
Gentoo

Contents of /dev-db/mongodb/mongodb-2.2.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Wed Nov 28 10:00:23 2012 UTC (19 months, 2 weeks ago) by ultrabug
Branch: MAIN
version bump

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

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/mongodb-2.2.1.ebuild,v 1.2 2012/11/09 16:08:37 flameeyes Exp $
4
5 EAPI=4
6 SCONS_MIN_VERSION="1.2.0"
7
8 inherit eutils flag-o-matic multilib pax-utils scons-utils user versionator
9
10 MY_P=${PN}-src-r${PV/_rc/-rc}
11
12 DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
13 HOMEPAGE="http://www.mongodb.org"
14 SRC_URI="http://downloads.mongodb.org/src/${MY_P}.tar.gz
15 mms-agent? ( http://dev.gentoo.org/~ultrabug/20121128-10gen-mms-agent.zip )"
16
17 LICENSE="AGPL-3 Apache-2.0"
18 SLOT="0"
19 KEYWORDS="~amd64 ~x86"
20 IUSE="mms-agent static-libs v8"
21
22 PDEPEND="mms-agent? ( dev-python/pymongo )"
23 RDEPEND="
24 v8? ( dev-lang/v8 )
25 >=dev-libs/boost-1.50[threads(+)]
26 dev-libs/libpcre[cxx]
27 dev-util/google-perftools
28 net-libs/libpcap
29 app-arch/snappy"
30 DEPEND="${RDEPEND}
31 sys-libs/readline
32 sys-libs/ncurses"
33
34 S=${WORKDIR}/${MY_P}
35
36 pkg_setup() {
37 enewgroup mongodb
38 enewuser mongodb -1 -1 /var/lib/${PN} mongodb
39
40 scons_opts=" --cc=$(tc-getCC) --cxx=$(tc-getCXX)"
41 scons_opts+=" --use-system-tcmalloc"
42 scons_opts+=" --use-system-pcre"
43 scons_opts+=" --use-system-snappy"
44 scons_opts+=" --use-system-boost"
45
46 if use v8; then
47 scons_opts+=" --usev8"
48 else
49 scons_opts+=" --usesm"
50 fi
51 }
52
53 src_prepare() {
54 epatch "${FILESDIR}/${PN}-2.2-r1-fix-scons.patch"
55 epatch "${FILESDIR}/${PN}-2.2-r1-fix-boost.patch"
56 epatch "${FILESDIR}/${PN}-2.2-r2-boost-1.50.patch"
57
58 # FIXME: apply only this fix [1] on x86 boxes as it breaks /usr/lib symlink
59 # on amd64 machines [2].
60 # [1] https://jira.mongodb.org/browse/SERVER-5575
61 # [2] https://bugs.gentoo.org/show_bug.cgi?id=434664
62 if use !prefix && [[ "$(get_libdir)" == "lib" ]]; then
63 epatch "${FILESDIR}/${PN}-2.2-fix-x86client.patch"
64 fi
65 }
66
67 src_compile() {
68 escons ${scons_opts} all
69 }
70
71 src_install() {
72 escons ${scons_opts} --full --nostrip install --prefix="${ED}"/usr
73
74 use static-libs || rm "${ED}/usr/$(get_libdir)/libmongoclient.a"
75
76 use v8 && pax-mark m "${ED}"/usr/bin/{mongo,mongod}
77
78 for x in /var/{lib,log,run}/${PN}; do
79 keepdir "${x}"
80 fowners mongodb:mongodb "${x}"
81 done
82
83 doman debian/mongo*.1
84 dodoc README docs/building.md
85
86 newinitd "${FILESDIR}/${PN}.initd" ${PN}
87 newconfd "${FILESDIR}/${PN}.confd" ${PN}
88 newinitd "${FILESDIR}/${PN/db/s}.initd" ${PN/db/s}
89 newconfd "${FILESDIR}/${PN/db/s}.confd" ${PN/db/s}
90
91 insinto /etc/logrotate.d/
92 newins "${FILESDIR}/${PN}.logrotate" ${PN}
93
94 if use mms-agent; then
95 local MY_PN="mms-agent"
96 local MY_D="/opt/${MY_PN}"
97 insinto ${MY_D}
98 doins "${WORKDIR}/${MY_PN}/"*
99 fowners -R mongodb:mongodb ${MY_D}
100 newinitd "${FILESDIR}/${MY_PN}.initd" ${MY_PN}
101 newconfd "${FILESDIR}/${MY_PN}.confd" ${MY_PN}
102 fi
103 }
104
105 src_test() {
106 escons ${scons_opts} test
107 "${S}"/test --dbpath=unittest || die
108 }
109
110 pkg_postinst() {
111 if [[ ${REPLACING_VERSIONS} < 1.8 ]]; then
112 ewarn "You just upgraded from a previous version of mongodb !"
113 ewarn "Make sure you run 'mongod --upgrade' before using this version."
114 fi
115 elog "Journaling is now enabled by default, see /etc/conf.d/${PN}"
116 }

  ViewVC Help
Powered by ViewVC 1.1.20