source: projects/specs/trunk/m/mongodb/mongodb-vl.spec @ 6996

Revision 6996, 15.3 KB checked in by daisuke, 12 years ago (diff)

new package: mongodb-2.2.0-1

Line 
1%global         daemon mongod
2%bcond_without  v8
3
4Name:           mongodb
5Version:        2.2.0
6Release:        1%{?_dist_release}
7Summary:        High-performance, schema-free document-oriented database
8Summary(ja):    高性能なスキーマ不要のドキュメント指向データベース
9Group:          Applications/Databases
10License:        AGPLv3 and zlib and ASL 2.0
11# util/md5 is under the zlib license
12# manpages and bson are under ASL 2.0
13# everything else is AGPLv3
14URL:            http://www.mongodb.org
15
16Source0:        http://fastdl.mongodb.org/src/%{name}-src-r%{version}.tar.gz
17Source1:        %{name}.init
18Source2:        %{name}.logrotate
19Source3:        %{name}.conf
20Source4:        %{daemon}.sysconf
21Source5:        %{name}-tmpfile
22Source6:        %{daemon}.service
23
24Patch1:         mongodb-2.2.0-no-term.patch
25##Patch 4 - not really needed because of v8
26##Patch 4 - https://github.com/mongodb/mongo/pull/160
27Patch4:         mongodb-2.2.0-js.patch
28##Patch 5 - https://jira.mongodb.org/browse/SERVER-6686
29Patch5:         mongodb-2.2.0-fix-xtime.patch
30##Patch 6 - https://jira.mongodb.org/browse/SERVER-4314
31Patch6:         mongodb-2.2.0-boost-filesystem3.patch
32##Patch 7 - make it possible to use system libraries
33Patch7:         mongodb-2.2.0-use-system-version.patch
34##Patch 8 - make it possible to build shared libraries
35Patch8:         mongodb-2.2.0-shared-library.patch
36##Patch 9 - https://jira.mongodb.org/browse/SERVER-5575
37Patch9:         mongodb-2.2.0-full-flag.patch
38
39BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
40
41BuildRequires:  python-devel
42BuildRequires:  scons
43BuildRequires:  libboost-devel
44BuildRequires:  libboost-thread
45BuildRequires:  libboost-program-options
46BuildRequires:  libboost-filesystem
47BuildRequires:  libboost-iostreams
48BuildRequires:  pcre-devel
49%if %{with v8}
50BuildRequires:  v8-devel
51%else
52BuildRequires:  js-devel
53%endif
54BuildRequires:  readline-devel
55BuildRequires:  libpcap-devel
56BuildRequires:  snappy-devel
57BuildRequires:  gperftools-devel
58
59Requires(post): chkconfig
60Requires(preun): chkconfig
61Requires(pre):  shadow-utils
62Requires(postun): initscripts
63
64Requires:       lib%{name} = %{version}-%{release}
65
66# Mongodb must run on a little-endian CPU (see bug #630898)
67ExcludeArch:    ppc ppc64 %{sparc} s390 s390x
68
69%description
70Mongo (from "humongous") is a high-performance, open source, schema-free
71document-oriented database. MongoDB is written in C++ and offers the following
72features:
73    * Collection oriented storage: easy storage of object/JSON-style data
74    * Dynamic queries
75    * Full index support, including on inner objects and embedded arrays
76    * Query profiling
77    * Replication and fail-over support
78    * Efficient storage of binary data including large objects (e.g. photos
79    and videos)
80    * Auto-sharding for cloud-level scalability (currently in early alpha)
81    * Commercial Support Available
82
83A key goal of MongoDB is to bridge the gap between key/value stores (which are
84fast and highly scalable) and traditional RDBMS systems (which are deep in
85functionality).
86
87%package -n lib%{name}
88Summary:        MongoDB shared libraries
89Summary(ja):        MongoDB shared libraries
90Group:          Development/Libraries
91
92%description -n lib%{name}
93This package provides the shared library for the MongoDB client.
94
95%package devel
96Summary:        MongoDB header files
97Summary(ja):        MongoDB header files
98Group:          Development/Libraries
99Requires:       lib%{name} = %{version}-%{release}
100Requires:       libboost-devel
101
102%description devel
103This package provides the header files and C++ driver for MongoDB. MongoDB is
104a high-performance, open source, schema-free document-oriented database.
105
106%package server
107Summary:        MongoDB server, sharding server and support scripts
108Summary(ja):        MongoDB server, sharding server and support scripts
109Group:          Applications/Databases
110Requires:       %{name} = %{version}-%{release}
111
112%description server
113This package provides the mongo server software, mongo sharding server
114software, default configuration files, and init scripts.
115
116
117%prep
118%setup -q -n mongodb-src-r%{version}
119%patch1 -p1
120%patch4 -p1
121%patch5 -p1
122%patch6 -p1
123%patch7 -p1
124%patch8 -p1
125%ifarch %ix86
126%patch9 -p1
127%endif
128
129# spurious permissions
130chmod -x README
131
132# wrong end-of-file encoding
133sed -i 's/\r//' README
134
135%build
136scons %{?_smp_mflags} --sharedclient \
137      --use-system-all \
138      --prefix=%{buildroot}%{_prefix} \
139      --extrapath=%{_prefix} \
140%if %{with v8}
141      --usev8
142%endif
143
144
145%install
146rm -rf %{buildroot}
147scons install \
148        --sharedclient \
149        --use-system-all \
150        --prefix=%{buildroot}%{_prefix} \
151        --extrapath=%{_prefix} \
152%if %{with v8}
153        --usev8 \
154%endif
155        --nostrip \
156        --full
157rm -f %{buildroot}%{_libdir}/libmongoclient.a
158rm -f %{buildroot}/usr/lib/libmongoclient.a
159
160mkdir -p %{buildroot}%{_var}/lib/%{name}
161mkdir -p %{buildroot}%{_localstatedir}/log/%{name}
162mkdir -p %{buildroot}%{_localstatedir}/run/%{name}
163mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
164
165install -p -D -m 755 %{SOURCE1} %{buildroot}%{_initddir}/%{daemon}
166install -p -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
167install -p -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/mongodb.conf
168install -p -D -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/%{daemon}
169
170mkdir -p %{buildroot}%{_mandir}/man1
171cp -p debian/*.1 %{buildroot}%{_mandir}/man1/
172
173mkdir -p %{buildroot}%{_localstatedir}/run/%{name}
174
175%clean
176rm -rf %{buildroot}
177
178%post -p /sbin/ldconfig
179
180%postun -p /sbin/ldconfig
181
182%pre server
183getent group %{name} >/dev/null || groupadd -r %{name}
184getent passwd %{name} >/dev/null || \
185useradd -r -g %{name} -d %{_var}/lib/%{name} -s /sbin/nologin \
186-c "MongoDB Database Server" %{name}
187exit 0
188
189%post server
190/sbin/chkconfig --add %{daemon}
191
192
193%preun server
194if [ $1 = 0 ] ; then
195  /sbin/service  stop >/dev/null 2>&1
196  /sbin/chkconfig --del %{daemon}
197fi
198
199
200%postun server
201if [ "$1" -ge "1" ] ; then
202   /sbin/service %{daemon} condrestart >/dev/null 2>&1 || :
203fi
204
205
206%files
207%defattr(-,root,root,-)
208%{_bindir}/bsondump
209%{_bindir}/mongo
210%{_bindir}/mongodump
211%{_bindir}/mongoexport
212%{_bindir}/mongofiles
213%{_bindir}/mongoimport
214%{_bindir}/mongooplog
215%{_bindir}/mongoperf
216%{_bindir}/mongorestore
217%{_bindir}/mongostat
218%{_bindir}/mongosniff
219%{_bindir}/mongotop
220
221%{_mandir}/man1/mongo.1*
222%{_mandir}/man1/mongod.1*
223%{_mandir}/man1/mongodump.1*
224%{_mandir}/man1/mongoexport.1*
225%{_mandir}/man1/mongofiles.1*
226%{_mandir}/man1/mongoimport.1*
227%{_mandir}/man1/mongosniff.1*
228%{_mandir}/man1/mongostat.1*
229%{_mandir}/man1/mongorestore.1*
230%{_mandir}/man1/bsondump.1*
231
232%files -n lib%{name}
233%defattr(-,root,root,-)
234%doc README GNU-AGPL-3.0.txt APACHE-2.0.txt
235%{_libdir}/libmongoclient.so
236
237%files server
238%defattr(-,root,root,-)
239%{_bindir}/mongod
240%{_bindir}/mongos
241%{_mandir}/man1/mongod.1*
242%{_mandir}/man1/mongos.1*
243%dir %attr(0755, %{name}, root) %{_localstatedir}/log/%{name}
244%dir %attr(0755, %{name}, root) %{_localstatedir}/run/%{name}
245%dir %attr(0755, %{name}, root) %{_localstatedir}/lib/%{name}
246%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
247%config(noreplace) %{_sysconfdir}/mongodb.conf
248%config(noreplace) %{_sysconfdir}/sysconfig/%{daemon}
249%{_initddir}/%{daemon}
250
251%files devel
252%defattr(-,root,root,-)
253%{_includedir}
254
255%changelog
256* Wed Oct 24 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 2.2.0-1
257- initial build for Vine Linux
258
259* Tue Oct 02 2012 Troy Dawson <tdawson@redhat.com> - 2.2.0-6
260- full flag patch to get 32 bit builds to work
261
262* Tue Oct 02 2012 Troy Dawson <tdawson@redhat.com> - 2.2.0-5
263- shared libraries patch
264- Fix up minor %files issues
265
266* Fri Sep 28 2012 Troy Dawson <tdawson@redhat.com> - 2.2.0-4
267- Fix spec files problems
268
269* Fri Sep 28 2012 Troy Dawson <tdawson@redhat.com> - 2.2.0-3
270- Updated patch to use system libraries
271- Update init script to use a pidfile
272
273* Thu Sep 27 2012 Troy Dawson <tdawson@redhat.com> - 2.2.0-2
274- Added patch to use system libraries
275
276* Wed Sep 19 2012 Troy Dawson <tdawson@redhat.com> - 2.2.0-1
277- Updated to 2.2.0
278- Updated patches that were still needed
279- use v8 instead of spider_monkey due to bundled library issues
280
281* Tue Aug 21 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.7-1
282- Update to 2.0.7
283- Don't patch for boost-filesystem version 3 on EL6
284
285* Mon Aug 13 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.6-3
286- Remove EL5 support
287- Add patch to use boost-filesystem version 3
288
289* Wed Aug 01 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.6-2
290- Don't apply fix-xtime patch on EL5
291
292* Wed Aug 01 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.6-1
293- Update to 2.0.6
294- Update no-term patch
295- Add fix-xtime patch for new boost
296
297* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.4-2
298- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
299
300* Tue Apr 17 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.4-1
301- Update to 2.0.4
302- Remove oldpython patch (fixed upstream)
303- Remove snappy patch (fixed upstream)
304
305* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-10
306- Rebuilt for c++ ABI breakage
307
308* Fri Feb 10 2012 Petr Pisar <ppisar@redhat.com> - 2.0.2-9
309- Rebuild against PCRE 8.30
310
311* Fri Feb 03 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-8
312- Disable HTTP interface by default (#752331)
313
314* Fri Feb 03 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-7
315- Enable journaling by default (#656112)
316- Remove BuildRequires on unittest (#755081)
317
318* Fri Feb 03 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-6
319- Clean up mongodb-src-r2.0.2-js.patch and fix #787246
320
321* Tue Jan 17 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-5
322- Enable build using external snappy
323
324* Tue Jan 17 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-4
325- Patch buildsystem for building on older pythons (RHEL5)
326
327* Mon Jan 16 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-3
328- Merge the 2.0.2 spec file with EPEL
329- Merge mongodb-sm-pkgconfig.patch into mongodb-src-r2.0.2-js.patch
330
331* Mon Jan 16 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-2
332- Add pkg-config enablement patch
333
334* Thu Jan 14 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-1
335- Update to 2.0.2
336- Add new files (mongotop and bsondump manpage)
337- Update mongodb-src-r1.8.2-js.patch => mongodb-src-r2.0.2-js.patch
338- Update mongodb-fix-fork.patch
339- Fix pcre linking
340
341* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.2-11
342- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
343
344* Sun Nov 20 2011 Chris Lalancette <clalancette@gmail.com> - 1.8.2-10
345- Rebuild for rawhide boost update
346
347* Thu Sep 22 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-9
348- Copy the right source file into place for tmpfiles.d
349
350* Tue Sep 20 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-8
351- Add a tmpfiles.d file to create the /var/run/mongodb subdirectory
352
353* Mon Sep 12 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-7
354- Add a patch to fix the forking to play nice with systemd
355- Make the /var/run/mongodb directory owned by mongodb
356
357* Thu Jul 28 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-6
358- BZ 725601 - fix the javascript engine to not hang (thanks to Eduardo Habkost)
359
360* Mon Jul 25 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-5
361- Fixes to post server, preun server, and postun server to use systemd
362
363* Thu Jul 21 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-4
364- Update to use systemd init
365
366* Thu Jul 21 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-3
367- Rebuild for boost ABI break
368
369* Wed Jul 13 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-2
370- Make mongodb-devel require boost-devel (BZ 703184)
371
372* Fri Jul 01 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-1
373- Update to upstream 1.8.2
374- Add patch to ignore TERM
375
376* Fri Jul 01 2011 Chris Lalancette <clalance@redhat.com> - 1.8.0-3
377- Bump release to build against new boost package
378
379* Sat Mar 19 2011 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.8.0-2
380- Make mongod bind only to 127.0.0.1 by default
381
382* Sat Mar 19 2011 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.8.0-1
383- Update to 1.8.0
384- Remove upstreamed nonce patch
385
386* Wed Feb 16 2011 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.7.5-5
387- Add nonce patch
388
389* Sun Feb 13 2011 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.7.5-4
390- Manually define to use boost-fs v2
391
392* Sat Feb 12 2011 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.7.5-3
393- Disable extra warnings
394
395* Fri Feb 11 2011 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.7.5-2
396- Disable compilation errors on warnings
397
398* Fri Feb 11 2011 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.7.5-1
399- Update to 1.7.5
400- Remove CPPFLAGS override
401- Added libmongodb package
402
403* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.4-4
404- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
405
406* Mon Dec 06 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.6.4-3
407- Add post/postun ldconfig... oops!
408
409* Mon Dec 06 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.6.4-2
410- Enable --sharedclient option, remove static lib
411
412* Sat Dec 04 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.6.4-1
413- New upstream release
414
415* Fri Oct 08 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.6.3-4
416- Put -fPIC onto both the build and install scons calls
417
418* Fri Oct 08 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.6.3-3
419- Define _initddir when it doesn't exist for el5 and others
420
421* Fri Oct 08 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.6.3-2
422- Added -fPIC build option which was dropped by accident
423
424* Thu Oct  7 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.6.3-1
425- removed js Requires
426- new upstream release
427- added more excludearches: sparc s390, s390x and bugzilla pointer
428
429* Tue Sep  7 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.6.2-2
430- added ExcludeArch for ppc
431
432* Fri Sep  3 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.6.2-1
433- new upstream release 1.6.2
434- send mongod the USR1 signal when doing logrotate
435- use config options when starting the daemon from the initfile
436- removed dbpath patch: rely on config
437- added pid directory to config file and created the dir in the spec
438- made the init script use options from the config file
439- changed logpath in mongodb.conf
440
441* Wed Sep  1 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.6.1-1
442- new upstream release 1.6.1
443- patched SConstruct to allow setting cppflags
444- stopped using sed and chmod macros
445
446* Fri Aug  6 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.6.0-1
447- new upstream release: 1.6.0
448- added -server package
449- added new license file to %%docs
450- fix spurious permissions and EOF encodings on some files
451
452* Tue Jun 15 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.4.3-2
453- added explicit js requirement
454- changed some names
455
456* Wed May 26 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.4.3-1
457- updated to 1.4.3
458- added zlib license for util/md5
459- deleted upstream deb/rpm recipes
460- made scons not strip binaries
461- made naming more consistent in logfile, lockfiles, init scripts etc.
462- included manpages and added corresponding license
463- added mongodb.conf to sources
464
465* Fri Oct  2 2009 Ionuț Arțăriși <mapleoin@fedoraproject.org> - 1.0.0-3
466- fixed libpath issue for 64bit systems
467
468* Thu Oct  1 2009 Ionuț Arțăriși <mapleoin@fedoraproject.org> - 1.0.0-2
469- added virtual -static package
470
471* Mon Aug 31 2009 Ionuț Arțăriși <mapleoin@fedoraproject.org> - 1.0.0-1
472- Initial release.
Note: See TracBrowser for help on using the repository browser.