php-ext-phpredis-vl.spec 11 KB

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