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