1 Summary: MongoDB client shell and tools
6 Group: Applications/Databases
7 URL: http://www.mongodb.org
8 Source0: http://downloads.mongodb.org/src/%{name}-src-r%{version}.tar.gz
9 # Source0-md5: 358bfc52855a66d3c954e7f6f51bcd12
10 Source1: %{name}.logrotate
12 # BuildRequires: libpcap-devel
13 BuildRequires: boost-devel >= 1.42
14 BuildRequires: gcc >= 4.0
15 BuildRequires: libstdc++-devel
16 BuildRequires: libstdc++-devel >= 4.0
17 BuildRequires: pcre-cxx-devel
18 BuildRequires: pcre-devel
19 BuildRequires: readline-devel
20 BuildRequires: scons >= 1.2
21 BuildRequires: v8-devel
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 Requires(pre): pwdutils
27 Mongo (from "huMONGOus") is a schema-free document-oriented database.
28 It features dynamic profileable queries, full indexing, replication
29 and fail-over support, efficient storage of large binary data objects,
32 This package provides the mongo shell, import/export tools, and other
36 Summary: MongoDB server, sharding server, and support scripts
37 Group: Applications/Databases
38 Requires: %{name} = %{version}
42 Mongo (from "huMONGOus") is a schema-free document-oriented database.
44 This package provides the mongo server software, mongo sharding server
45 softwware, default configuration files, and init.d scripts.
48 Summary: Headers and libraries for mongo development
49 Group: Development/Libraries
50 Requires: %{name} = %{version}
53 Mongo (from "huMONGOus") is a schema-free document-oriented database.
55 This package provides the mongo static library and header files needed
56 to develop mongo client software.
59 %setup -q -n %{name}-src-r%{version}
63 find %{_builddir}/%{name}-src-r%{version} -type f -executable -exec chmod a-x '{}' \;
65 %scons -j 3 --prefix=$RPM_BUILD_ROOT%{_prefix} --sharedclient --full all --usev8
66 # XXX really should have shared library here
69 rm -rf $RPM_BUILD_ROOT
70 scons --prefix=$RPM_BUILD_ROOT%{_usr} --sharedclient --full --usev8 install
72 install -d $RPM_BUILD_ROOT%{_mandir}/man1
73 cp debian/*.1 $RPM_BUILD_ROOT%{_mandir}/man1/
74 #install -d $RPM_BUILD_ROOT%{_sysconfdir}/init.d
75 #cp rpm/init.d-mongod $RPM_BUILD_ROOT%{_sysconfdir}/init.d/mongod
76 #chmod a+x $RPM_BUILD_ROOT%{_sysconfdir}/init.d/mongod
78 install -d $RPM_BUILD_ROOT%{_sysconfdir}
79 cp rpm/mongod.conf $RPM_BUILD_ROOT%{_sysconfdir}/mongod.conf
80 #install -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
81 #cp rpm/mongod.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/mongod
82 #cp rpm/mongod.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/mongod
84 install -d $RPM_BUILD_ROOT%{_var}/lib/mongo
85 install -d $RPM_BUILD_ROOT%{_var}/log/mongo
86 touch $RPM_BUILD_ROOT%{_var}/log/mongo/mongod.log
88 install -D %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/mongod
90 install -D %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/mongod
92 #install -d $RPM_BUILD_ROOT%{_sbindir}
93 #ln -s %{_sysconfdir}/init.d/mongod $RPM_BUILD_ROOT%{_sbindir}/rcmongod
94 ln -s ../..%{_sysconfdir}/init.d/mongod $RPM_BUILD_ROOT%{_sbindir}/rcmongod
98 rm -rf $RPM_BUILD_ROOT
101 groupadd -r mongod 2>/dev/null || :
102 useradd -r -g mongod -d %{_var}/lib/mongo -s /sbin/nologin -c "user for MongoDB Database Server" mongod 2>/dev/null || :
105 #%fillup_and_insserv -n mongod mongod
106 #%restart_on_update mongod
109 #%stop_on_removal mongod
113 %post devel -p /sbin/ldconfig
115 %postun devel -p /sbin/ldconfig
118 %defattr(644,root,root,755)
119 %doc README GNU-AGPL-3.0.txt
120 %attr(755,root,root) %{_bindir}/mongo
121 %attr(755,root,root) %{_bindir}/mongodump
122 %attr(755,root,root) %{_bindir}/mongoexport
123 %attr(755,root,root) %{_bindir}/mongofiles
124 %attr(755,root,root) %{_bindir}/mongoimport
125 %attr(755,root,root) %{_bindir}/mongorestore
126 %attr(755,root,root) %{_bindir}/mongostat
127 %attr(755,root,root) %{_bindir}/bsondump
128 %{_mandir}/man1/mongo.1*
129 %{_mandir}/man1/mongod.1*
130 %{_mandir}/man1/mongodump.1*
131 %{_mandir}/man1/mongoexport.1*
132 %{_mandir}/man1/mongofiles.1*
133 %{_mandir}/man1/mongoimport.1*
134 %{_mandir}/man1/mongosniff.1*
135 %{_mandir}/man1/mongostat.1*
136 %{_mandir}/man1/mongorestore.1*
139 %defattr(644,root,root,755)
140 %config(noreplace) %{_sysconfdir}/mongod.conf
141 %config(noreplace) /etc/logrotate.d/mongod
142 %attr(754,root,root) %config /etc/rc.d/init.d/mongod
143 %attr(755,root,root) %{_sbindir}/rcmongod
144 %config %{_var}/adm/fillup-templates/sysconfig.mongod
145 %attr(755,root,root) %{_bindir}/mongod
146 %attr(755,root,root) %{_bindir}/mongos
147 %{_mandir}/man1/mongos.1*
148 %attr(755,mongod,mongod) %dir %{_var}/lib/mongo
149 %attr(755,mongod,mongod) %dir %{_var}/log/mongo
150 %attr(640,mongod,mongod) %config(noreplace) %verify(not md5 mtime size) %{_var}/log/mongo/mongod.log
153 %defattr(644,root,root,755)
155 %{_libdir}/libmongoclient.a
156 %{_libdir}/libmongoclient.so
157 #%{_libdir}/libmongotestfiles.a