]> git.pld-linux.org Git - packages/mongodb.git/blob - mongodb.spec
- pl, cleanup
[packages/mongodb.git] / mongodb.spec
1 #
2 # TODO
3 # - pass our rpm*cflags
4 #
5 Summary:        MongoDB client shell and tools
6 Summary(pl.UTF-8):      Powłoka kliencka i narzędzia dla bazy danych MongoDB
7 Name:           mongodb
8 Version:        1.8.3
9 Release:        0.1
10 License:        AGPL 3.0
11 Group:          Applications/Databases
12 Source0:        http://downloads.mongodb.org/src/%{name}-src-r%{version}.tar.gz
13 # Source0-md5:  662e7ad6ff9f8e4d16c72c038b4a0c60
14 Source1:        %{name}.logrotate
15 Source2:        %{name}.init
16 Patch0:         config.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:  v8-devel
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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
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
48 %package devel
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
51 Group:          Development/Libraries
52 Requires:       %{name} = %{version}-%{release}
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
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
67 %package server
68 Summary:        MongoDB server, sharding server, and support scripts
69 Summary(pl.UTF-8):      Serwer MongoDB, serwer dzielący oraz skrypty pomocnicze
70 Group:          Applications/Databases
71 Requires:       %{name} = %{version}-%{release}
72 Provides:       group(mongod)
73 Provides:       user(mongod)
74 Requires(post,preun):   /sbin/chkconfig
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
81 Requires:       rc-scripts
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
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.
95
96 %prep
97 %setup -q -n %{name}-src-r%{version}
98 %patch0 -p1
99 %{__sed} -i 's,-O3,%{rpmcxxflags},;/,\.\.\/v8/d' SConstruct
100
101 # Fix permissions
102 find -type f -executable | xargs chmod a-x
103
104 %build
105 %scons \
106         --prefix=$RPM_BUILD_ROOT%{_prefix} \
107         --sharedclient \
108         --full all \
109         --usev8 \
110         --cxx=%{__cxx}
111
112 # XXX really should have shared library here
113
114 %install
115 rm -rf $RPM_BUILD_ROOT
116 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1} \
117         $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig} \
118         $RPM_BUILD_ROOT%{_var}/{lib,log}/mongo
119
120 %scons install \
121         --prefix=$RPM_BUILD_ROOT%{_prefix} \
122         --sharedclient \
123         --full \
124         --usev8
125
126 cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/mongod
127 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mongod
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
131
132 touch $RPM_BUILD_ROOT%{_var}/log/mongo/mongod.log
133
134 %clean
135 rm -rf $RPM_BUILD_ROOT
136
137 %pre server
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
140
141 %post server
142 /sbin/chkconfig --add mongod
143 %service mongod restart
144
145 %preun server
146 if [ "$1" = "0" ]; then
147         %service -q mongod stop
148         /sbin/chkconfig --del mongod
149 fi
150
151 %postun server
152 if [ "$1" = "0" ]; then
153         %userremove mongod
154         %groupremove mongod
155 fi
156
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
166 #%%attr(755,root,root) %{_bindir}/mongosniff
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)
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
185 %config(noreplace) /etc/logrotate.d/mongod
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)
195 %attr(755,root,root) %{_libdir}/libmongoclient.so
196 %{_libdir}/libmongoclient.a
197 #%{_libdir}/libmongotestfiles.a
198 %{_includedir}/mongo
This page took 0.07945 seconds and 4 git commands to generate.