2 # - pld useradd/groupadd (register uid/gid)
3 Summary: MongoDB client shell and tools
8 Group: Applications/Databases
9 URL: http://www.mongodb.org/
10 Source0: http://downloads.mongodb.org/src/%{name}-src-r%{version}.tar.gz
11 # Source0-md5: 358bfc52855a66d3c954e7f6f51bcd12
12 Source1: %{name}.logrotate
14 # BuildRequires: libpcap-devel
15 BuildRequires: boost-devel >= 1.42
16 BuildRequires: gcc >= 6:4.0
17 BuildRequires: libstdc++-devel
18 BuildRequires: libstdc++-devel >= 4.0
19 BuildRequires: pcre-cxx-devel
20 BuildRequires: pcre-devel
21 BuildRequires: readline-devel
22 BuildRequires: scons >= 1.2
23 BuildRequires: v8-devel
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 Requires(pre): pwdutils
29 Mongo (from "huMONGOus") is a schema-free document-oriented database.
30 It features dynamic profileable queries, full indexing, replication
31 and fail-over support, efficient storage of large binary data objects,
34 This package provides the mongo shell, import/export tools, and other
38 Summary: MongoDB server, sharding server, and support scripts
39 Group: Applications/Databases
40 Requires: %{name} = %{version}
44 Mongo (from "huMONGOus") is a schema-free document-oriented database.
46 This package provides the mongo server software, mongo sharding server
47 softwware, default configuration files, and init.d scripts.
50 Summary: Headers and libraries for mongo development
51 Group: Development/Libraries
52 Requires: %{name} = %{version}
55 Mongo (from "huMONGOus") is a schema-free document-oriented database.
57 This package provides the mongo static library and header files needed
58 to develop mongo client software.
61 %setup -q -n %{name}-src-r%{version}
64 find -type f -executable | xargs chmod a-x
68 --prefix=$RPM_BUILD_ROOT%{_prefix} \
73 # XXX really should have shared library here
76 rm -rf $RPM_BUILD_ROOT
77 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1} \
78 $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d} \
79 $RPM_BUILD_ROOT%{_var}/{lib,log}/mongo
81 --prefix=$RPM_BUILD_ROOT%{_prefix} \
86 cp -a debian/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
87 #install -d $RPM_BUILD_ROOT%{_sysconfdir}/init.d
88 #cp rpm/init.d-mongod $RPM_BUILD_ROOT%{_sysconfdir}/init.d/mongod
89 #chmod a+x $RPM_BUILD_ROOT%{_sysconfdir}/init.d/mongod
91 cp -a rpm/mongod.conf $RPM_BUILD_ROOT%{_sysconfdir}/mongod.conf
92 #install -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
93 #cp rpm/mongod.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/mongod
94 #cp rpm/mongod.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/mongod
96 touch $RPM_BUILD_ROOT%{_var}/log/mongo/mongod.log
97 cp -a %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/mongod
98 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mongod
100 #install -d $RPM_BUILD_ROOT%{_sbindir}
101 #ln -s %{_sysconfdir}/init.d/mongod $RPM_BUILD_ROOT%{_sbindir}/rcmongod
103 ln -s ../../etc/rc.d/init.d/mongod $RPM_BUILD_ROOT%{_sbindir}/rcmongod
106 rm -rf $RPM_BUILD_ROOT
109 groupadd -r mongod 2>/dev/null || :
110 useradd -r -g mongod -d %{_var}/lib/mongo -s /sbin/nologin -c "user for MongoDB Database Server" mongod 2>/dev/null || :
113 #%fillup_and_insserv -n mongod mongod
114 #%restart_on_update mongod
117 #%stop_on_removal mongod
121 %post devel -p /sbin/ldconfig
122 %postun devel -p /sbin/ldconfig
125 %defattr(644,root,root,755)
126 %doc README GNU-AGPL-3.0.txt
127 %attr(755,root,root) %{_bindir}/mongo
128 %attr(755,root,root) %{_bindir}/mongodump
129 %attr(755,root,root) %{_bindir}/mongoexport
130 %attr(755,root,root) %{_bindir}/mongofiles
131 %attr(755,root,root) %{_bindir}/mongoimport
132 %attr(755,root,root) %{_bindir}/mongorestore
133 %attr(755,root,root) %{_bindir}/mongostat
134 %attr(755,root,root) %{_bindir}/bsondump
135 %{_mandir}/man1/mongo.1*
136 %{_mandir}/man1/mongod.1*
137 %{_mandir}/man1/mongodump.1*
138 %{_mandir}/man1/mongoexport.1*
139 %{_mandir}/man1/mongofiles.1*
140 %{_mandir}/man1/mongoimport.1*
141 %{_mandir}/man1/mongosniff.1*
142 %{_mandir}/man1/mongostat.1*
143 %{_mandir}/man1/mongorestore.1*
146 %defattr(644,root,root,755)
147 %config(noreplace) %{_sysconfdir}/mongod.conf
148 %config(noreplace) /etc/logrotate.d/mongod
149 %attr(754,root,root) %config /etc/rc.d/init.d/mongod
150 %attr(755,root,root) %{_sbindir}/rcmongod
151 %config %{_var}/adm/fillup-templates/sysconfig.mongod
152 %attr(755,root,root) %{_bindir}/mongod
153 %attr(755,root,root) %{_bindir}/mongos
154 %{_mandir}/man1/mongos.1*
155 %attr(755,mongod,mongod) %dir %{_var}/lib/mongo
156 %attr(755,mongod,mongod) %dir %{_var}/log/mongo
157 %attr(640,mongod,mongod) %config(noreplace) %verify(not md5 mtime size) %{_var}/log/mongo/mongod.log
160 %defattr(644,root,root,755)
162 %{_libdir}/libmongoclient.a
163 %{_libdir}/libmongoclient.so
164 #%{_libdir}/libmongotestfiles.a