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