]> git.pld-linux.org Git - packages/mongodb.git/blame_incremental - mongodb.spec
Better default config file provided
[packages/mongodb.git] / mongodb.spec
... / ...
CommitLineData
1# TODO:
2# - fix 'libs' subpackage (disabled due to broken 'sharedclient' build option)
3#
4Summary: MongoDB client shell and tools
5Summary(pl.UTF-8): Powłoka kliencka i narzędzia dla bazy danych MongoDB
6Name: mongodb
7Version: 2.2.0
8Release: 1
9License: AGPL v3
10Group: Applications/Databases
11Source0: http://downloads.mongodb.org/src/%{name}-src-r%{version}.tar.gz
12# Source0-md5: 832bdb6cc659176fd8d6b16a660ccfc6
13Source1: %{name}.logrotate
14Source2: %{name}.init
15Source3: mongod-default.conf
16Patch0: %{name}-cflags.patch
17Patch1: %{name}-system-libs.patch
18Patch2: boost-1.50.patch
19Patch3: %{name}-install.patch
20URL: http://www.mongodb.org/
21BuildRequires: boost-devel >= 1.50
22BuildRequires: libpcap-devel
23BuildRequires: libstdc++-devel >= 6:4.0
24%ifarch x86_64
25BuildRequires: libtcmalloc-devel
26%endif
27BuildRequires: pcre-cxx-devel
28BuildRequires: pcre-devel >= 8.30
29BuildRequires: readline-devel
30BuildRequires: rpmbuild(macros) >= 1.228
31BuildRequires: scons >= 1.2
32BuildRequires: sed >= 4.0
33BuildRequires: snappy-devel
34BuildRequires: v8-devel
35#Requires: %{name}-libs = %{version}-%{release}
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38%description
39Mongo (from "huMONGOus") is a schema-free document-oriented database.
40It features dynamic profileable queries, full indexing, replication
41and fail-over support, efficient storage of large binary data objects,
42and auto-sharding.
43
44This package provides the mongo shell, import/export tools, and other
45client utilities.
46
47%description -l pl.UTF-8
48Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty
49pozbawione schematu. Obsługuje dynamicznie profilowane zapytania,
50pełne indeksowanie, replikację i fail-over, wydajne składowanie dużych
51obiektów danych binarnych oraz automatyczne dzielenie.
52
53Ten pakiet zawiera powłokę mongo, narzędzia do eksportu/importu danych
54oraz inne narzędzia klienckie.
55
56%package libs
57Summary: MongoDB client library
58Summary(pl.UTF-8): Biblioteka kliencka MongoDB
59Group: Libraries
60
61%description libs
62Mongo (from "huMONGOus") is a schema-free document-oriented database.
63
64This package provides the mongo client library.
65
66%description libs -l pl.UTF-8
67Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty
68pozbawione schematu.
69
70Ten pakiet zawiera bibliotekę kliencką mongo.
71
72%package devel
73Summary: Header files for MongoDB client library
74Summary(pl.UTF-8): Pliki nagłówkowe biblioteki klienckiej MongoDB
75Group: Development/Libraries
76#Requires: %{name}-libs = %{version}-%{release}
77Requires: %{name}-static = %{version}-%{release}
78
79%description devel
80Mongo (from "huMONGOus") is a schema-free document-oriented database.
81
82This package provides the header files needed to develop MongoDB
83client software.
84
85%description devel -l pl.UTF-8
86Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty
87pozbawione schematu.
88
89Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia
90oprogramowania klienckiego dla MongoDB.
91
92%package static
93Summary: Static MongoDB client library
94Summary(pl.UTF-8): Statyczna biblioteka kliencka MongoDB
95Group: Development/Libraries
96#Requires: %{name}-libs = %{version}-%{release}
97
98%description static
99Mongo (from "huMONGOus") is a schema-free document-oriented database.
100
101This package provides the MongoDB static client library.
102
103%description static -l pl.UTF-8
104Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty
105pozbawione schematu.
106
107Ten pakiet zawiera statyczną bibliotekę kliencką MongoDB.
108
109%package server
110Summary: MongoDB server, sharding server, and support scripts
111Summary(pl.UTF-8): Serwer MongoDB, serwer dzielący oraz skrypty pomocnicze
112Group: Applications/Databases
113Requires: %{name} = %{version}-%{release}
114Requires(post,preun): /sbin/chkconfig
115Requires(postun): /usr/sbin/groupdel
116Requires(postun): /usr/sbin/userdel
117Requires(pre): /bin/id
118Requires(pre): /usr/bin/getgid
119Requires(pre): /usr/sbin/groupadd
120Requires(pre): /usr/sbin/useradd
121Requires: rc-scripts
122Provides: group(mongod)
123Provides: user(mongod)
124Conflicts: logrotate < 3.8.0
125
126%description server
127Mongo (from "huMONGOus") is a schema-free document-oriented database.
128
129This package provides the mongo server software, mongo sharding server
130software, default configuration files, and init.d scripts.
131
132%description server -l pl.UTF-8
133Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty
134pozbawione schematu.
135
136Ten pakiet zawiera serwer mongo, serwer dzielący, pliki domyślnej
137konfiguracji oraz skrypty init.d.
138
139%prep
140%setup -q -n %{name}-src-r%{version}
141%patch0 -p1
142%patch1 -p1
143%patch2 -p1
144%patch3 -p1
145
146# Fix permissions
147find -type f -executable | xargs chmod a-x
148
149# force system pcre/js/snappy
150%{__rm} -r src/third_party/{js-1.7,pcre-8.30,snappy,boost}
151
152%build
153%scons \
154 CPPFLAGS="%{rpmcppflags} -DXP_UNIX" \
155 --use-system-all=yes \
156 --extralib=pcrecpp,pcre,snappy \
157 --prefix=$RPM_BUILD_ROOT%{_prefix} \
158 --full=all \
159 --usev8 \
160 --cxx=%{__cxx}
161
162%install
163rm -rf $RPM_BUILD_ROOT
164install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1} \
165 $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,mongod} \
166 $RPM_BUILD_ROOT%{_var}/{lib,log{,/archive}}/mongo
167
168# XXX: scons is so great, recompiles everything here!
169%scons install \
170 --use-system-all=yes \
171 --extralib=pcrecpp,pcre,snappy \
172 --prefix=$RPM_BUILD_ROOT%{_prefix} \
173 --full=all \
174 --usev8 \
175 --cxx=%{__cxx}
176
177cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/mongod
178install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mongod
179cp -p rpm/mongod.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/mongod
180install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/mongod/default.conf
181cp -p debian/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
182
183touch $RPM_BUILD_ROOT%{_var}/log/mongo/mongod.log
184
185# for some reason these are installed twice, remove unwanted copies
186for f in $RPM_BUILD_ROOT%{_includedir}/mongo/* ; do
187 rm -r "$RPM_BUILD_ROOT%{_includedir}/$(basename $f)" || :
188done
189
190%clean
191rm -rf $RPM_BUILD_ROOT
192
193%post libs -p /sbin/ldconfig
194%postun libs -p /sbin/ldconfig
195
196%pre server
197%groupadd -g 258 -r mongod
198%useradd -u 258 -r -g mongod -d %{_var}/lib/mongo -s /bin/false -c "MongoDB Database Server" mongod
199
200%post server
201/sbin/chkconfig --add mongod
202%service mongod restart
203
204%preun server
205if [ "$1" = "0" ]; then
206 %service -q mongod stop
207 /sbin/chkconfig --del mongod
208fi
209
210%postun server
211if [ "$1" = "0" ]; then
212 %userremove mongod
213 %groupremove mongod
214fi
215
216%triggerpostun server -- %{name}-server < 2.0.6-3
217if [ -f %{_sysconfdir}/mongod.conf.rpmsave ] ; then
218 cp -f %{_sysconfdir}/mongod/default.conf{,.rpmnew} || :
219 echo "Moving %{_sysconfdir}/mongod.conf to %{_sysconfdir}/mongod/default.conf"
220 mv -f %{_sysconfdir}/mongod.conf.rpmsave %{_sysconfdir}/mongod/default.conf
221 %service mongod restart
222fi
223
224%files
225%defattr(644,root,root,755)
226%doc README GNU-AGPL-3.0.txt
227%attr(755,root,root) %{_bindir}/bsondump
228%attr(755,root,root) %{_bindir}/mongo
229%attr(755,root,root) %{_bindir}/mongodump
230%attr(755,root,root) %{_bindir}/mongoexport
231%attr(755,root,root) %{_bindir}/mongofiles
232%attr(755,root,root) %{_bindir}/mongoimport
233%attr(755,root,root) %{_bindir}/mongooplog
234%attr(755,root,root) %{_bindir}/mongoperf
235%attr(755,root,root) %{_bindir}/mongorestore
236%attr(755,root,root) %{_bindir}/mongosniff
237%attr(755,root,root) %{_bindir}/mongostat
238%attr(755,root,root) %{_bindir}/mongotop
239%{_mandir}/man1/bsondump.1*
240%{_mandir}/man1/mongo.1*
241%{_mandir}/man1/mongodump.1*
242%{_mandir}/man1/mongoexport.1*
243%{_mandir}/man1/mongofiles.1*
244%{_mandir}/man1/mongoimport.1*
245%{_mandir}/man1/mongosniff.1*
246%{_mandir}/man1/mongostat.1*
247%{_mandir}/man1/mongorestore.1*
248
249%if 0
250%files libs
251%defattr(644,root,root,755)
252%attr(755,root,root) %{_libdir}/libmongoclient.so
253%endif
254
255%files devel
256%defattr(644,root,root,755)
257%{_includedir}/mongo
258
259%files static
260%defattr(644,root,root,755)
261%{_libdir}/libmongoclient.a
262
263%files server
264%defattr(644,root,root,755)
265#%dir %{_sysconfdir}
266%dir %{_sysconfdir}/mongod
267%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mongod/default.conf
268%attr(754,root,root) /etc/rc.d/init.d/mongod
269%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mongod
270%config(noreplace) /etc/logrotate.d/mongod
271%attr(755,root,root) %{_bindir}/mongod
272%attr(755,root,root) %{_bindir}/mongos
273%{_mandir}/man1/mongod.1*
274%{_mandir}/man1/mongos.1*
275%attr(755,mongod,mongod) %dir %{_var}/lib/mongo
276%attr(775,root,mongod) %dir %{_var}/log/mongo
277%attr(775,root,mongod) %dir %{_var}/log/archive/mongo
278%attr(640,mongod,mongod) %config(noreplace) %verify(not md5 mtime size) %{_var}/log/mongo/mongod.log
This page took 0.026348 seconds and 4 git commands to generate.