]> git.pld-linux.org Git - packages/mongodb.git/blob - mongodb.spec
- fix deps, drop bogus ldconfig
[packages/mongodb.git] / mongodb.spec
1 # TODO
2 # - pld useradd/groupadd (register uid/gid)
3 Summary:        MongoDB client shell and tools
4 Name:           mongodb
5 Version:        1.6.2
6 Release:        0.1
7 License:        AGPL 3.0
8 Group:          Applications/Databases
9 URL:            http://www.mongodb.org/
10 Source0:        http://downloads.mongodb.org/src/%{name}-src-r%{version}.tar.gz
11 # Source0-md5:  358bfc52855a66d3c954e7f6f51bcd12
12 Source1:        %{name}.logrotate
13 Source2:        %{name}.init
14 # BuildRequires:  libpcap-devel
15 BuildRequires:  boost-devel >= 1.42
16 BuildRequires:  libstdc++-devel >= 6: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 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
25 Mongo (from "huMONGOus") is a schema-free document-oriented database.
26 It features dynamic profileable queries, full indexing, replication
27 and fail-over support, efficient storage of large binary data objects,
28 and auto-sharding.
29
30 This package provides the mongo shell, import/export tools, and other
31 client utilities.
32
33 %package server
34 Summary:        MongoDB server, sharding server, and support scripts
35 Group:          Applications/Databases
36 Requires:       %{name} = %{version}-%{release}
37
38 %description server
39 Mongo (from "huMONGOus") is a schema-free document-oriented database.
40
41 This package provides the mongo server software, mongo sharding server
42 softwware, default configuration files, and init.d scripts.
43
44 %package devel
45 Summary:        Headers and libraries for mongo development
46 Group:          Development/Libraries
47 Requires:       %{name} = %{version}-%{release}
48
49 %description devel
50 Mongo (from "huMONGOus") is a schema-free document-oriented database.
51
52 This package provides the mongo static library and header files needed
53 to develop mongo client software.
54
55 %prep
56 %setup -q -n %{name}-src-r%{version}
57
58 # Fix permissions
59 find -type f -executable | xargs chmod a-x
60
61 %build
62 %scons \
63         --prefix=$RPM_BUILD_ROOT%{_prefix} \
64         --sharedclient \
65         --full all \
66         --usev8
67
68 # XXX really should have shared library here
69
70 %install
71 rm -rf $RPM_BUILD_ROOT
72 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1} \
73         $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d} \
74         $RPM_BUILD_ROOT%{_var}/{lib,log}/mongo
75 %scons install \
76         --prefix=$RPM_BUILD_ROOT%{_prefix} \
77         --sharedclient \
78         --full \
79         --usev8
80
81 cp -a debian/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
82 #install -d $RPM_BUILD_ROOT%{_sysconfdir}/init.d
83 #cp rpm/init.d-mongod $RPM_BUILD_ROOT%{_sysconfdir}/init.d/mongod
84 #chmod a+x $RPM_BUILD_ROOT%{_sysconfdir}/init.d/mongod
85
86 cp -a rpm/mongod.conf $RPM_BUILD_ROOT%{_sysconfdir}/mongod.conf
87 #install -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
88 #cp rpm/mongod.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/mongod
89 #cp rpm/mongod.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/mongod
90
91 touch $RPM_BUILD_ROOT%{_var}/log/mongo/mongod.log
92 cp -a %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/mongod
93 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mongod
94
95 #install -d $RPM_BUILD_ROOT%{_sbindir}
96 #ln -s %{_sysconfdir}/init.d/mongod $RPM_BUILD_ROOT%{_sbindir}/rcmongod
97 # XXX PFF?
98 ln -s ../../etc/rc.d/init.d/mongod $RPM_BUILD_ROOT%{_sbindir}/rcmongod
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %pre server
104 groupadd -r mongod 2>/dev/null || :
105 useradd -r -g mongod -d %{_var}/lib/mongo -s /sbin/nologin -c "user for MongoDB Database Server" mongod 2>/dev/null || :
106
107 %post server
108 #%fillup_and_insserv -n mongod mongod
109 #%restart_on_update mongod
110
111 %preun server
112 #%stop_on_removal mongod
113
114 %postun server
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.087738 seconds and 4 git commands to generate.