]> git.pld-linux.org Git - packages/redis.git/blobdiff - redis.spec
cleanup ac bcond
[packages/redis.git] / redis.spec
index 1506defdb606e0831d01fb5ee244521f4fc469d7..e9f2027d5478abe9ea9d814147528f422181889a 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.4.2
-Release:       5
+Version:       2.8.24
+Release:       1
 License:       BSD
 Group:         Applications/Databases
-URL:           http://www.redis.io/
-Source0:       http://redis.googlecode.com/files/%{name}-%{version}.tar.gz
-# Source0-md5: c4b0b5e4953a11a503cb54cf6b09670e
+Source0:       http://download.redis.io/releases/%{name}-%{version}.tar.gz
+# Source0-md5: 7b6eb6e4ccc050c351df8ae83c55a035
 Source1:       %{name}.logrotate
 Source2:       %{name}.init
 Source3:       %{name}.tmpfiles
 Patch0:                %{name}.conf.patch
-%{?with_perftools:BuildRequires:    google-perftools-devel}
+Patch1:                %{name}-tcl.patch
+URL:           http://www.redis.io/
+%{?with_perftools:BuildRequires:    gperftools-devel}
 BuildRequires: jemalloc-static
 BuildRequires: rpm >= 4.4.9-56
 BuildRequires: rpmbuild(macros) >= 1.202
 BuildRequires: sed >= 4.0
 %{?with_tests:BuildRequires:   tcl >= 8.5}
+Obsoletes:     redis-doc
 Conflicts:     logrotate < 3.8.0
 ExcludeArch:   sparc sparc64 alpha
-Obsoletes:     %{name}-doc
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -75,12 +71,11 @@ disk.
 %prep
 %setup -q
 %patch0 -p1
-# Remove integration tests
-%{__sed} -i -e '/    execute_tests "integration\/replication"/d' tests/test_helper.tcl
-%{__sed} -i -e '/    execute_tests "integration\/aof"/d' tests/test_helper.tcl
+%patch1 -p1
 
-# use unversioned tclsh
-%{__sed} -i -e 's,tclsh8.5,tclsh', ./runtest tests/test_helper.tcl
+# Remove integration tests
+%{__sed} -i -e '/    integration\/replication/d' tests/test_helper.tcl
+%{__sed} -i -e '/    unit\/memefficiency/d' tests/test_helper.tcl
 
 # use system jemalloc
 mv deps/jemalloc{,-local}
@@ -89,13 +84,13 @@ ln -s %{_libdir} deps/jemalloc/lib
 ln -s %{_includedir} deps/jemalloc/include
 
 %build
-%{__make} all \
-       CC="%{__cc}" \
-       CFLAGS="%{rpmcflags} -std=c99" \
-       DEBUG="" \
+%define specflags -std=c99 -pedantic
+%define _make_opts CC="%{__cc}" CFLAGS="%{rpmcflags}" LDFLAGS="%{rpmldflags}" OPTIMIZATION="" DEBUG="" V=1
+
+%{__make} -j1 -C src all
 
 %if %{with tests}
-tclsh tests/test_helper.tcl
+%{__make} test
 %endif
 
 %install
@@ -103,9 +98,10 @@ 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/usr/lib/tmpfiles.d
+       $RPM_BUILD_ROOT%{systemdtmpfilesdir}
 
 %{__make} install \
+       INSTALL="install -p" \
        PREFIX=$RPM_BUILD_ROOT%{_prefix}
 
 # Fix non-standard-executable-perm error
@@ -113,13 +109,13 @@ chmod a+x $RPM_BUILD_ROOT%{_bindir}/%{name}-*
 
 # Ensure redis-server location doesn't change
 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/%{name}-server
+mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/%{name}-sentinel
 
 # Install misc other
 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
 cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
 cp -p %{name}.conf $RPM_BUILD_ROOT%{_sysconfdir}
-
-install %{SOURCE3} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
+cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -146,7 +142,7 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc COPYING 00-RELEASENOTES BUGS Changelog README TODO
+%doc COPYING 00-RELEASENOTES BUGS README
 %attr(755,root,root) %{_bindir}/redis-benchmark
 %attr(755,root,root) %{_bindir}/redis-check-aof
 %attr(755,root,root) %{_bindir}/redis-check-dump
@@ -156,10 +152,11 @@ fi
 %defattr(644,root,root,755)
 %config(noreplace) %{_sysconfdir}/%{name}.conf
 %attr(754,root,root) /etc/rc.d/init.d/%{name}
+%attr(755,root,root) %{_sbindir}/redis-sentinel
 %attr(755,root,root) %{_sbindir}/redis-server
 %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}
-/usr/lib/tmpfiles.d/%{name}.conf
+%{systemdtmpfilesdir}/%{name}.conf
This page took 0.529652 seconds and 4 git commands to generate.