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