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

Contents of /dev-db/mongodb/mongodb-2.0.7-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Nov 22 03:45:06 2012 UTC (2 years ago) by flameeyes
Branch: MAIN
Changes since 1.1: +2 -2 lines
Get rid of boost-utils eclass.

(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key 1CD13C8AD4301342)

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.0.7-r1.ebuild,v 1.1 2012/11/04 14:23:25 ultrabug 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/20120514-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
26 dev-libs/libpcre[cxx]
27 net-libs/libpcap
28 app-arch/snappy"
29 DEPEND="${RDEPEND}
30 sys-libs/readline
31 sys-libs/ncurses"
32
33 S=${WORKDIR}/${MY_P}
34
35 pkg_setup() {
36 enewgroup mongodb
37 enewuser mongodb -1 -1 /var/lib/${PN} mongodb
38
39 scons_opts=" --cc=$(tc-getCC) --cxx=$(tc-getCXX)"
40 scons_opts+=" --use-system-pcre"
41 scons_opts+=" --use-system-snappy"
42
43 if use v8; then
44 scons_opts+=" --usev8"
45 else
46 scons_opts+=" --usesm"
47 fi
48 }
49
50 src_prepare() {
51 epatch "${FILESDIR}/${PN}-2.0-fix-scons.patch"
52 epatch "${FILESDIR}/${PN}-2.2-r1-fix-boost.patch"
53
54 # drop -Werror
55 sed -i -e '/Werror/d' SConstruct || die
56 }
57
58 src_compile() {
59 escons ${scons_opts} all
60 }
61
62 src_install() {
63 escons ${scons_opts} --full --nostrip install --prefix="${D}"/usr
64
65 use static-libs || rm "${D}/usr/$(get_libdir)/libmongoclient.a"
66
67 use v8 && pax-mark m "${D}"/usr/bin/{mongo,mongod}
68
69 for x in /var/{lib,log,run}/${PN}; do
70 keepdir "${x}"
71 fowners mongodb:mongodb "${x}"
72 done
73
74 doman debian/mongo*.1
75 dodoc README docs/building.md
76
77 newinitd "${FILESDIR}/${PN}.initd" ${PN}
78 newconfd "${FILESDIR}/${PN}.confd" ${PN}
79 newinitd "${FILESDIR}/${PN/db/s}.initd" ${PN/db/s}
80 newconfd "${FILESDIR}/${PN/db/s}.confd" ${PN/db/s}
81
82 insinto /etc/logrotate.d/
83 newins "${FILESDIR}/${PN}.logrotate" ${PN}
84
85 if use mms-agent; then
86 local MY_PN="mms-agent"
87 local MY_D="/opt/${MY_PN}"
88 insinto ${MY_D}
89 doins "${WORKDIR}/${MY_PN}/"*
90 fowners -R mongodb:mongodb ${MY_D}
91 newinitd "${FILESDIR}/${MY_PN}.initd" ${MY_PN}
92 newconfd "${FILESDIR}/${MY_PN}.confd" ${MY_PN}
93 fi
94 }
95
96 src_test() {
97 escons ${scons_opts} test
98 "${S}"/test --dbpath=unittest || die
99 }
100
101 pkg_postinst() {
102 if [[ ${REPLACING_VERSIONS} < 1.8 ]]; then
103 ewarn "You just upgraded from a previous version of mongodb !"
104 ewarn "Make sure you run 'mongod --upgrade' before using this version."
105 fi
106 elog "Journaling is now enabled by default, see /etc/conf.d/${PN}"
107 }

  ViewVC Help
Powered by ViewVC 1.1.20