php-ext-memcached-vl.spec 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. # needs launching memcached
  2. %bcond_with test
  3. %define build_targets 74 80 81
  4. %define extname memcached
  5. %global gitdate 20211126
  6. %global githash 60a8f9f8810aab2b4cff16b05667c6d4af85ef09
  7. %define srcdir php-%{extname}-%{?githash:%{githash}}%{!?githash:%{version}}
  8. Summary: memcached extension for PHP
  9. Summary(ja): PHP用memcached拡張
  10. Name: php-ext-memcached
  11. Version: 3.1.5%{?gitdate:.git%{gitdate}}
  12. Release: 1%{_dist_release}
  13. Group: programming
  14. Vendor: Project Vine
  15. Distribution: Vine Linux
  16. Packager: tomop
  17. License: The PHP License
  18. %if %{?githash:1}%{!?githash:0}
  19. Source: https://github.com/php-memcached-dev/php-memcached/archive/%{githash}.tar.gz
  20. %else
  21. Source: https://github.com/php-memcached-dev/php-memcached/archive/v3.1.5.tar.gz#/php-%{extname}-%{version}.tar.gz
  22. %endif
  23. BuildRequires: libmemcached-devel
  24. BuildRequires: zlib-devel
  25. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  26. %description
  27. This module enable to access memcached in PHP scripts.
  28. %description -l ja
  29. このモジュールは、PHPスクリプト中でmemcachedにアクセスできるようにします。
  30. %package -n php74-ext-%{extname}
  31. Summary: memcached extension for PHP-7.4
  32. Summary(ja): PHP-7.4用memcached拡張
  33. Group: programming
  34. BuildRequires: php74-devel
  35. %if "%{?req_php74_api}" != ""
  36. Requires: %{req_php74_api}
  37. %endif
  38. %description -n php74-ext-%{extname}
  39. This module enable to access memcached in PHP scripts.
  40. %description -n php74-ext-%{extname} -l ja
  41. このモジュールは、PHPスクリプト中でmemcachedにアクセスできるようにします。
  42. %package -n php80-ext-%{extname}
  43. Summary: memcached extension for PHP-8.0
  44. Summary(ja): PHP-8.0用memcached拡張
  45. Group: programming
  46. BuildRequires: php80-devel
  47. %if "%{?req_php80_api}" != ""
  48. Requires: %{req_php80_api}
  49. %endif
  50. %description -n php80-ext-%{extname}
  51. This module enable to access memcached in PHP scripts.
  52. %description -n php80-ext-%{extname} -l ja
  53. このモジュールは、PHPスクリプト中でmemcachedにアクセスできるようにします。
  54. %package -n php81-ext-%{extname}
  55. Summary: memcached extension for PHP-8.1
  56. Summary(ja): PHP-8.1用memcached拡張
  57. Group: programming
  58. BuildRequires: php81-devel
  59. %if "%{?req_php81_api}" != ""
  60. Requires: %{req_php81_api}
  61. %endif
  62. %description -n php81-ext-%{extname}
  63. This module enable to access memcached in PHP scripts.
  64. %description -n php81-ext-%{extname} -l ja
  65. このモジュールは、PHPスクリプト中でmemcachedにアクセスできるようにします。
  66. %debug_package
  67. %prep
  68. %setup -T -c -a 0 -n %{srcdir}
  69. pushd %{srcdir}
  70. mkdir -p ../docs
  71. cp -f CREDITS LICENSE README* ChangeLog ../docs/
  72. popd
  73. for v in %{build_targets}; do
  74. cp -a %{srcdir} php${v}
  75. done
  76. %build
  77. for v in %{build_targets}; do
  78. pushd php${v}
  79. phpize${v}
  80. %configure --with-php-config=php-config${v}
  81. %__make %{?_smp_mflags}
  82. popd
  83. done
  84. %install
  85. cat > memcached.ini <<EOF
  86. ; Enable memcached extension module
  87. extension=memcached.so
  88. EOF
  89. cat %{srcdir}/memcached.ini >> memcached.ini
  90. for v in %{build_targets}; do
  91. pushd php${v}
  92. mkdir -p %{buildroot}%{_libdir}/php${v}/
  93. mkdir -p %{buildroot}%{_sysconfdir}/php${v}/php.d
  94. %makeinstall INSTALL_ROOT=%{buildroot}
  95. install -m644 ../memcached.ini %{buildroot}%{_sysconfdir}/php${v}/php.d/memcached.ini
  96. cat > ../files.php${v} <<EOF
  97. %%defattr(-,root,root)
  98. %%doc docs/*
  99. %{_libdir}/php${v}/*
  100. %%config(noreplace) %{_sysconfdir}/php${v}/php.d/*
  101. EOF
  102. popd
  103. done
  104. %check
  105. %if %{with test}
  106. for v in %{build_targets}; do
  107. pushd php${v}
  108. NO_INTERACTION=yes TEST_PHPDBG_EXECUTABLE=/usr/bin/phpdbg${v} make test
  109. popd
  110. done
  111. %endif
  112. %files -n php74-ext-%{extname} -f files.php74
  113. %files -n php80-ext-%{extname} -f files.php80
  114. %files -n php81-ext-%{extname} -f files.php81
  115. %changelog
  116. * Fri Nov 26 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.1.5.git20211126-1
  117. - sync to git HEAD.
  118. - added php81 support.
  119. * Sat Mar 20 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.1.5.git20210320-1
  120. - sync to git HEAD.
  121. - dropped Patch0: fixed in upstream.
  122. * Sat Dec 19 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.1.5.git20201219-1
  123. - moved to git HEAD.
  124. - added php80 support.
  125. - dropped php73 support.
  126. * Thu Dec 19 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.1.5-1
  127. - new upstream release.
  128. - added php74 support.
  129. * Fri Dec 21 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.1.1-1
  130. - new upstream release.
  131. - dropped Patch1: fixed in upstream.
  132. - drooped php72 support.
  133. * Sat Dec 08 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.0.5-1
  134. - added php73 support.
  135. * Wed Dec 20 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.0.4-1
  136. - new upstream release.
  137. * Thu Mar 16 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.0.3-1
  138. - initial build for Vine Linux.