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