php-ext-memcached-vl.spec 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. # needs launching memcached
  2. %bcond_with test
  3. %define build_targets 74 80
  4. %define extname memcached
  5. %global gitdate 20210320
  6. %global githash 19a02bb5bfaeb520b857a2d64172f7d2a9615fb3
  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. %debug_package
  55. %prep
  56. %setup -T -c -a 0 -n %{srcdir}
  57. pushd %{srcdir}
  58. mkdir -p ../docs
  59. cp -f CREDITS LICENSE README* ChangeLog ../docs/
  60. popd
  61. for v in %{build_targets}; do
  62. cp -a %{srcdir} php${v}
  63. done
  64. %build
  65. for v in %{build_targets}; do
  66. pushd php${v}
  67. phpize${v}
  68. %configure --with-php-config=php-config${v}
  69. %__make %{?_smp_mflags}
  70. popd
  71. done
  72. %install
  73. cat > memcached.ini <<EOF
  74. ; Enable memcached extension module
  75. extension=memcached.so
  76. EOF
  77. cat %{srcdir}/memcached.ini >> memcached.ini
  78. for v in %{build_targets}; do
  79. pushd php${v}
  80. mkdir -p %{buildroot}%{_libdir}/php${v}/
  81. mkdir -p %{buildroot}%{_sysconfdir}/php${v}/php.d
  82. %makeinstall INSTALL_ROOT=%{buildroot}
  83. install -m644 ../memcached.ini %{buildroot}%{_sysconfdir}/php${v}/php.d/memcached.ini
  84. cat > ../files.php${v} <<EOF
  85. %%defattr(-,root,root)
  86. %%doc docs/*
  87. %{_libdir}/php${v}/*
  88. %%config(noreplace) %{_sysconfdir}/php${v}/php.d/*
  89. EOF
  90. popd
  91. done
  92. %check
  93. %if %{with test}
  94. for v in %{build_targets}; do
  95. pushd php${v}
  96. NO_INTERACTION=yes TEST_PHPDBG_EXECUTABLE=/usr/bin/phpdbg${v} make test
  97. popd
  98. done
  99. %endif
  100. %files -n php74-ext-%{extname} -f files.php74
  101. %files -n php80-ext-%{extname} -f files.php80
  102. %changelog
  103. * Sat Mar 20 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.1.5.20210320
  104. - moved to git HEAD.
  105. - dropped Patch0: fixed in upstream.
  106. * Sat Dec 19 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.1.5.20201219
  107. - moved to git HEAD.
  108. - added php80 support.
  109. - dropped php73 support.
  110. * Thu Dec 19 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.1.5-1
  111. - new upstream release.
  112. - added php74 support.
  113. * Fri Dec 21 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.1.1-1
  114. - new upstream release.
  115. - dropped Patch1: fixed in upstream.
  116. - drooped php72 support.
  117. * Sat Dec 08 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.0.5-1
  118. - added php73 support.
  119. * Wed Dec 20 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.0.4-1
  120. - new upstream release.
  121. * Thu Mar 16 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.0.3-1
  122. - initial build for Vine Linux.