%global _hardened_build 1 %global rethinkdb_user rethinkdb %global rethinkdb_group rethinkdb %global rethinkdb_home %{_sharedstatedir}/rethinkdb Name: rethinkdb Version: 2.4.0 Release: 1%{?dist} Summary: The open-source database for the real-time web Group: System Environment/Daemons License: AGPLv3+ URL: https://rethinkdb.com/ Source0: https://download.rethinkdb.com/dist/%{name}-%{version}%{?prever:-%{prever}}.tgz Source10: %{name}.service Source11: %{name}-tmpfile.conf Source12: %{name}.conf Source20: %{name}.logrotate BuildRequires: ncurses-devel protobuf-devel boost-devel openssl-devel BuildRequires: libicu-devel libcurl-devel re2-devel gtest-devel BuildRequires: ccache gcc-c++ make m4 python wget curl npm coffee-script nodejs-bluebird %if 0%{?fedora} >= 24 BuildRequires: jemalloc-devel Requires: jemalloc %endif Requires: protobuf ncurses openssl curl icu re2 BuildRequires: systemd-units Requires(pre): /usr/sbin/adduser Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units #ExcludeArch: ppc s390 s390x arm %description RethinkDB is the first open-source, scalable database designed specifically to push data to applications in real-time. It dramatically reduces the time and effort necessary to build scalable real-time apps. %prep %setup -q -n %{name}-%{version}%{?prever:-%{prever}} %build # RethinkDB comes with its own configure script which does not accept all macro settings export DESTDIR=%{buildroot} # Make sure build scripts use python2 export PYTHON=/usr/bin/python ./configure \ --dynamic re2 \ --dynamic gtest \ %if 0%{?fedora} >= 24 --dynamic jemalloc \ %else --fetch jemalloc \ %endif% --fetch v8 \ --allow-fetch \ --ccache \ --prefix=%{_prefix} \ --sysconfdir=%{_sysconfdir} \ --localstatedir=%{_localstatedir} make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT %make_install install -p -D -m 0644 %{SOURCE10} %{buildroot}%{_unitdir}/%{name}@.service install -p -D -m 0644 %{SOURCE11} %{buildroot}%{_tmpfilesdir}/%{name}.conf install -d -D -m 0755 %{buildroot}%{_localstatedir}/run/%{name}/ install -p -D -m 0644 %{SOURCE12} %{buildroot}%{_sysconfdir}/%{name}/instances.d/default.conf install -d -D -m 0755 %{buildroot}%{rethinkdb_home}/default/ install -d -D -m 0755 %{buildroot}%{_localstatedir}/log/%{name}/ install -p -D -m 0644 %{SOURCE20} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} rm %{buildroot}%{_sysconfdir}/init.d/%{name} %pre getent group %{rethinkdb_group} > /dev/null || groupadd -r %{rethinkdb_group} getent passwd %{rethinkdb_user} > /dev/null || \ useradd -r -d %{rethinkdb_home} -g %{rethinkdb_group} \ -s /sbin/nologin -c "Rethinkdb server" %{rethinkdb_user} exit 0 %post %systemd_post %{name}.service %preun %systemd_preun %{name}.service %postun %systemd_postun %{name}.service %files %{_bindir}/%{name} %{_datadir}/doc/%{name}/copyright %config(noreplace) %{_sysconfdir}/%{name}/default.conf.sample %config(noreplace) %{_sysconfdir}/%{name}/instances.d/default.conf %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %{_mandir}/man1/%{name}.1* %{_unitdir}/%{name}@.service %{_tmpfilesdir}/%{name}.conf %attr(755, %{rethinkdb_user},%{rethinkdb_group}) %dir %{rethinkdb_home}/ %attr(755, %{rethinkdb_user},%{rethinkdb_group}) %dir %{_localstatedir}/log/%{name}/ %attr(755, %{rethinkdb_user},%{rethinkdb_group}) %dir %{_localstatedir}/run/%{name}/ %changelog * Tue Apr 28 2020 Itamar Reis Peixoto - 2.4.0-1 - Update to upstream release 2.4.0 * Sat Feb 17 2018 Matthias Adler - 2.3.6-1 - Update to upstream release 2.3.6 * Sat Jun 25 2016 Matthias Adler - 2.3.4-2 - Dynamically link re2, gtest libraries - Exclude unsupported architectures - Add conditional for Fedora 24 to link shared jemalloc library * Thu Jun 23 2016 Matthias Adler - 2.3.4-1 - Update to upstream 2.3.4 release * Sun Mar 13 2016 Matthias Adler - 2.2.5-1 - Update to upstream 2.2.5 release * Wed Feb 03 2016 Matthias Adler - 2.2.4-1 - Update to upstream 2.2.4 release * Wed Dec 30 2015 Matthias Adler - 2.2.2-1 - Update to upstream 2.2.2 release * Sat Nov 21 2015 Matthias Adler - 2.2.1-1 - Update to upstream 2.2.1 release - Re-enable `--ccache` for better build times * Sat Nov 14 2015 Matthias Adler - 2.2.0-1 - Update to upstream 2.2.0 release - No longer set `--ccache` option * Mon Oct 12 2015 Matthias Adler - 2.1.5-1 - Update to upstream 2.1.5-2 release - Move instance data-folders directly into /var/lib/rethinkdb/ - Fix many rpmlint issues - Take a few pointers from the archlinux build script for spec-file and systemd-service * Thu Oct 08 2015 Matthias Adler - 2.1.4-4 - Make systemd-service file compatible with systemd v208 * Mon Sep 28 2015 Matthias Adler - 2.1.4-3 - Create empty default instance data folder - Enable '--no-update-check' option in service file - Enable 'Restart=on-abnormal' to service file * Sun Sep 27 2015 Matthias Adler - 2.1.4-2 - Cleanup spec-file and add correct permissions to created files and folders - Fix default.conf - Update systemd config to be able to run multiple instances * Sun Sep 27 2015 Matthias Adler - 2.1.4-1 - Initial release