redis.spec 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. ##
  2. ## redis.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # package version
  24. %define V_opkg 2.6.2
  25. %define V_dist 2.6.2
  26. # package information
  27. Name: redis
  28. Summary: Persistent Key-Value Database
  29. URL: http://redis.io/
  30. Vendor: Salvatore Sanfilippo
  31. Packager: OpenPKG Foundation e.V.
  32. Distribution: OpenPKG Community
  33. Class: EVAL
  34. Group: Database
  35. License: BSD
  36. Version: %{V_opkg}
  37. Release: 20121028
  38. # list of sources
  39. Source0: http://redis.googlecode.com/files/redis-%{V_dist}.tar.gz
  40. Source1: rc.redis
  41. Source2: redis.conf
  42. Patch0: redis.patch
  43. # build information
  44. BuildPreReq: OpenPKG, openpkg >= 20100101, config
  45. PreReq: OpenPKG, openpkg >= 20100101
  46. %description
  47. Redis is an advanced key-value store. It is similar to memcached
  48. but the dataset is not volatile, and values can be strings, exactly
  49. like in memcached, but also lists, sets, and ordered sets. All
  50. this data types can be manipulated with atomic operations to
  51. push/pop elements, add/remove elements, perform server side union,
  52. intersection, difference between sets, and so forth. Redis supports
  53. different kind of sorting abilities.
  54. %track
  55. prog redis = {
  56. version = %{V_dist}
  57. url = http://code.google.com/p/redis/downloads/list
  58. regex = redis-(\d+\.\d+\.\d+)\.tar\.gz
  59. }
  60. %prep
  61. %setup -q -n redis-%{V_dist}
  62. %patch -p0
  63. %build
  64. %{l_shtool} subst \
  65. -e 's;/var/run/redis\.pid;%{l_prefix}/var/redis/run/redis.pid;' \
  66. src/redis.c
  67. %{l_make} %{l_mflags -O} \
  68. CC="%{l_cc} %{l_cflags -O}"
  69. %install
  70. %{l_shtool} mkdir -f -p -m 755 \
  71. $RPM_BUILD_ROOT%{l_prefix}/bin \
  72. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  73. $RPM_BUILD_ROOT%{l_prefix}/etc/redis \
  74. $RPM_BUILD_ROOT%{l_prefix}/var/redis/run \
  75. $RPM_BUILD_ROOT%{l_prefix}/var/redis/log \
  76. $RPM_BUILD_ROOT%{l_prefix}/var/redis/db
  77. %{l_shtool} install -c -s -m 755 \
  78. src/redis-server src/redis-cli src/redis-benchmark \
  79. $RPM_BUILD_ROOT%{l_prefix}/bin/
  80. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  81. %{SOURCE rc.redis} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  82. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  83. %{SOURCE redis.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/redis/
  84. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  85. %{l_files_std} \
  86. '%config %{l_prefix}/etc/redis/*' \
  87. '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/redis/*'
  88. %files -f files
  89. %clean