Change-Id: I528817d5940793a40f9cb312cfb5931bf1320f41
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/4057
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Anish Swaminathan <anishs@vmware.com>
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,67 @@ |
| 0 |
+Name: mongodb |
|
| 1 |
+Version: 3.4.4 |
|
| 2 |
+Release: 1%{?dist}
|
|
| 3 |
+Summary: The MongoDB Database |
|
| 4 |
+Group: Applications/Database |
|
| 5 |
+License: AGPLv3 |
|
| 6 |
+URL: http://www.mongodb.org/ |
|
| 7 |
+Source0: https://github.com/mongodb/mongo/archive/mongo-r%{version}.tar.gz
|
|
| 8 |
+%define sha1 mongo-r=904dabdfcfaa2e8b97784094da8227deaaf32040 |
|
| 9 |
+Vendor: VMware, Inc. |
|
| 10 |
+Distribution: Photon |
|
| 11 |
+BuildRequires: scons |
|
| 12 |
+BuildRequires: systemd |
|
| 13 |
+ |
|
| 14 |
+%description |
|
| 15 |
+MongoDB (from "humongous") is a scalable, high-performance, open source, document-oriented database. |
|
| 16 |
+ |
|
| 17 |
+%prep |
|
| 18 |
+%setup -qn mongo-r%{version}
|
|
| 19 |
+ |
|
| 20 |
+%build |
|
| 21 |
+scons %{?_smp_mflags} MONGO_VERSION=%{version} \
|
|
| 22 |
+ --disable-warnings-as-errors |
|
| 23 |
+ |
|
| 24 |
+%install |
|
| 25 |
+scons %{?_smp_mflags} MONGO_VERSION=%{version} install \
|
|
| 26 |
+ --prefix=%{buildroot}%{_prefix}
|
|
| 27 |
+install -d %{buildroot}/var/log/%{name}
|
|
| 28 |
+install -d %{buildroot}/var/lib/mongo
|
|
| 29 |
+install -d -m 755 %{buildroot}%{_unitdir}
|
|
| 30 |
+install -D -m 644 rpm/mongod.service %{buildroot}%{_unitdir}
|
|
| 31 |
+install -D -m 644 rpm/mongod.conf %{buildroot}/etc/mongod.conf
|
|
| 32 |
+ |
|
| 33 |
+ |
|
| 34 |
+%clean |
|
| 35 |
+rm -rf %{buildroot}
|
|
| 36 |
+ |
|
| 37 |
+# Pre-install |
|
| 38 |
+%pre |
|
| 39 |
+if ! getent group mongod >/dev/null; then |
|
| 40 |
+ /sbin/groupadd -r mongod |
|
| 41 |
+fi |
|
| 42 |
+if ! getent passwd mongod >/dev/null; then |
|
| 43 |
+ /sbin/useradd -g mongod mongod -s /sbin/nologin |
|
| 44 |
+fi |
|
| 45 |
+ |
|
| 46 |
+%preun |
|
| 47 |
+ %systemd_preun mongod.service |
|
| 48 |
+ |
|
| 49 |
+%postun |
|
| 50 |
+ %systemd_postun_with_restart mongod.service |
|
| 51 |
+ |
|
| 52 |
+%post |
|
| 53 |
+ %systemd_post mongod.service |
|
| 54 |
+ |
|
| 55 |
+ |
|
| 56 |
+%files |
|
| 57 |
+%defattr(-,root,root,-) |
|
| 58 |
+%{_bindir}/*
|
|
| 59 |
+%{_unitdir}/mongod.service
|
|
| 60 |
+%config(noreplace) %attr(0644, mongod, mongod) %{_sysconfdir}/mongod.conf
|
|
| 61 |
+%attr(0766, mongod, mongod) %dir /var/log/%{name}
|
|
| 62 |
+%attr(0766, mongod, mongod) %dir /var/lib/mongo |
|
| 63 |
+ |
|
| 64 |
+%changelog |
|
| 65 |
+* Sun Oct 15 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 3.4.4-1 |
|
| 66 |
+- Initial build. First version |
| 0 | 67 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,47 @@ |
| 0 |
+%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
|
|
| 1 |
+Name: scons |
|
| 2 |
+Version: 2.5.1 |
|
| 3 |
+Release: 1%{?dist}
|
|
| 4 |
+Summary: An Open Source software construction tool |
|
| 5 |
+Group: Development/Tools |
|
| 6 |
+License: MIT |
|
| 7 |
+URL: http://scons.org |
|
| 8 |
+Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
|
|
| 9 |
+%define sha1 scons=f742350251734df75355e51c70f291e119ef927a |
|
| 10 |
+Vendor: VMware, Inc. |
|
| 11 |
+Distribution: Photon |
|
| 12 |
+Requires: python2 |
|
| 13 |
+BuildArch: noarch |
|
| 14 |
+ |
|
| 15 |
+%description |
|
| 16 |
+SCons is an Open Source software construction tool—that is, a next-generation build tool. |
|
| 17 |
+Think of SCons as an improved, cross-platform substitute for the classic Make utility |
|
| 18 |
+with integrated functionality similar to autoconf/automake and compiler caches such as ccache. |
|
| 19 |
+In short, SCons is an easier, more reliable and faster way to build software. |
|
| 20 |
+ |
|
| 21 |
+%prep |
|
| 22 |
+%setup -q |
|
| 23 |
+ |
|
| 24 |
+%build |
|
| 25 |
+python setup.py build |
|
| 26 |
+ |
|
| 27 |
+%install |
|
| 28 |
+python setup.py install \ |
|
| 29 |
+ --root=%{buildroot} \
|
|
| 30 |
+ --prefix=%{_prefix} \
|
|
| 31 |
+ --standard-lib \ |
|
| 32 |
+ --optimize=1 \ |
|
| 33 |
+ --install-data=%{_datadir}
|
|
| 34 |
+ |
|
| 35 |
+%clean |
|
| 36 |
+rm -rf %{buildroot}
|
|
| 37 |
+ |
|
| 38 |
+%files |
|
| 39 |
+%defattr(-,root,root,-) |
|
| 40 |
+%{python2_sitelib}/*
|
|
| 41 |
+%{_bindir}/*
|
|
| 42 |
+%{_datadir}/*
|
|
| 43 |
+ |
|
| 44 |
+%changelog |
|
| 45 |
+* Sun Oct 15 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.5.1-1 |
|
| 46 |
+- Initial build. First version |