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