]> git.pld-linux.org Git - packages/mongodb.git/blame - mongodb.spec
- 1.8.3
[packages/mongodb.git] / mongodb.spec
CommitLineData
5688efcd 1#
d1b0fd13 2# TODO
75e22e92 3# - pass our rpm*cflags
5688efcd 4#
69fbae1d 5Summary: MongoDB client shell and tools
6Name: mongodb
105f2c53 7Version: 1.8.3
d1b0fd13 8Release: 0.1
69fbae1d 9License: AGPL 3.0
10Group: Applications/Databases
d1b0fd13 11URL: http://www.mongodb.org/
1987b887 12Source0: http://downloads.mongodb.org/src/%{name}-src-r%{version}.tar.gz
105f2c53 13# Source0-md5: 662e7ad6ff9f8e4d16c72c038b4a0c60
1987b887 14Source1: %{name}.logrotate
15Source2: %{name}.init
105f2c53 16Patch0: config.patch
69fbae1d 17# BuildRequires: libpcap-devel
18BuildRequires: boost-devel >= 1.42
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
69fbae1d 26BuildRequires: v8-devel
69fbae1d 27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69fbae1d 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
69fbae1d 38%package devel
1987b887 39Summary: Headers and libraries for mongo development
69fbae1d 40Group: Development/Libraries
c5835a7a 41Requires: %{name} = %{version}-%{release}
69fbae1d 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
748739f7
ER
49%package server
50Summary: MongoDB server, sharding server, and support scripts
51Group: Applications/Databases
52Requires: %{name} = %{version}-%{release}
40ec6826
ER
53Provides: group(mongod)
54Provides: user(mongod)
aa21d651 55Requires(post,preun): /sbin/chkconfig
40ec6826
ER
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
aa21d651 62Requires: rc-scripts
748739f7
ER
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
69fbae1d 70%prep
71%setup -q -n %{name}-src-r%{version}
105f2c53 72%patch0 -p1
75e22e92 73%{__sed} -i 's,-O3,,' SConstruct
69fbae1d 74
d1b0fd13
ER
75# Fix permissions
76find -type f -executable | xargs chmod a-x
77
69fbae1d 78%build
d1b0fd13
ER
79%scons \
80 --prefix=$RPM_BUILD_ROOT%{_prefix} \
81 --sharedclient \
82 --full all \
75e22e92 83 --usev8 \
84 --cxx=%{__cxx}
69fbae1d 85
69fbae1d 86# XXX really should have shared library here
87
88%install
89rm -rf $RPM_BUILD_ROOT
d1b0fd13 90install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1} \
748739f7 91 $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig} \
d1b0fd13 92 $RPM_BUILD_ROOT%{_var}/{lib,log}/mongo
748739f7 93
d1b0fd13
ER
94%scons install \
95 --prefix=$RPM_BUILD_ROOT%{_prefix} \
96 --sharedclient \
97 --full \
98 --usev8
99
748739f7
ER
100install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mongod
101cp -a rpm/mongod.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/mongod
69fbae1d 102
748739f7 103cp -a %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/mongod
d1b0fd13 104cp -a rpm/mongod.conf $RPM_BUILD_ROOT%{_sysconfdir}/mongod.conf
69fbae1d 105
748739f7 106cp -a debian/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
69fbae1d 107
748739f7 108touch $RPM_BUILD_ROOT%{_var}/log/mongo/mongod.log
69fbae1d 109
110%clean
69fbae1d 111rm -rf $RPM_BUILD_ROOT
112
113%pre server
5688efcd 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
69fbae1d 116
117%post server
aa21d651
ER
118/sbin/chkconfig --add mongod
119%service mongod restart
69fbae1d 120
121%preun server
aa21d651
ER
122if [ "$1" = "0" ]; then
123 %service -q mongod stop
124 /sbin/chkconfig --del mongod
125fi
69fbae1d 126
5688efcd 127%postun server
40ec6826
ER
128if [ "$1" = "0" ]; then
129 %userremove mongod
130 %groupremove mongod
131fi
132
69fbae1d 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
105f2c53 142#%%attr(755,root,root) %{_bindir}/mongosniff
69fbae1d 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)
748739f7
ER
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
69fbae1d 161%config(noreplace) /etc/logrotate.d/mongod
69fbae1d 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.112094 seconds and 4 git commands to generate.