summaryrefslogtreecommitdiff
path: root/rpm
diff options
context:
space:
mode:
authorErnie Hershey <ernie.hershey@10gen.com>2013-07-26 16:35:24 -0400
committerErnie Hershey <ernie.hershey@10gen.com>2013-07-26 17:01:00 -0400
commit51a46c5f9a42dc68ca5a05c7771440f509b7a742 (patch)
treeb5b590406b3a45dbeb77f28c4688c123f174d17f /rpm
parent8a1429687d6259203db2d96b829e8e020b1a99e6 (diff)
downloadmongo-51a46c5f9a42dc68ca5a05c7771440f509b7a742.tar.gz
SERVER-963 Split and externalize Linux packages
This includes splitting rpm and .deb packages into sub-packages and externalizing the spec and control files to be maintained as static files.
Diffstat (limited to 'rpm')
-rw-r--r--rpm/mongo-10gen-unstable.spec172
1 files changed, 172 insertions, 0 deletions
diff --git a/rpm/mongo-10gen-unstable.spec b/rpm/mongo-10gen-unstable.spec
new file mode 100644
index 00000000000..8e1ba4cd058
--- /dev/null
+++ b/rpm/mongo-10gen-unstable.spec
@@ -0,0 +1,172 @@
+Name: mongo-10gen-unstable
+Conflicts: mongo, mongo-10gen, mongo-10gen-enterprise
+Version: 2.4.3
+Release: mongodb_1%{?dist}
+Summary: MongoDB server, shell, sharding server and tools
+License: AGPL 3.0
+URL: http://www.mongodb.org
+Group: Applications/Databases
+Requires: mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-mongos, mongo-10gen-unstable-tools
+
+Source0: %{name}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+
+%description
+MongoDB (from "huMONGOus") is a schema-free document-oriented database.
+It features dynamic profileable queries, full indexing, replication
+and fail-over support, efficient storage of large binary data objects,
+and auto-sharding.
+
+This package provides the mongo shell, import/export tools, other
+client utilities, server software, default configuration, and
+init.d scripts.
+
+%package server
+Summary: MongoDB server and support scripts
+
+%description server
+MongoDB (from "huMONGOus") is a schema-free document-oriented database.
+
+This package provides the mongo server software, default configuration
+files, and init.d scripts.
+
+%package shell
+Summary: MongoDB shell
+
+%description shell
+MongoDB (from "huMONGOus") is a schema-free document-oriented database.
+
+This package provides the mongo shell
+
+%package mongos
+Summary: MongoDB sharding server
+
+%description mongos
+MongoDB (from "huMONGOus") is a schema-free document-oriented database.
+
+This package provides mongos, the mongo sharding server
+
+%package tools
+Summary: MongoDB utilities
+
+%description tools
+MongoDB (from "huMONGOus") is a schema-free document-oriented database.
+
+This package provides tools for use with MongoDB
+
+%package devel
+Summary: Headers and libraries for mongo development.
+
+%description devel
+MongoDB (from "huMONGOus") is a schema-free document-oriented database.
+
+This package provides the mongo static library and header files needed
+to develop mongo client software.
+
+%prep
+%setup
+
+%build
+
+%install
+mkdir -p $RPM_BUILD_ROOT/usr
+cp -rv BINARIES/usr/bin $RPM_BUILD_ROOT/usr
+mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1
+cp debian/*.1 $RPM_BUILD_ROOT/usr/share/man/man1/
+# FIXME: remove this rm when mongosniff is back in the package
+rm -v $RPM_BUILD_ROOT/usr/share/man/man1/mongosniff.1*
+mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
+cp -v rpm/init.d-mongod $RPM_BUILD_ROOT/etc/rc.d/init.d/mongod
+chmod a+x $RPM_BUILD_ROOT/etc/rc.d/init.d/mongod
+mkdir -p $RPM_BUILD_ROOT/etc
+cp -v rpm/mongod.conf $RPM_BUILD_ROOT/etc/mongod.conf
+mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
+cp -v rpm/mongod.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/mongod
+mkdir -p $RPM_BUILD_ROOT/var/lib/mongo
+mkdir -p $RPM_BUILD_ROOT/var/log/mongo
+touch $RPM_BUILD_ROOT/var/log/mongo/mongod.log
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%pre server
+if ! /usr/bin/id -g mongod &>/dev/null; then
+ /usr/sbin/groupadd -r mongod
+fi
+if ! /usr/bin/id mongod &>/dev/null; then
+ /usr/sbin/useradd -M -r -g mongod -d /var/lib/mongo -s /bin/false -c mongod mongod > /dev/null 2>&1
+fi
+
+%post server
+if test $1 = 1
+then
+ /sbin/chkconfig --add mongod
+fi
+
+%preun server
+if test $1 = 0
+then
+ /sbin/chkconfig --del mongod
+fi
+
+%postun server
+if test $1 -ge 1
+then
+ /sbin/service mongod condrestart >/dev/null 2>&1 || :
+fi
+
+%files
+
+%files server
+%defattr(-,root,root,-)
+%config(noreplace) /etc/mongod.conf
+%{_bindir}/mongod
+%{_mandir}/man1/mongod.1*
+/etc/rc.d/init.d/mongod
+/etc/sysconfig/mongod
+%attr(0755,mongod,mongod) %dir /var/lib/mongo
+%attr(0755,mongod,mongod) %dir /var/log/mongo
+%attr(0640,mongod,mongod) %config(noreplace) %verify(not md5 size mtime) /var/log/mongo/mongod.log
+
+%files shell
+%defattr(-,root,root,-)
+%{_bindir}/mongo
+%{_mandir}/man1/mongo.1*
+
+%files mongos
+%defattr(-,root,root,-)
+%{_bindir}/mongos
+%{_mandir}/man1/mongos.1*
+
+%files tools
+%defattr(-,root,root,-)
+#%doc README GNU-AGPL-3.0.txt
+
+%{_bindir}/bsondump
+%{_bindir}/mongodump
+%{_bindir}/mongoexport
+%{_bindir}/mongofiles
+%{_bindir}/mongoimport
+%{_bindir}/mongooplog
+%{_bindir}/mongoperf
+%{_bindir}/mongorestore
+%{_bindir}/mongotop
+%{_bindir}/mongostat
+
+%{_mandir}/man1/bsondump.1*
+%{_mandir}/man1/mongodump.1*
+%{_mandir}/man1/mongoexport.1*
+%{_mandir}/man1/mongofiles.1*
+%{_mandir}/man1/mongoimport.1*
+%{_mandir}/man1/mongooplog.1*
+%{_mandir}/man1/mongoperf.1*
+%{_mandir}/man1/mongorestore.1*
+%{_mandir}/man1/mongotop.1*
+%{_mandir}/man1/mongostat.1*
+
+%changelog
+* Thu Jan 28 2010 Richard M Kreuter <richard@10gen.com>
+- Minor fixes.
+
+* Sat Oct 24 2009 Joe Miklojcik <jmiklojcik@shopwiki.com> -
+- Wrote mongo.spec.