]> git.pld-linux.org Git - packages/mongodb.git/blob - mongodb.spec
- cleanup files (remove suse junk), pldize
[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 devel
34 Summary:        Headers and libraries for mongo development
35 Group:          Development/Libraries
36 Requires:       %{name} = %{version}-%{release}
37
38 %description devel
39 Mongo (from "huMONGOus") is a schema-free document-oriented database.
40
41 This package provides the mongo static library and header files needed
42 to develop mongo client software.
43
44 %package server
45 Summary:        MongoDB server, sharding server, and support scripts
46 Group:          Applications/Databases
47 Requires:       %{name} = %{version}-%{release}
48
49 %description server
50 Mongo (from "huMONGOus") is a schema-free document-oriented database.
51
52 This package provides the mongo server software, mongo sharding server
53 softwware, default configuration files, and init.d scripts.
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,sysconfig} \
74         $RPM_BUILD_ROOT%{_var}/{lib,log}/mongo
75
76 %scons install \
77         --prefix=$RPM_BUILD_ROOT%{_prefix} \
78         --sharedclient \
79         --full \
80         --usev8
81
82 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mongod
83 cp -a rpm/mongod.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/mongod
84
85 cp -a %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/mongod
86 cp -a rpm/mongod.conf $RPM_BUILD_ROOT%{_sysconfdir}/mongod.conf
87
88 cp -a debian/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
89
90 touch $RPM_BUILD_ROOT%{_var}/log/mongo/mongod.log
91
92 %clean
93 rm -rf $RPM_BUILD_ROOT
94
95 %pre server
96 groupadd -r mongod 2>/dev/null || :
97 useradd -r -g mongod -d %{_var}/lib/mongo -s /sbin/nologin -c "user for MongoDB Database Server" mongod 2>/dev/null || :
98
99 %post server
100 #%fillup_and_insserv -n mongod mongod
101 #%restart_on_update mongod
102
103 %preun server
104 #%stop_on_removal mongod
105
106 %postun server
107
108 %files
109 %defattr(644,root,root,755)
110 %doc README GNU-AGPL-3.0.txt
111 %attr(755,root,root) %{_bindir}/mongo
112 %attr(755,root,root) %{_bindir}/mongodump
113 %attr(755,root,root) %{_bindir}/mongoexport
114 %attr(755,root,root) %{_bindir}/mongofiles
115 %attr(755,root,root) %{_bindir}/mongoimport
116 %attr(755,root,root) %{_bindir}/mongorestore
117 %attr(755,root,root) %{_bindir}/mongostat
118 %attr(755,root,root) %{_bindir}/bsondump
119 %{_mandir}/man1/mongo.1*
120 %{_mandir}/man1/mongod.1*
121 %{_mandir}/man1/mongodump.1*
122 %{_mandir}/man1/mongoexport.1*
123 %{_mandir}/man1/mongofiles.1*
124 %{_mandir}/man1/mongoimport.1*
125 %{_mandir}/man1/mongosniff.1*
126 %{_mandir}/man1/mongostat.1*
127 %{_mandir}/man1/mongorestore.1*
128
129 %files server
130 %defattr(644,root,root,755)
131 %dir %{_sysconfdir}
132 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mongod.conf
133 %attr(754,root,root) /etc/rc.d/init.d/mongod
134 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mongod
135 %config(noreplace) /etc/logrotate.d/mongod
136 %attr(755,root,root) %{_bindir}/mongod
137 %attr(755,root,root) %{_bindir}/mongos
138 %{_mandir}/man1/mongos.1*
139 %attr(755,mongod,mongod) %dir %{_var}/lib/mongo
140 %attr(755,mongod,mongod) %dir %{_var}/log/mongo
141 %attr(640,mongod,mongod) %config(noreplace) %verify(not md5 mtime size) %{_var}/log/mongo/mongod.log
142
143 %files devel
144 %defattr(644,root,root,755)
145 %{_includedir}/mongo
146 %{_libdir}/libmongoclient.a
147 %{_libdir}/libmongoclient.so
148 #%{_libdir}/libmongotestfiles.a
This page took 0.092161 seconds and 4 git commands to generate.