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

Contents of /dev-db/mongodb/mongodb-2.0.7-r2.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-r2.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 epatch "${FILESDIR}/${PN}-2.0-r1-boost-1.50.patch"
54
55 # drop -Werror
56 sed -i -e '/Werror/d' SConstruct || die
57 }
58
59 src_compile() {
60 escons ${scons_opts} all
61 }
62
63 src_install() {
64 escons ${scons_opts} --full --nostrip install --prefix="${D}"/usr
65
66 use static-libs || rm "${D}/usr/$(get_libdir)/libmongoclient.a"
67
68 use v8 && pax-mark m "${D}"/usr/bin/{mongo,mongod}
69
70 for x in /var/{lib,log,run}/${PN}; do
71 keepdir "${x}"
72 fowners mongodb:mongodb "${x}"
73 done
74
75 doman debian/mongo*.1
76 dodoc README docs/building.md
77
78 newinitd "${FILESDIR}/${PN}.initd" ${PN}
79 newconfd "${FILESDIR}/${PN}.confd" ${PN}
80 newinitd "${FILESDIR}/${PN/db/s}.initd" ${PN/db/s}
81 newconfd "${FILESDIR}/${PN/db/s}.confd" ${PN/db/s}
82
83 insinto /etc/logrotate.d/
84 newins "${FILESDIR}/${PN}.logrotate" ${PN}
85
86 if use mms-agent; then
87 local MY_PN="mms-agent"
88 local MY_D="/opt/${MY_PN}"
89 insinto ${MY_D}
90 doins "${WORKDIR}/${MY_PN}/"*
91 fowners -R mongodb:mongodb ${MY_D}
92 newinitd "${FILESDIR}/${MY_PN}.initd" ${MY_PN}
93 newconfd "${FILESDIR}/${MY_PN}.confd" ${MY_PN}
94 fi
95 }
96
97 src_test() {
98 escons ${scons_opts} test
99 "${S}"/test --dbpath=unittest || die
100 }
101
102 pkg_postinst() {
103 if [[ ${REPLACING_VERSIONS} < 1.8 ]]; then
104 ewarn "You just upgraded from a previous version of mongodb !"
105 ewarn "Make sure you run 'mongod --upgrade' before using this version."
106 fi
107 elog "Journaling is now enabled by default, see /etc/conf.d/${PN}"
108 }

  ViewVC Help
Powered by ViewVC 1.1.20