]> git.pld-linux.org Git - packages/mongodb.git/blame_incremental - mongodb.spec
- 1.8.3
[packages/mongodb.git] / mongodb.spec
... / ...
CommitLineData
1#
2# TODO
3# - pass our rpm*cflags
4#
5Summary: MongoDB client shell and tools
6Name: mongodb
7Version: 1.8.3
8Release: 0.1
9License: AGPL 3.0
10Group: Applications/Databases
11URL: http://www.mongodb.org/
12Source0: http://downloads.mongodb.org/src/%{name}-src-r%{version}.tar.gz
13# Source0-md5: 662e7ad6ff9f8e4d16c72c038b4a0c60
14Source1: %{name}.logrotate
15Source2: %{name}.init
16Patch0: config.patch
17# BuildRequires: libpcap-devel
18BuildRequires: boost-devel >= 1.42
19BuildRequires: libstdc++-devel >= 6:4.0
20BuildRequires: pcre-cxx-devel
21BuildRequires: pcre-devel
22BuildRequires: readline-devel
23BuildRequires: rpmbuild(macros) >= 1.228
24BuildRequires: scons >= 1.2
25BuildRequires: sed >= 4.0
26BuildRequires: v8-devel
27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29%description
30Mongo (from "huMONGOus") is a schema-free document-oriented database.
31It features dynamic profileable queries, full indexing, replication
32and fail-over support, efficient storage of large binary data objects,
33and auto-sharding.
34
35This package provides the mongo shell, import/export tools, and other
36client utilities.
37
38%package devel
39Summary: Headers and libraries for mongo development
40Group: Development/Libraries
41Requires: %{name} = %{version}-%{release}
42
43%description devel
44Mongo (from "huMONGOus") is a schema-free document-oriented database.
45
46This package provides the mongo static library and header files needed
47to develop mongo client software.
48
49%package server
50Summary: MongoDB server, sharding server, and support scripts
51Group: Applications/Databases
52Requires: %{name} = %{version}-%{release}
53Provides: group(mongod)
54Provides: user(mongod)
55Requires(post,preun): /sbin/chkconfig
56Requires(postun): /usr/sbin/groupdel
57Requires(postun): /usr/sbin/userdel
58Requires(pre): /bin/id
59Requires(pre): /usr/bin/getgid
60Requires(pre): /usr/sbin/groupadd
61Requires(pre): /usr/sbin/useradd
62Requires: rc-scripts
63
64%description server
65Mongo (from "huMONGOus") is a schema-free document-oriented database.
66
67This package provides the mongo server software, mongo sharding server
68softwware, default configuration files, and init.d scripts.
69
70%prep
71%setup -q -n %{name}-src-r%{version}
72%patch0 -p1
73%{__sed} -i 's,-O3,,' SConstruct
74
75# Fix permissions
76find -type f -executable | xargs chmod a-x
77
78%build
79%scons \
80 --prefix=$RPM_BUILD_ROOT%{_prefix} \
81 --sharedclient \
82 --full all \
83 --usev8 \
84 --cxx=%{__cxx}
85
86# XXX really should have shared library here
87
88%install
89rm -rf $RPM_BUILD_ROOT
90install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1} \
91 $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig} \
92 $RPM_BUILD_ROOT%{_var}/{lib,log}/mongo
93
94%scons install \
95 --prefix=$RPM_BUILD_ROOT%{_prefix} \
96 --sharedclient \
97 --full \
98 --usev8
99
100install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mongod
101cp -a rpm/mongod.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/mongod
102
103cp -a %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/mongod
104cp -a rpm/mongod.conf $RPM_BUILD_ROOT%{_sysconfdir}/mongod.conf
105
106cp -a debian/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
107
108touch $RPM_BUILD_ROOT%{_var}/log/mongo/mongod.log
109
110%clean
111rm -rf $RPM_BUILD_ROOT
112
113%pre server
114%groupadd -g 258 -r mongod
115%useradd -u 258 -r -g mongod -d %{_var}/lib/mongo -s /bin/false -c "MongoDB Database Server" mongod
116
117%post server
118/sbin/chkconfig --add mongod
119%service mongod restart
120
121%preun server
122if [ "$1" = "0" ]; then
123 %service -q mongod stop
124 /sbin/chkconfig --del mongod
125fi
126
127%postun server
128if [ "$1" = "0" ]; then
129 %userremove mongod
130 %groupremove mongod
131fi
132
133%files
134%defattr(644,root,root,755)
135%doc README GNU-AGPL-3.0.txt
136%attr(755,root,root) %{_bindir}/mongo
137%attr(755,root,root) %{_bindir}/mongodump
138%attr(755,root,root) %{_bindir}/mongoexport
139%attr(755,root,root) %{_bindir}/mongofiles
140%attr(755,root,root) %{_bindir}/mongoimport
141%attr(755,root,root) %{_bindir}/mongorestore
142#%%attr(755,root,root) %{_bindir}/mongosniff
143%attr(755,root,root) %{_bindir}/mongostat
144%attr(755,root,root) %{_bindir}/bsondump
145%{_mandir}/man1/mongo.1*
146%{_mandir}/man1/mongod.1*
147%{_mandir}/man1/mongodump.1*
148%{_mandir}/man1/mongoexport.1*
149%{_mandir}/man1/mongofiles.1*
150%{_mandir}/man1/mongoimport.1*
151%{_mandir}/man1/mongosniff.1*
152%{_mandir}/man1/mongostat.1*
153%{_mandir}/man1/mongorestore.1*
154
155%files server
156%defattr(644,root,root,755)
157%dir %{_sysconfdir}
158%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mongod.conf
159%attr(754,root,root) /etc/rc.d/init.d/mongod
160%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mongod
161%config(noreplace) /etc/logrotate.d/mongod
162%attr(755,root,root) %{_bindir}/mongod
163%attr(755,root,root) %{_bindir}/mongos
164%{_mandir}/man1/mongos.1*
165%attr(755,mongod,mongod) %dir %{_var}/lib/mongo
166%attr(755,mongod,mongod) %dir %{_var}/log/mongo
167%attr(640,mongod,mongod) %config(noreplace) %verify(not md5 mtime size) %{_var}/log/mongo/mongod.log
168
169%files devel
170%defattr(644,root,root,755)
171%{_includedir}/mongo
172%{_libdir}/libmongoclient.a
173%{_libdir}/libmongoclient.so
174#%{_libdir}/libmongotestfiles.a
This page took 0.065224 seconds and 4 git commands to generate.