redis-vl.spec 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. # Check for status of man pages
  2. # http://code.google.com/p/redis/issues/detail?id=202
  3. %ifarch %{ix86} x86_64 ppc
  4. # available only on selected architectures
  5. %global with_perftools 1
  6. %endif
  7. Name: redis
  8. Version: 2.6.10
  9. Release: 1%{?_dist_release}
  10. Summary: A persistent in-memory key-value database
  11. Summary(ja): 永続化可能なキー・バリュー型インメモリデータベース
  12. Group: Applications/Databases
  13. License: BSD
  14. URL: http://redis.io
  15. Source0: http://redis.googlecode.com/files/%{name}-%{version}.tar.gz
  16. Source1: %{name}.logrotate
  17. Source2: %{name}.init
  18. Patch0: %{name}-2.6.10-vine.patch
  19. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  20. %if %{?with_perftools}
  21. BuildRequires: gperftools-devel
  22. %endif
  23. Requires: logrotate
  24. Requires(post): chkconfig
  25. Requires(postun): initscripts
  26. Requires(pre): shadow-utils
  27. Requires(preun): chkconfig
  28. Requires(preun): initscripts
  29. Distribution: Vine Linux
  30. Vendor: Project Vine
  31. Packager: daisuke
  32. %description
  33. Redis is an advanced key-value store. It is similar to memcached but the data
  34. set is not volatile, and values can be strings, exactly like in memcached, but
  35. also lists, sets, and ordered sets. All this data types can be manipulated with
  36. atomic operations to push/pop elements, add/remove elements, perform server side
  37. union, intersection, difference between sets, and so forth. Redis supports
  38. different kind of sorting abilities.
  39. %prep
  40. %setup -q
  41. %patch0 -p1 -b .vine
  42. %build
  43. make %{?_smp_mflags} \
  44. DEBUG="" \
  45. CFLAGS='%{optflags}' \
  46. %if %{?with_perftools}
  47. USE_TCMALLOC=yes \
  48. %endif
  49. all
  50. %check
  51. # make test
  52. %install
  53. make install PREFIX=%{buildroot}%{_prefix}
  54. # Install misc other
  55. install -p -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
  56. install -p -D -m 755 %{SOURCE2} %{buildroot}%{_initrddir}/%{name}
  57. install -p -D -m 644 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
  58. install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name}
  59. install -d -m 755 %{buildroot}%{_localstatedir}/log/%{name}
  60. install -d -m 755 %{buildroot}%{_localstatedir}/run/%{name}
  61. # Fix non-standard-executable-perm error
  62. chmod 755 %{buildroot}%{_bindir}/%{name}-*
  63. # Ensure redis-server location doesn't change
  64. mkdir -p %{buildroot}%{_sbindir}
  65. mv %{buildroot}%{_bindir}/%{name}-server %{buildroot}%{_sbindir}/%{name}-server
  66. %post
  67. /sbin/chkconfig --add redis
  68. %pre
  69. getent group redis &> /dev/null || groupadd -r redis &> /dev/null
  70. getent passwd redis &> /dev/null || \
  71. useradd -r -g redis -d %{_localstatedir}/lib/%{name} -s /sbin/nologin \
  72. -c 'Redis Server' redis &> /dev/null
  73. exit 0
  74. %preun
  75. if [ $1 = 0 ]; then
  76. /sbin/service redis stop &> /dev/null
  77. /sbin/chkconfig --del redis &> /dev/null
  78. fi
  79. %files
  80. %defattr(-,root,root,-)
  81. %doc 00-RELEASENOTES BUGS CONTRIBUTING COPYING README
  82. %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
  83. %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
  84. %dir %attr(0755, redis, redis) %{_localstatedir}/lib/%{name}
  85. %dir %attr(0755, redis, redis) %{_localstatedir}/log/%{name}
  86. %dir %attr(0755, redis, redis) %{_localstatedir}/run/%{name}
  87. %{_bindir}/%{name}-*
  88. %{_sbindir}/%{name}-*
  89. %{_initrddir}/%{name}
  90. #%{_unitdir}/%{name}.service
  91. %changelog
  92. * Mon Mar 11 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 2.6.10-1
  93. - update to 2.6.10
  94. * Sat Oct 27 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.15-1
  95. - initial build for Vine Linux
  96. * Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.15-3
  97. - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
  98. * Sun Jul 08 2012 Silas Sewell <silas@sewell.org> - 2.4.15-2
  99. - Remove TODO from docs
  100. * Sun Jul 08 2012 Silas Sewell <silas@sewell.org> - 2.4.15-1
  101. - Update to redis 2.4.15
  102. * Sat May 19 2012 Silas Sewell <silas@sewell.org> - 2.4.13-1
  103. - Update to redis 2.4.13
  104. * Sat Mar 31 2012 Silas Sewell <silas@sewell.org> - 2.4.10-1
  105. - Update to redis 2.4.10
  106. * Fri Feb 24 2012 Silas Sewell <silas@sewell.org> - 2.4.8-1
  107. - Update to redis 2.4.8
  108. * Sat Feb 04 2012 Silas Sewell <silas@sewell.org> - 2.4.7-1
  109. - Update to redis 2.4.7
  110. * Wed Feb 01 2012 Fabian Deutsch <fabiand@fedoraproject.org> - 2.4.6-4
  111. - Fixed a typo in the spec
  112. * Tue Jan 31 2012 Fabian Deutsch <fabiand@fedoraproject.org> - 2.4.6-3
  113. - Fix .service file, to match config (Type=simple).
  114. * Tue Jan 31 2012 Fabian Deutsch <fabiand@fedoraproject.org> - 2.4.6-2
  115. - Fix .service file, credits go to Timon.
  116. * Thu Jan 12 2012 Fabian Deutsch <fabiand@fedoraproject.org> - 2.4.6-1
  117. - Update to 2.4.6
  118. - systemd unit file added
  119. - Compiler flags changed to compile 2.4.6
  120. - Remove doc/ and Changelog
  121. * Sun Jul 24 2011 Silas Sewell <silas@sewell.org> - 2.2.12-1
  122. - Update to redis 2.2.12
  123. * Fri May 06 2011 Dan Horák <dan[at]danny.cz> - 2.2.5-2
  124. - google-perftools exists only on selected architectures
  125. * Sat Apr 23 2011 Silas Sewell <silas@sewell.ch> - 2.2.5-1
  126. - Update to redis 2.2.5
  127. * Sat Mar 26 2011 Silas Sewell <silas@sewell.ch> - 2.2.2-1
  128. - Update to redis 2.2.2
  129. * Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.4-2
  130. - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
  131. * Sun Dec 19 2010 Silas Sewell <silas@sewell.ch> - 2.0.4-1
  132. - Update to redis 2.0.4
  133. * Tue Oct 19 2010 Silas Sewell <silas@sewell.ch> - 2.0.3-1
  134. - Update to redis 2.0.3
  135. * Fri Oct 08 2010 Silas Sewell <silas@sewell.ch> - 2.0.2-1
  136. - Update to redis 2.0.2
  137. - Disable checks section for el5
  138. * Sat Sep 11 2010 Silas Sewell <silas@sewell.ch> - 2.0.1-1
  139. - Update to redis 2.0.1
  140. * Sat Sep 04 2010 Silas Sewell <silas@sewell.ch> - 2.0.0-1
  141. - Update to redis 2.0.0
  142. * Thu Sep 02 2010 Silas Sewell <silas@sewell.ch> - 1.2.6-3
  143. - Add Fedora build flags
  144. - Send all scriplet output to /dev/null
  145. - Remove debugging flags
  146. - Add redis.conf check to init script
  147. * Mon Aug 16 2010 Silas Sewell <silas@sewell.ch> - 1.2.6-2
  148. - Don't compress man pages
  149. - Use patch to fix redis.conf
  150. * Tue Jul 06 2010 Silas Sewell <silas@sewell.ch> - 1.2.6-1
  151. - Initial package