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: libstdc++-devel >= 6:4.0
17 BuildRequires: pcre-cxx-devel
18 BuildRequires: pcre-devel
19 BuildRequires: readline-devel
20 BuildRequires: scons >= 1.2
21 BuildRequires: v8-devel
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 Mongo (from "huMONGOus") is a schema-free document-oriented database.
26 It features dynamic profileable queries, full indexing, replication
27 and fail-over support, efficient storage of large binary data objects,
30 This package provides the mongo shell, import/export tools, and other
34 Summary: MongoDB server, sharding server, and support scripts
35 Group: Applications/Databases
36 Requires: %{name} = %{version}-%{release}
39 Mongo (from "huMONGOus") is a schema-free document-oriented database.
41 This package provides the mongo server software, mongo sharding server
42 softwware, default configuration files, and init.d scripts.
45 Summary: Headers and libraries for mongo development
46 Group: Development/Libraries
47 Requires: %{name} = %{version}-%{release}
50 Mongo (from "huMONGOus") is a schema-free document-oriented database.
52 This package provides the mongo static library and header files needed
53 to develop mongo client software.
56 %setup -q -n %{name}-src-r%{version}
59 find -type f -executable | xargs chmod a-x
63 --prefix=$RPM_BUILD_ROOT%{_prefix} \
68 # XXX really should have shared library here
71 rm -rf $RPM_BUILD_ROOT
72 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1} \
73 $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d} \
74 $RPM_BUILD_ROOT%{_var}/{lib,log}/mongo
76 --prefix=$RPM_BUILD_ROOT%{_prefix} \
81 cp -a debian/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
82 #install -d $RPM_BUILD_ROOT%{_sysconfdir}/init.d
83 #cp rpm/init.d-mongod $RPM_BUILD_ROOT%{_sysconfdir}/init.d/mongod
84 #chmod a+x $RPM_BUILD_ROOT%{_sysconfdir}/init.d/mongod
86 cp -a rpm/mongod.conf $RPM_BUILD_ROOT%{_sysconfdir}/mongod.conf
87 #install -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
88 #cp rpm/mongod.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/mongod
89 #cp rpm/mongod.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/mongod
91 touch $RPM_BUILD_ROOT%{_var}/log/mongo/mongod.log
92 cp -a %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/mongod
93 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mongod
95 #install -d $RPM_BUILD_ROOT%{_sbindir}
96 #ln -s %{_sysconfdir}/init.d/mongod $RPM_BUILD_ROOT%{_sbindir}/rcmongod
98 ln -s ../../etc/rc.d/init.d/mongod $RPM_BUILD_ROOT%{_sbindir}/rcmongod
101 rm -rf $RPM_BUILD_ROOT
104 groupadd -r mongod 2>/dev/null || :
105 useradd -r -g mongod -d %{_var}/lib/mongo -s /sbin/nologin -c "user for MongoDB Database Server" mongod 2>/dev/null || :
108 #%fillup_and_insserv -n mongod mongod
109 #%restart_on_update mongod
112 #%stop_on_removal mongod
117 %defattr(644,root,root,755)
118 %doc README GNU-AGPL-3.0.txt
119 %attr(755,root,root) %{_bindir}/mongo
120 %attr(755,root,root) %{_bindir}/mongodump
121 %attr(755,root,root) %{_bindir}/mongoexport
122 %attr(755,root,root) %{_bindir}/mongofiles
123 %attr(755,root,root) %{_bindir}/mongoimport
124 %attr(755,root,root) %{_bindir}/mongorestore
125 %attr(755,root,root) %{_bindir}/mongostat
126 %attr(755,root,root) %{_bindir}/bsondump
127 %{_mandir}/man1/mongo.1*
128 %{_mandir}/man1/mongod.1*
129 %{_mandir}/man1/mongodump.1*
130 %{_mandir}/man1/mongoexport.1*
131 %{_mandir}/man1/mongofiles.1*
132 %{_mandir}/man1/mongoimport.1*
133 %{_mandir}/man1/mongosniff.1*
134 %{_mandir}/man1/mongostat.1*
135 %{_mandir}/man1/mongorestore.1*
138 %defattr(644,root,root,755)
139 %config(noreplace) %{_sysconfdir}/mongod.conf
140 %config(noreplace) /etc/logrotate.d/mongod
141 %attr(754,root,root) %config /etc/rc.d/init.d/mongod
142 %attr(755,root,root) %{_sbindir}/rcmongod
143 %config %{_var}/adm/fillup-templates/sysconfig.mongod
144 %attr(755,root,root) %{_bindir}/mongod
145 %attr(755,root,root) %{_bindir}/mongos
146 %{_mandir}/man1/mongos.1*
147 %attr(755,mongod,mongod) %dir %{_var}/lib/mongo
148 %attr(755,mongod,mongod) %dir %{_var}/log/mongo
149 %attr(640,mongod,mongod) %config(noreplace) %verify(not md5 mtime size) %{_var}/log/mongo/mongod.log
152 %defattr(644,root,root,755)
154 %{_libdir}/libmongoclient.a
155 %{_libdir}/libmongoclient.so
156 #%{_libdir}/libmongotestfiles.a