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