php-ext-memcached-vl.spec 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. # needs launching memcached
  2. %bcond_with test
  3. %define build_targets 74 80
  4. %define extname memcached
  5. %global gitdate 20201219
  6. %global githash bfb0a66809d43080219ab5381235f848c91eff7e
  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. Patch0: sess_prefix.patch
  24. BuildRequires: libmemcached-devel
  25. BuildRequires: zlib-devel
  26. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  27. %description
  28. This module enable to access memcached in PHP scripts.
  29. %description -l ja
  30. このモジュールは、PHPスクリプト中でmemcachedにアクセスできるようにします。
  31. %package -n php74-ext-%{extname}
  32. Summary: memcached extension for PHP-7.4
  33. Summary(ja): PHP-7.4用memcached拡張
  34. Group: programming
  35. BuildRequires: php74-devel
  36. %if "%{?req_php74_api}" != ""
  37. Requires: %{req_php74_api}
  38. %endif
  39. %description -n php74-ext-%{extname}
  40. This module enable to access memcached in PHP scripts.
  41. %description -n php74-ext-%{extname} -l ja
  42. このモジュールは、PHPスクリプト中でmemcachedにアクセスできるようにします。
  43. %package -n php80-ext-%{extname}
  44. Summary: memcached extension for PHP-8.0
  45. Summary(ja): PHP-8.0用memcached拡張
  46. Group: programming
  47. BuildRequires: php80-devel
  48. %if "%{?req_php80_api}" != ""
  49. Requires: %{req_php80_api}
  50. %endif
  51. %description -n php80-ext-%{extname}
  52. This module enable to access memcached in PHP scripts.
  53. %description -n php80-ext-%{extname} -l ja
  54. このモジュールは、PHPスクリプト中でmemcachedにアクセスできるようにします。
  55. %debug_package
  56. %prep
  57. %setup -T -c -a 0 -n %{srcdir}
  58. pushd %{srcdir}
  59. mkdir -p ../docs
  60. cp -f CREDITS LICENSE README* ChangeLog ../docs/
  61. popd
  62. for v in %{build_targets}; do
  63. cp -a %{srcdir} php${v}
  64. done
  65. %build
  66. for v in %{build_targets}; do
  67. pushd php${v}
  68. phpize${v}
  69. %configure --with-php-config=php-config${v}
  70. %__make %{?_smp_mflags}
  71. popd
  72. done
  73. %install
  74. rm -rf %{buildroot}
  75. cat > memcached.ini <<EOF
  76. ; Enable memcached extension module
  77. extension=memcached.so
  78. EOF
  79. cat %{srcdir}/memcached.ini >> memcached.ini
  80. for v in %{build_targets}; do
  81. pushd php${v}
  82. mkdir -p %{buildroot}%{_libdir}/php${v}/
  83. mkdir -p %{buildroot}%{_sysconfdir}/php${v}/php.d
  84. %makeinstall INSTALL_ROOT=%{buildroot}
  85. install -m644 ../memcached.ini %{buildroot}%{_sysconfdir}/php${v}/php.d/memcached.ini
  86. cat > ../files.php${v} <<EOF
  87. %%defattr(-,root,root)
  88. %%doc docs/*
  89. %{_libdir}/php${v}/*
  90. %%config(noreplace) %{_sysconfdir}/php${v}/php.d/*
  91. EOF
  92. popd
  93. done
  94. %check
  95. %if %{with test}
  96. for v in %{build_targets}; do
  97. pushd php${v}
  98. NO_INTERACTION=yes TEST_PHPDBG_EXECUTABLE=/usr/bin/phpdbg${v} make test
  99. popd
  100. done
  101. %endif
  102. %clean
  103. rm -rf %{buildroot}
  104. %files -n php74-ext-%{extname} -f files.php74
  105. %files -n php80-ext-%{extname} -f files.php80
  106. %changelog
  107. * Sat Dec 19 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net>
  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.