php-ext-phpredis-vl.spec 4.4 KB

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