]> git.pld-linux.org Git - packages/mongodb.git/blob - mongodb.spec
- pcre-devel still required to build
[packages/mongodb.git] / mongodb.spec
1 Summary:        MongoDB client shell and tools
2 Name:           mongodb
3 Version:        1.6.2
4 Release:        0
5 License:        AGPL 3.0
6 Group:          Applications/Databases
7 URL:            http://www.mongodb.org
8 Source0:        http://downloads.mongodb.org/src/%{name}-src-r%{version}.tar.gz
9 # Source0-md5:  358bfc52855a66d3c954e7f6f51bcd12
10 Source1:        %{name}.logrotate
11 Source2:        %{name}.init
12 # BuildRequires:  libpcap-devel
13 BuildRequires:  boost-devel >= 1.42
14 BuildRequires:  gcc >= 4.0
15 BuildRequires:  libstdc++-devel
16 BuildRequires:  libstdc++-devel >= 4.0
17 BuildRequires:  pcre-cxx-devel
18 BuildRequires:  pcre-devel
19 BuildRequires:  readline-devel
20 BuildRequires:  scons >= 1.2
21 BuildRequires:  v8-devel
22 Requires:       libstdc++
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 Requires(pre):  pwdutils
25
26 %description
27 Mongo (from "huMONGOus") is a schema-free document-oriented database.
28 It features dynamic profileable queries, full indexing, replication
29 and fail-over support, efficient storage of large binary data objects,
30 and auto-sharding.
31
32 This package provides the mongo shell, import/export tools, and other
33 client utilities.
34
35 %package server
36 Summary:        MongoDB server, sharding server, and support scripts
37 Group:          Applications/Databases
38 Requires:       %{name} = %{version}
39 Requires:       logrotate
40
41 %description server
42 Mongo (from "huMONGOus") is a schema-free document-oriented database.
43
44 This package provides the mongo server software, mongo sharding server
45 softwware, default configuration files, and init.d scripts.
46
47 %package devel
48 Summary:        Headers and libraries for mongo development
49 Group:          Development/Libraries
50 Requires:       %{name} = %{version}
51
52 %description devel
53 Mongo (from "huMONGOus") is a schema-free document-oriented database.
54
55 This package provides the mongo static library and header files needed
56 to develop mongo client software.
57
58 %prep
59 %setup -q -n %{name}-src-r%{version}
60
61 %build
62 # Fix permission
63 find %{_builddir}/%{name}-src-r%{version} -type f -executable -exec chmod a-x '{}' \;
64
65 %scons -j 3 --prefix=$RPM_BUILD_ROOT%{_prefix} --sharedclient --full all --usev8
66 # XXX really should have shared library here
67
68 %install
69 rm -rf $RPM_BUILD_ROOT
70 scons --prefix=$RPM_BUILD_ROOT%{_usr} --sharedclient --full --usev8 install
71
72 install -d $RPM_BUILD_ROOT%{_mandir}/man1
73 cp 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
78 install -d $RPM_BUILD_ROOT%{_sysconfdir}
79 cp 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
84 install -d $RPM_BUILD_ROOT%{_var}/lib/mongo
85 install -d $RPM_BUILD_ROOT%{_var}/log/mongo
86 touch $RPM_BUILD_ROOT%{_var}/log/mongo/mongod.log
87 # install logrotate
88 install -D %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/mongod
89 # install init script
90 install -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
94 ln -s ../..%{_sysconfdir}/init.d/mongod $RPM_BUILD_ROOT%{_sbindir}/rcmongod
95
96 %clean
97 scons -c --usev8
98 rm -rf $RPM_BUILD_ROOT
99
100 %pre server
101 groupadd -r mongod 2>/dev/null || :
102 useradd -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.140658 seconds and 4 git commands to generate.