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