php-ext-phpredis-vl.spec 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. %define extname phpredis
  2. Summary: A redis extension for PHP
  3. Summary(ja): PHP用redis拡張
  4. Name: php-ext-phpredis
  5. Version: 5.3.7
  6. Release: 1%{_dist_release}
  7. Group: programming
  8. Vendor: Project Vine
  9. Distribution: Vine Linux
  10. Packager: tomop
  11. License: The PHP License
  12. URL: https://github.com/phpredis/phpredis
  13. Source: https://github.com/phpredis/phpredis/archive/%{version}.tar.gz#/phpredis-%{version}.tgz
  14. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  15. %description
  16. The phpredis extension provides an API for communicating with the Redis
  17. key-value store.
  18. %description -l ja
  19.  phpredis拡張は、Redis KVSと通信するためのAPIを提供します。
  20. %package -n php81-ext-phpredis
  21. Summary: A redis extension for PHP
  22. Summary(ja): PHP用redis拡張
  23. Group: programming
  24. BuildRequires: php81-devel
  25. %if "%{?req_php81_api}" != ""
  26. Requires: %{req_php81_api}
  27. %endif
  28. %description -n php81-ext-phpredis
  29. The phpredis extension provides an API for communicating with the Redis
  30. key-value store.
  31. %description -n php81-ext-phpredis -l ja
  32.  phpredis拡張は、Redis KVSと通信するためのAPIを提供します。
  33. %package -n php74-ext-phpredis
  34. Summary: A redis extension for PHP
  35. Summary(ja): PHP用redis拡張
  36. Group: programming
  37. BuildRequires: php74-devel
  38. %if "%{?req_php74_api}" != ""
  39. Requires: %{req_php74_api}
  40. %endif
  41. %description -n php74-ext-phpredis
  42. The phpredis extension provides an API for communicating with the Redis
  43. key-value store.
  44. %description -n php74-ext-phpredis -l ja
  45.  phpredis拡張は、Redis KVSと通信するためのAPIを提供します。
  46. %debug_package
  47. %prep
  48. %setup -q -c -n phpredis-%{version}
  49. cp %{extname}-%{version}/{COPYING,CREDITS,Changelog.md,*.markdown} ./
  50. cp -a %{extname}-%{version} php81
  51. pushd php81
  52. phpize81
  53. popd
  54. cp -a %{extname}-%{version} php74
  55. pushd php74
  56. phpize74
  57. popd
  58. %build
  59. pushd php81
  60. %configure --with-php-config=%{_bindir}/php-config81
  61. %__make %{?_smp_mflags}
  62. popd
  63. pushd php74
  64. %configure --with-php-config=%{_bindir}/php-config74
  65. %__make %{?_smp_mflags}
  66. popd
  67. %install
  68. rm -rf %{buildroot}
  69. pushd php81
  70. mkdir -p %{buildroot}%{_libdir}/php81/
  71. mkdir -p %{buildroot}%{_sysconfdir}/php81/php.d
  72. %makeinstall INSTALL_ROOT=%{buildroot}
  73. cat > %{buildroot}%{_sysconfdir}/php81/php.d/redis.ini <<EOF
  74. ; Enable redis extension module
  75. extension=redis.so
  76. ;session.save_handler = redis
  77. ;session.save_path = "tcp://host1:6379?weight=1, tcp://host2:6379?weight=2&timeout=2.5, tcp://host3:6379?weight=2&read_timeout=2.5"
  78. ; Should the locking be enabled? Defaults to: 0.
  79. ;redis.session.locking_enabled = 1
  80. ; How long should the lock live (in seconds)? Defaults to: value of max_execution_time.
  81. ;redis.session.lock_expire = 60
  82. ; How long to wait between attempts to acquire lock, in microseconds (µs)?. Defaults to: 2000
  83. ;redis.session.lock_wait_time = 50000
  84. ; Maximum number of times to retry (-1 means infinite). Defaults to: 10
  85. ;redis.session.lock_retries = 10
  86. EOF
  87. popd
  88. pushd php74
  89. mkdir -p %{buildroot}%{_libdir}/php74/
  90. mkdir -p %{buildroot}%{_sysconfdir}/php74/php.d
  91. %makeinstall INSTALL_ROOT=%{buildroot}
  92. cat > %{buildroot}%{_sysconfdir}/php74/php.d/redis.ini <<EOF
  93. ; Enable redis extension module
  94. extension=redis.so
  95. ;session.save_handler = redis
  96. ;session.save_path = "tcp://host1:6379?weight=1, tcp://host2:6379?weight=2&timeout=2.5, tcp://host3:6379?weight=2&read_timeout=2.5"
  97. ; Should the locking be enabled? Defaults to: 0.
  98. ;redis.session.locking_enabled = 1
  99. ; How long should the lock live (in seconds)? Defaults to: value of max_execution_time.
  100. ;redis.session.lock_expire = 60
  101. ; How long to wait between attempts to acquire lock, in microseconds (µs)?. Defaults to: 2000
  102. ;redis.session.lock_wait_time = 50000
  103. ; Maximum number of times to retry (-1 means infinite). Defaults to: 10
  104. ;redis.session.lock_retries = 10
  105. EOF
  106. popd
  107. %clean
  108. rm -rf %{buildroot}
  109. %files -n php81-ext-phpredis
  110. %defattr(-,root,root)
  111. %license COPYING
  112. %doc CREDITS Changelog.md *.markdown
  113. %{_libdir}/php81/*
  114. %config(noreplace) %{_sysconfdir}/php81/php.d/*
  115. %files -n php74-ext-phpredis
  116. %defattr(-,root,root)
  117. %license COPYING
  118. %doc CREDITS Changelog.md *.markdown
  119. %{_libdir}/php74/*
  120. %config(noreplace) %{_sysconfdir}/php74/php.d/*
  121. %changelog
  122. * Fri Sep 23 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.3.7-1
  123. - new upstream release.
  124. - dropped php80 support.
  125. * Fri Nov 26 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.3.4-1
  126. - new upstream release.
  127. - added php81 support.
  128. * Sat Mar 20 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.3.3-1
  129. - new upstream release.
  130. * Sat Dec 19 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.3.2-1
  131. - new upstream release.
  132. - added php80 support.
  133. * Thu Dec 19 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.1.1-1
  134. - new upstream release.
  135. - built for php74.
  136. * Thu Aug 22 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.0.2-1
  137. - initial build for Vine Linux.