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

Revision 8034, 15.4 KB checked in by Takemikaduchi, 10 years ago (diff)

new upstream release or rebuild with libboost-1.54.0

Line 
1%global         daemon mongod
2%bcond_without  v8
3
4Name:           mongodb
5Version:        2.2.0
6Release:        2%{?_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* Mon Dec 09 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.2.0-2
257- rebuild with libboost-1.54.0
258
259* Wed Oct 24 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 2.2.0-1
260- initial build for Vine Linux
261
262* Tue Oct 02 2012 Troy Dawson <tdawson@redhat.com> - 2.2.0-6
263- full flag patch to get 32 bit builds to work
264
265* Tue Oct 02 2012 Troy Dawson <tdawson@redhat.com> - 2.2.0-5
266- shared libraries patch
267- Fix up minor %files issues
268
269* Fri Sep 28 2012 Troy Dawson <tdawson@redhat.com> - 2.2.0-4
270- Fix spec files problems
271
272* Fri Sep 28 2012 Troy Dawson <tdawson@redhat.com> - 2.2.0-3
273- Updated patch to use system libraries
274- Update init script to use a pidfile
275
276* Thu Sep 27 2012 Troy Dawson <tdawson@redhat.com> - 2.2.0-2
277- Added patch to use system libraries
278
279* Wed Sep 19 2012 Troy Dawson <tdawson@redhat.com> - 2.2.0-1
280- Updated to 2.2.0
281- Updated patches that were still needed
282- use v8 instead of spider_monkey due to bundled library issues
283
284* Tue Aug 21 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.7-1
285- Update to 2.0.7
286- Don't patch for boost-filesystem version 3 on EL6
287
288* Mon Aug 13 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.6-3
289- Remove EL5 support
290- Add patch to use boost-filesystem version 3
291
292* Wed Aug 01 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.6-2
293- Don't apply fix-xtime patch on EL5
294
295* Wed Aug 01 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.6-1
296- Update to 2.0.6
297- Update no-term patch
298- Add fix-xtime patch for new boost
299
300* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.4-2
301- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
302
303* Tue Apr 17 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.4-1
304- Update to 2.0.4
305- Remove oldpython patch (fixed upstream)
306- Remove snappy patch (fixed upstream)
307
308* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-10
309- Rebuilt for c++ ABI breakage
310
311* Fri Feb 10 2012 Petr Pisar <ppisar@redhat.com> - 2.0.2-9
312- Rebuild against PCRE 8.30
313
314* Fri Feb 03 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-8
315- Disable HTTP interface by default (#752331)
316
317* Fri Feb 03 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-7
318- Enable journaling by default (#656112)
319- Remove BuildRequires on unittest (#755081)
320
321* Fri Feb 03 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-6
322- Clean up mongodb-src-r2.0.2-js.patch and fix #787246
323
324* Tue Jan 17 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-5
325- Enable build using external snappy
326
327* Tue Jan 17 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-4
328- Patch buildsystem for building on older pythons (RHEL5)
329
330* Mon Jan 16 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-3
331- Merge the 2.0.2 spec file with EPEL
332- Merge mongodb-sm-pkgconfig.patch into mongodb-src-r2.0.2-js.patch
333
334* Mon Jan 16 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-2
335- Add pkg-config enablement patch
336
337* Sat Jan 14 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-1
338- Update to 2.0.2
339- Add new files (mongotop and bsondump manpage)
340- Update mongodb-src-r1.8.2-js.patch => mongodb-src-r2.0.2-js.patch
341- Update mongodb-fix-fork.patch
342- Fix pcre linking
343
344* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.2-11
345- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
346
347* Sun Nov 20 2011 Chris Lalancette <clalancette@gmail.com> - 1.8.2-10
348- Rebuild for rawhide boost update
349
350* Thu Sep 22 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-9
351- Copy the right source file into place for tmpfiles.d
352
353* Tue Sep 20 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-8
354- Add a tmpfiles.d file to create the /var/run/mongodb subdirectory
355
356* Mon Sep 12 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-7
357- Add a patch to fix the forking to play nice with systemd
358- Make the /var/run/mongodb directory owned by mongodb
359
360* Thu Jul 28 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-6
361- BZ 725601 - fix the javascript engine to not hang (thanks to Eduardo Habkost)
362
363* Mon Jul 25 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-5
364- Fixes to post server, preun server, and postun server to use systemd
365
366* Thu Jul 21 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-4
367- Update to use systemd init
368
369* Thu Jul 21 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-3
370- Rebuild for boost ABI break
371
372* Wed Jul 13 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-2
373- Make mongodb-devel require boost-devel (BZ 703184)
374
375* Fri Jul 01 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-1
376- Update to upstream 1.8.2
377- Add patch to ignore TERM
378
379* Fri Jul 01 2011 Chris Lalancette <clalance@redhat.com> - 1.8.0-3
380- Bump release to build against new boost package
381
382* Sat Mar 19 2011 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.8.0-2
383- Make mongod bind only to 127.0.0.1 by default
384
385* Sat Mar 19 2011 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.8.0-1
386- Update to 1.8.0
387- Remove upstreamed nonce patch
388
389* Wed Feb 16 2011 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.7.5-5
390- Add nonce patch
391
392* Sun Feb 13 2011 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.7.5-4
393- Manually define to use boost-fs v2
394
395* Sat Feb 12 2011 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.7.5-3
396- Disable extra warnings
397
398* Fri Feb 11 2011 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.7.5-2
399- Disable compilation errors on warnings
400
401* Fri Feb 11 2011 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.7.5-1
402- Update to 1.7.5
403- Remove CPPFLAGS override
404- Added libmongodb package
405
406* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.4-4
407- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
408
409* Mon Dec 06 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.6.4-3
410- Add post/postun ldconfig... oops!
411
412* Mon Dec 06 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.6.4-2
413- Enable --sharedclient option, remove static lib
414
415* Sat Dec 04 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.6.4-1
416- New upstream release
417
418* Fri Oct 08 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.6.3-4
419- Put -fPIC onto both the build and install scons calls
420
421* Fri Oct 08 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.6.3-3
422- Define _initddir when it doesn't exist for el5 and others
423
424* Fri Oct 08 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.6.3-2
425- Added -fPIC build option which was dropped by accident
426
427* Thu Oct  7 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.6.3-1
428- removed js Requires
429- new upstream release
430- added more excludearches: sparc s390, s390x and bugzilla pointer
431
432* Tue Sep  7 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.6.2-2
433- added ExcludeArch for ppc
434
435* Fri Sep  3 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.6.2-1
436- new upstream release 1.6.2
437- send mongod the USR1 signal when doing logrotate
438- use config options when starting the daemon from the initfile
439- removed dbpath patch: rely on config
440- added pid directory to config file and created the dir in the spec
441- made the init script use options from the config file
442- changed logpath in mongodb.conf
443
444* Wed Sep  1 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.6.1-1
445- new upstream release 1.6.1
446- patched SConstruct to allow setting cppflags
447- stopped using sed and chmod macros
448
449* Fri Aug  6 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.6.0-1
450- new upstream release: 1.6.0
451- added -server package
452- added new license file to %%docs
453- fix spurious permissions and EOF encodings on some files
454
455* Tue Jun 15 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.4.3-2
456- added explicit js requirement
457- changed some names
458
459* Wed May 26 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.4.3-1
460- updated to 1.4.3
461- added zlib license for util/md5
462- deleted upstream deb/rpm recipes
463- made scons not strip binaries
464- made naming more consistent in logfile, lockfiles, init scripts etc.
465- included manpages and added corresponding license
466- added mongodb.conf to sources
467
468* Fri Oct  2 2009 Ionuț Arțăriși <mapleoin@fedoraproject.org> - 1.0.0-3
469- fixed libpath issue for 64bit systems
470
471* Thu Oct  1 2009 Ionuț Arțăriși <mapleoin@fedoraproject.org> - 1.0.0-2
472- added virtual -static package
473
474* Mon Aug 31 2009 Ionuț Arțăriși <mapleoin@fedoraproject.org> - 1.0.0-1
475- Initial release.
Note: See TracBrowser for help on using the repository browser.