]> git.pld-linux.org Git - packages/mongodb.git/blame - mongodb.spec
- cleanup files (remove suse junk), 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
c5835a7a 16BuildRequires: libstdc++-devel >= 6:4.0
1987b887 17BuildRequires: pcre-cxx-devel
c07fcde2 18BuildRequires: pcre-devel
69fbae1d 19BuildRequires: readline-devel
20BuildRequires: scons >= 1.2
21BuildRequires: v8-devel
69fbae1d 22BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69fbae1d 23
24%description
25Mongo (from "huMONGOus") is a schema-free document-oriented database.
26It features dynamic profileable queries, full indexing, replication
27and fail-over support, efficient storage of large binary data objects,
28and auto-sharding.
29
30This package provides the mongo shell, import/export tools, and other
31client utilities.
32
69fbae1d 33%package devel
1987b887 34Summary: Headers and libraries for mongo development
69fbae1d 35Group: Development/Libraries
c5835a7a 36Requires: %{name} = %{version}-%{release}
69fbae1d 37
38%description devel
39Mongo (from "huMONGOus") is a schema-free document-oriented database.
40
41This package provides the mongo static library and header files needed
42to develop mongo client software.
43
748739f7
ER
44%package server
45Summary: MongoDB server, sharding server, and support scripts
46Group: Applications/Databases
47Requires: %{name} = %{version}-%{release}
48
49%description server
50Mongo (from "huMONGOus") is a schema-free document-oriented database.
51
52This package provides the mongo server software, mongo sharding server
53softwware, default configuration files, and init.d scripts.
54
69fbae1d 55%prep
56%setup -q -n %{name}-src-r%{version}
57
d1b0fd13
ER
58# Fix permissions
59find -type f -executable | xargs chmod a-x
60
69fbae1d 61%build
d1b0fd13
ER
62%scons \
63 --prefix=$RPM_BUILD_ROOT%{_prefix} \
64 --sharedclient \
65 --full all \
66 --usev8
69fbae1d 67
69fbae1d 68# XXX really should have shared library here
69
70%install
71rm -rf $RPM_BUILD_ROOT
d1b0fd13 72install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1} \
748739f7 73 $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig} \
d1b0fd13 74 $RPM_BUILD_ROOT%{_var}/{lib,log}/mongo
748739f7 75
d1b0fd13
ER
76%scons install \
77 --prefix=$RPM_BUILD_ROOT%{_prefix} \
78 --sharedclient \
79 --full \
80 --usev8
81
748739f7
ER
82install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mongod
83cp -a rpm/mongod.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/mongod
69fbae1d 84
748739f7 85cp -a %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/mongod
d1b0fd13 86cp -a rpm/mongod.conf $RPM_BUILD_ROOT%{_sysconfdir}/mongod.conf
69fbae1d 87
748739f7 88cp -a debian/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
69fbae1d 89
748739f7 90touch $RPM_BUILD_ROOT%{_var}/log/mongo/mongod.log
69fbae1d 91
92%clean
69fbae1d 93rm -rf $RPM_BUILD_ROOT
94
95%pre server
96groupadd -r mongod 2>/dev/null || :
97useradd -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
69fbae1d 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)
748739f7
ER
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
69fbae1d 135%config(noreplace) /etc/logrotate.d/mongod
69fbae1d 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.046667 seconds and 4 git commands to generate.