php-ext-phpredis-vl.spec 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  1. %bcond_with php74
  2. %bcond_with php81
  3. %bcond_without php82
  4. %bcond_without php83
  5. %define extname phpredis
  6. Summary: A redis extension for PHP
  7. Summary(ja): PHP用redis拡張
  8. Name: php-ext-phpredis
  9. Version: 6.0.2
  10. Release: 2%{_dist_release}
  11. Group: programming
  12. Vendor: Project Vine
  13. Distribution: Vine Linux
  14. Packager: tomop
  15. License: The PHP License
  16. URL: https://github.com/phpredis/phpredis
  17. Source: https://github.com/phpredis/phpredis/archive/%{version}.tar.gz#/phpredis-%{version}.tgz
  18. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  19. %description
  20. The phpredis extension provides an API for communicating with the Redis
  21. key-value store.
  22. %description -l ja
  23.  phpredis拡張は、Redis KVSと通信するためのAPIを提供します。
  24. %if %{with php81}
  25. %package -n php81-ext-phpredis
  26. Summary: A redis extension for PHP
  27. Summary(ja): PHP用redis拡張
  28. Group: programming
  29. BuildRequires: php81-devel
  30. %if "%{?req_php81_api}" != ""
  31. Requires: %{req_php81_api}
  32. %endif
  33. %description -n php81-ext-phpredis
  34. The phpredis extension provides an API for communicating with the Redis
  35. key-value store.
  36. %description -n php81-ext-phpredis -l ja
  37.  phpredis拡張は、Redis KVSと通信するためのAPIを提供します。
  38. %endif
  39. %if %{with php82}
  40. %package -n php82-ext-phpredis
  41. Summary: A redis extension for PHP
  42. Summary(ja): PHP用redis拡張
  43. Group: programming
  44. BuildRequires: php82-devel
  45. %if "%{?req_php82_api}" != ""
  46. Requires: %{req_php82_api}
  47. %endif
  48. %description -n php82-ext-phpredis
  49. The phpredis extension provides an API for communicating with the Redis
  50. key-value store.
  51. %description -n php82-ext-phpredis -l ja
  52.  phpredis拡張は、Redis KVSと通信するためのAPIを提供します。
  53. %endif
  54. %if %{with php83}
  55. %package -n php83-ext-phpredis
  56. Summary: A redis extension for PHP
  57. Summary(ja): PHP用redis拡張
  58. Group: programming
  59. BuildRequires: php83-devel
  60. %if "%{?req_php83_api}" != ""
  61. Requires: %{req_php83_api}
  62. %endif
  63. %description -n php83-ext-phpredis
  64. The phpredis extension provides an API for communicating with the Redis
  65. key-value store.
  66. %description -n php83-ext-phpredis -l ja
  67.  phpredis拡張は、Redis KVSと通信するためのAPIを提供します。
  68. %endif
  69. %if %{with php74}
  70. %package -n php74-ext-phpredis
  71. Summary: A redis extension for PHP
  72. Summary(ja): PHP用redis拡張
  73. Group: programming
  74. BuildRequires: php74-devel
  75. %if "%{?req_php74_api}" != ""
  76. Requires: %{req_php74_api}
  77. %endif
  78. %description -n php74-ext-phpredis
  79. The phpredis extension provides an API for communicating with the Redis
  80. key-value store.
  81. %description -n php74-ext-phpredis -l ja
  82.  phpredis拡張は、Redis KVSと通信するためのAPIを提供します。
  83. %endif
  84. %debug_package
  85. %prep
  86. %setup -q -c -n phpredis-%{version}
  87. cp %{extname}-%{version}/{LICENSE,CREDITS,CHANGELOG.md,README.md} ./
  88. %if %{with php81}
  89. cp -a %{extname}-%{version} php81
  90. pushd php81
  91. phpize81
  92. popd
  93. %endif
  94. %if %{with php82}
  95. cp -a %{extname}-%{version} php82
  96. pushd php82
  97. phpize82
  98. popd
  99. %endif
  100. %if %{with php83}
  101. cp -a %{extname}-%{version} php83
  102. pushd php83
  103. phpize83
  104. popd
  105. %endif
  106. %if %{with php74}
  107. cp -a %{extname}-%{version} php74
  108. pushd php74
  109. phpize74
  110. popd
  111. %endif
  112. %build
  113. %if %{with php81}
  114. pushd php81
  115. %configure --with-php-config=%{_bindir}/php-config81
  116. %__make %{?_smp_mflags}
  117. popd
  118. %endif
  119. %if %{with php82}
  120. pushd php82
  121. %configure --with-php-config=%{_bindir}/php-config82
  122. %__make %{?_smp_mflags}
  123. popd
  124. %endif
  125. %if %{with php83}
  126. pushd php83
  127. %configure --with-php-config=%{_bindir}/php-config83
  128. %__make %{?_smp_mflags}
  129. popd
  130. %endif
  131. %if %{with php74}
  132. pushd php74
  133. %configure --with-php-config=%{_bindir}/php-config74
  134. %__make %{?_smp_mflags}
  135. popd
  136. %endif
  137. %install
  138. rm -rf %{buildroot}
  139. %if %{with php81}
  140. pushd php81
  141. mkdir -p %{buildroot}%{_libdir}/php81/
  142. mkdir -p %{buildroot}%{_sysconfdir}/php81/php.d
  143. %makeinstall INSTALL_ROOT=%{buildroot}
  144. cat > %{buildroot}%{_sysconfdir}/php81/php.d/redis.ini <<EOF
  145. ; Enable redis extension module
  146. extension=redis.so
  147. ;session.save_handler = redis
  148. ;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"
  149. ; Should the locking be enabled? Defaults to: 0.
  150. ;redis.session.locking_enabled = 1
  151. ; How long should the lock live (in seconds)? Defaults to: value of max_execution_time.
  152. ;redis.session.lock_expire = 60
  153. ; How long to wait between attempts to acquire lock, in microseconds (µs)?. Defaults to: 2000
  154. ;redis.session.lock_wait_time = 50000
  155. ; Maximum number of times to retry (-1 means infinite). Defaults to: 10
  156. ;redis.session.lock_retries = 10
  157. EOF
  158. popd
  159. %endif
  160. %if %{with php82}
  161. pushd php82
  162. mkdir -p %{buildroot}%{_libdir}/php82/
  163. mkdir -p %{buildroot}%{_sysconfdir}/php82/php.d
  164. %makeinstall INSTALL_ROOT=%{buildroot}
  165. cat > %{buildroot}%{_sysconfdir}/php82/php.d/redis.ini <<EOF
  166. ; Enable redis extension module
  167. extension=redis.so
  168. ;session.save_handler = redis
  169. ;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"
  170. ; Should the locking be enabled? Defaults to: 0.
  171. ;redis.session.locking_enabled = 1
  172. ; How long should the lock live (in seconds)? Defaults to: value of max_execution_time.
  173. ;redis.session.lock_expire = 60
  174. ; How long to wait between attempts to acquire lock, in microseconds (µs)?. Defaults to: 2000
  175. ;redis.session.lock_wait_time = 50000
  176. ; Maximum number of times to retry (-1 means infinite). Defaults to: 10
  177. ;redis.session.lock_retries = 10
  178. EOF
  179. popd
  180. %endif
  181. %if %{with php83}
  182. pushd php83
  183. mkdir -p %{buildroot}%{_libdir}/php83/
  184. mkdir -p %{buildroot}%{_sysconfdir}/php83/php.d
  185. %makeinstall INSTALL_ROOT=%{buildroot}
  186. cat > %{buildroot}%{_sysconfdir}/php83/php.d/redis.ini <<EOF
  187. ; Enable redis extension module
  188. extension=redis.so
  189. ;session.save_handler = redis
  190. ;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"
  191. ; Should the locking be enabled? Defaults to: 0.
  192. ;redis.session.locking_enabled = 1
  193. ; How long should the lock live (in seconds)? Defaults to: value of max_execution_time.
  194. ;redis.session.lock_expire = 60
  195. ; How long to wait between attempts to acquire lock, in microseconds (µs)?. Defaults to: 2000
  196. ;redis.session.lock_wait_time = 50000
  197. ; Maximum number of times to retry (-1 means infinite). Defaults to: 10
  198. ;redis.session.lock_retries = 10
  199. EOF
  200. popd
  201. %endif
  202. %if %{with php74}
  203. pushd php74
  204. mkdir -p %{buildroot}%{_libdir}/php74/
  205. mkdir -p %{buildroot}%{_sysconfdir}/php74/php.d
  206. %makeinstall INSTALL_ROOT=%{buildroot}
  207. cat > %{buildroot}%{_sysconfdir}/php74/php.d/redis.ini <<EOF
  208. ; Enable redis extension module
  209. extension=redis.so
  210. ;session.save_handler = redis
  211. ;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"
  212. ; Should the locking be enabled? Defaults to: 0.
  213. ;redis.session.locking_enabled = 1
  214. ; How long should the lock live (in seconds)? Defaults to: value of max_execution_time.
  215. ;redis.session.lock_expire = 60
  216. ; How long to wait between attempts to acquire lock, in microseconds (µs)?. Defaults to: 2000
  217. ;redis.session.lock_wait_time = 50000
  218. ; Maximum number of times to retry (-1 means infinite). Defaults to: 10
  219. ;redis.session.lock_retries = 10
  220. EOF
  221. popd
  222. %endif
  223. %clean
  224. rm -rf %{buildroot}
  225. %if %{with php81}
  226. %files -n php81-ext-phpredis
  227. %defattr(-,root,root)
  228. %license LICENSE
  229. %doc CREDITS CHANGELOG.md README.md
  230. %{_libdir}/php81/*
  231. %config(noreplace) %{_sysconfdir}/php81/php.d/*
  232. %endif
  233. %if %{with php82}
  234. %files -n php82-ext-phpredis
  235. %defattr(-,root,root)
  236. %license LICENSE
  237. %doc CREDITS CHANGELOG.md README.md
  238. %{_libdir}/php82/*
  239. %config(noreplace) %{_sysconfdir}/php82/php.d/*
  240. %endif
  241. %if %{with php83}
  242. %files -n php83-ext-phpredis
  243. %defattr(-,root,root)
  244. %license LICENSE
  245. %doc CREDITS CHANGELOG.md README.md
  246. %{_libdir}/php83/*
  247. %config(noreplace) %{_sysconfdir}/php83/php.d/*
  248. %endif
  249. %if %{with php74}
  250. %files -n php74-ext-phpredis
  251. %defattr(-,root,root)
  252. %license LICENSE
  253. %doc CREDITS CHANGELOG.md README.md
  254. %{_libdir}/php74/*
  255. %config(noreplace) %{_sysconfdir}/php74/php.d/*
  256. %endif
  257. %changelog
  258. * Sat Jan 20 2024 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 6.0.2-2
  259. - added php83 support.
  260. - disabled php81 support.
  261. * Mon Dec 18 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 6.0.2-1
  262. - new upstream release.
  263. * Fri Mar 17 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.3.7-2
  264. - added php82 support.
  265. * Fri Sep 23 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.3.7-1
  266. - new upstream release.
  267. - dropped php80 support.
  268. * Fri Nov 26 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.3.4-1
  269. - new upstream release.
  270. - added php81 support.
  271. * Sat Mar 20 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.3.3-1
  272. - new upstream release.
  273. * Sat Dec 19 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.3.2-1
  274. - new upstream release.
  275. - added php80 support.
  276. * Thu Dec 19 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.1.1-1
  277. - new upstream release.
  278. - built for php74.
  279. * Thu Aug 22 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.0.2-1
  280. - initial build for Vine Linux.