]> git.pld-linux.org Git - packages/redis.git/blobdiff - redis.spec
patch to make arm arch check more consistent
[packages/redis.git] / redis.spec
index 146297705154a6b62658061a14d21fe636f76b9f..3ee5a25755a9fa4abcb8e018d59ee757f532d523 100644 (file)
@@ -3,13 +3,8 @@
 # - use shared jemalloc?
 #
 # Conditional build:
-%if "%{pld_release}" == "ac"
-%bcond_with            tests           # build without tests
-%bcond_with            perftools       # google perftools
-%else
 %bcond_without tests           # build without tests
 %bcond_without perftools       # google perftools
-%endif
 
 %ifnarch %{ix86} %{x8664} ppc
 # available only on selected architectures
 
 Summary:       A persistent key-value database
 Name:          redis
-Version:       2.8.24
+Version:       6.2.5
 Release:       1
 License:       BSD
 Group:         Applications/Databases
 Source0:       http://download.redis.io/releases/%{name}-%{version}.tar.gz
-# Source0-md5: 7b6eb6e4ccc050c351df8ae83c55a035
+# Source0-md5: db8a2b45eafbf1ead4353044fb70f581
 Source1:       %{name}.logrotate
 Source2:       %{name}.init
 Source3:       %{name}.tmpfiles
 Patch0:                %{name}.conf.patch
 Patch1:                %{name}-tcl.patch
+Patch2:                0001-1st-man-pageis-for-redis-cli-redis-benchmark-redis-c.patch
+Patch3:                arm-arch-check.patch
 URL:           http://www.redis.io/
 %{?with_perftools:BuildRequires:    gperftools-devel}
 BuildRequires: jemalloc-static
+%ifarch %{arm}
+BuildRequires: libatomic-devel
+%endif
 BuildRequires: rpm >= 4.4.9-56
 BuildRequires: rpmbuild(macros) >= 1.202
 BuildRequires: sed >= 4.0
@@ -77,11 +77,17 @@ disk.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 # Remove integration tests
 %{__sed} -i -e '/    integration\/replication/d' tests/test_helper.tcl
 %{__sed} -i -e '/    unit\/memefficiency/d' tests/test_helper.tcl
 
+# randomize port number so concurrent builds doesn't break
+port=$((21110 + ${RANDOM:-$$} % 1000))
+sed -i -e "s/set ::port 21111/set ::port $port/" tests/test_helper.tcl
+
 # use system jemalloc
 mv deps/jemalloc{,-local}
 install -d deps/jemalloc
@@ -89,9 +95,10 @@ ln -s %{_libdir} deps/jemalloc/lib
 ln -s %{_includedir} deps/jemalloc/include
 
 %build
-%define _make_opts CC="%{__cc}" CFLAGS="%{rpmcflags} -std=c99" DEBUG="" V=1
+%define specflags -std=c99 -pedantic
+%define _make_opts CC="%{__cc}" CFLAGS="%{rpmcflags}" LDFLAGS="%{rpmldflags}" OPTIMIZATION="" DEBUG="" V=1 uname_M=%{_target_cpu}
 
-%{__make} -j1 all
+%{__make} -C src all
 
 %if %{with tests}
 %{__make} test
@@ -102,9 +109,11 @@ rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir}} \
        $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d} \
        $RPM_BUILD_ROOT%{_localstatedir}/{{lib,log,run}/%{name},log/archive/%{name}} \
-       $RPM_BUILD_ROOT%{systemdtmpfilesdir}
+       $RPM_BUILD_ROOT%{systemdtmpfilesdir} \
+       $RPM_BUILD_ROOT%{_mandir}/man{1,5}
 
 %{__make} install \
+       INSTALL="install -p" \
        PREFIX=$RPM_BUILD_ROOT%{_prefix}
 
 # Fix non-standard-executable-perm error
@@ -120,6 +129,18 @@ cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
 cp -p %{name}.conf $RPM_BUILD_ROOT%{_sysconfdir}
 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
 
+# man-pages
+for man in man/man1/*; do
+       install $man $RPM_BUILD_ROOT%{_mandir}/man1
+done
+for man in man/man5/*; do
+       install $man $RPM_BUILD_ROOT%{_mandir}/man5
+done
+
+# sentinel can be symlinked
+echo ".so man1/redis-server.1" > $RPM_BUILD_ROOT%{_mandir}/man1/redis-sentinel.1
+echo ".so man5/redis.conf.5" > $RPM_BUILD_ROOT%{_mandir}/man5/redis-sentinel.conf.5
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -145,11 +166,11 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc COPYING 00-RELEASENOTES BUGS README
+%doc 00-RELEASENOTES BUGS CONTRIBUTING COPYING INSTALL MANIFESTO README.md
 %attr(755,root,root) %{_bindir}/redis-benchmark
-%attr(755,root,root) %{_bindir}/redis-check-aof
-%attr(755,root,root) %{_bindir}/redis-check-dump
 %attr(755,root,root) %{_bindir}/redis-cli
+%{_mandir}/man1/redis-benchmark.1*
+%{_mandir}/man1/redis-cli.1*
 
 %files server
 %defattr(644,root,root,755)
@@ -157,9 +178,17 @@ fi
 %attr(754,root,root) /etc/rc.d/init.d/%{name}
 %attr(755,root,root) %{_sbindir}/redis-sentinel
 %attr(755,root,root) %{_sbindir}/redis-server
+%attr(755,root,root) %{_bindir}/redis-check-aof
+%attr(755,root,root) %{_bindir}/redis-check-rdb
 %config(noreplace) /etc/logrotate.d/%{name}
 %dir %attr(755,redis,root) %{_localstatedir}/lib/%{name}
 %dir %attr(755,redis,root) %{_localstatedir}/log/%{name}
 %dir %attr(755,redis,root) %{_localstatedir}/log/archive/%{name}
 %dir %attr(755,redis,root) %{_localstatedir}/run/%{name}
 %{systemdtmpfilesdir}/%{name}.conf
+%{_mandir}/man1/redis-sentinel.1*
+%{_mandir}/man1/redis-server.1*
+%{_mandir}/man1/redis-check-aof.1*
+%{_mandir}/man1/redis-check-rdb.1*
+%{_mandir}/man5/redis.conf.5*
+%{_mandir}/man5/redis-sentinel.conf.5*
This page took 0.087298 seconds and 4 git commands to generate.