php-ext-phpredis-vl.spec 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  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.4
  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 php80-ext-phpredis
  34. Summary: A redis extension for PHP
  35. Summary(ja): PHP用redis拡張
  36. Group: programming
  37. BuildRequires: php80-devel
  38. %if "%{?req_php80_api}" != ""
  39. Requires: %{req_php80_api}
  40. %endif
  41. %description -n php80-ext-phpredis
  42. The phpredis extension provides an API for communicating with the Redis
  43. key-value store.
  44. %description -n php80-ext-phpredis -l ja
  45.  phpredis拡張は、Redis KVSと通信するためのAPIを提供します。
  46. %package -n php74-ext-phpredis
  47. Summary: A redis extension for PHP
  48. Summary(ja): PHP用redis拡張
  49. Group: programming
  50. BuildRequires: php74-devel
  51. %if "%{?req_php74_api}" != ""
  52. Requires: %{req_php74_api}
  53. %endif
  54. %description -n php74-ext-phpredis
  55. The phpredis extension provides an API for communicating with the Redis
  56. key-value store.
  57. %description -n php74-ext-phpredis -l ja
  58.  phpredis拡張は、Redis KVSと通信するためのAPIを提供します。
  59. %debug_package
  60. %prep
  61. %setup -q -c -n phpredis-%{version}
  62. cp %{extname}-%{version}/{COPYING,CREDITS,Changelog.md,*.markdown} ./
  63. cp -a %{extname}-%{version} php81
  64. pushd php81
  65. phpize81
  66. popd
  67. cp -a %{extname}-%{version} php80
  68. pushd php80
  69. phpize80
  70. popd
  71. cp -a %{extname}-%{version} php74
  72. pushd php74
  73. phpize74
  74. popd
  75. %build
  76. pushd php81
  77. %configure --with-php-config=%{_bindir}/php-config81
  78. %__make %{?_smp_mflags}
  79. popd
  80. pushd php80
  81. %configure --with-php-config=%{_bindir}/php-config80
  82. %__make %{?_smp_mflags}
  83. popd
  84. pushd php74
  85. %configure --with-php-config=%{_bindir}/php-config74
  86. %__make %{?_smp_mflags}
  87. popd
  88. %install
  89. rm -rf %{buildroot}
  90. pushd php81
  91. mkdir -p %{buildroot}%{_libdir}/php81/
  92. mkdir -p %{buildroot}%{_sysconfdir}/php81/php.d
  93. %makeinstall INSTALL_ROOT=%{buildroot}
  94. cat > %{buildroot}%{_sysconfdir}/php81/php.d/redis.ini <<EOF
  95. ; Enable redis extension module
  96. extension=redis.so
  97. ;session.save_handler = redis
  98. ;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"
  99. ; Should the locking be enabled? Defaults to: 0.
  100. ;redis.session.locking_enabled = 1
  101. ; How long should the lock live (in seconds)? Defaults to: value of max_execution_time.
  102. ;redis.session.lock_expire = 60
  103. ; How long to wait between attempts to acquire lock, in microseconds (µs)?. Defaults to: 2000
  104. ;redis.session.lock_wait_time = 50000
  105. ; Maximum number of times to retry (-1 means infinite). Defaults to: 10
  106. ;redis.session.lock_retries = 10
  107. EOF
  108. popd
  109. pushd php80
  110. mkdir -p %{buildroot}%{_libdir}/php80/
  111. mkdir -p %{buildroot}%{_sysconfdir}/php80/php.d
  112. %makeinstall INSTALL_ROOT=%{buildroot}
  113. cat > %{buildroot}%{_sysconfdir}/php80/php.d/redis.ini <<EOF
  114. ; Enable redis extension module
  115. extension=redis.so
  116. ;session.save_handler = redis
  117. ;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"
  118. ; Should the locking be enabled? Defaults to: 0.
  119. ;redis.session.locking_enabled = 1
  120. ; How long should the lock live (in seconds)? Defaults to: value of max_execution_time.
  121. ;redis.session.lock_expire = 60
  122. ; How long to wait between attempts to acquire lock, in microseconds (µs)?. Defaults to: 2000
  123. ;redis.session.lock_wait_time = 50000
  124. ; Maximum number of times to retry (-1 means infinite). Defaults to: 10
  125. ;redis.session.lock_retries = 10
  126. EOF
  127. popd
  128. pushd php74
  129. mkdir -p %{buildroot}%{_libdir}/php74/
  130. mkdir -p %{buildroot}%{_sysconfdir}/php74/php.d
  131. %makeinstall INSTALL_ROOT=%{buildroot}
  132. cat > %{buildroot}%{_sysconfdir}/php74/php.d/redis.ini <<EOF
  133. ; Enable redis extension module
  134. extension=redis.so
  135. ;session.save_handler = redis
  136. ;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"
  137. ; Should the locking be enabled? Defaults to: 0.
  138. ;redis.session.locking_enabled = 1
  139. ; How long should the lock live (in seconds)? Defaults to: value of max_execution_time.
  140. ;redis.session.lock_expire = 60
  141. ; How long to wait between attempts to acquire lock, in microseconds (µs)?. Defaults to: 2000
  142. ;redis.session.lock_wait_time = 50000
  143. ; Maximum number of times to retry (-1 means infinite). Defaults to: 10
  144. ;redis.session.lock_retries = 10
  145. EOF
  146. popd
  147. %clean
  148. rm -rf %{buildroot}
  149. %files -n php81-ext-phpredis
  150. %defattr(-,root,root)
  151. %license COPYING
  152. %doc CREDITS Changelog.md *.markdown
  153. %{_libdir}/php81/*
  154. %config(noreplace) %{_sysconfdir}/php81/php.d/*
  155. %files -n php80-ext-phpredis
  156. %defattr(-,root,root)
  157. %license COPYING
  158. %doc CREDITS Changelog.md *.markdown
  159. %{_libdir}/php80/*
  160. %config(noreplace) %{_sysconfdir}/php80/php.d/*
  161. %files -n php74-ext-phpredis
  162. %defattr(-,root,root)
  163. %license COPYING
  164. %doc CREDITS Changelog.md *.markdown
  165. %{_libdir}/php74/*
  166. %config(noreplace) %{_sysconfdir}/php74/php.d/*
  167. %changelog
  168. * Fri Nov 26 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.3.4-1
  169. - new upstream release.
  170. - added php81 support.
  171. * Sat Mar 20 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.3.3-1
  172. - new upstream release.
  173. * Sat Dec 19 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.3.2-1
  174. - new upstream release.
  175. - added php80 support.
  176. * Thu Dec 19 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.1.1-1
  177. - new upstream release.
  178. - built for php74.
  179. * Thu Aug 22 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.0.2-1
  180. - initial build for Vine Linux.