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