diff options
Diffstat (limited to 'php-pecl-memcache.spec')
-rw-r--r-- | php-pecl-memcache.spec | 54 |
1 files changed, 35 insertions, 19 deletions
diff --git a/php-pecl-memcache.spec b/php-pecl-memcache.spec index 21959cc..7a76e47 100644 --- a/php-pecl-memcache.spec +++ b/php-pecl-memcache.spec @@ -12,11 +12,12 @@ %endif # https://github.com/websupport-sk/pecl-memcache/commits/NON_BLOCKING_IO_php7 -%global gh_commit e702b5f91ec222e20d1d5cea0ffc6be012992d70 +%global gh_commit ddda96f7bfa0f0bba9ffb6974215ced8a1b80010 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner websupport-sk %global gh_project pecl-memcache -%global gh_date 20170802 +%global gh_date 20190319 +#global prever dev %global pecl_name memcache # Not ready, some failed UDP tests. Neded investigation. %global with_tests 0%{?_with_tests:1} @@ -29,19 +30,18 @@ Summary: Extension to work with the Memcached caching daemon Name: %{?scl_prefix}php-pecl-memcache -Version: 3.0.9 -%if 0%{?gh_date:1} +Version: 4.0.2 +%if 0%{?prever:1} Release: 0.13.%{gh_date}.%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} -Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz %else -Release: 5%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} -Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz +Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} %endif +Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz License: PHP URL: http://pecl.php.net/package/%{pecl_name} -Patch0: https://patch-diff.githubusercontent.com/raw/websupport-sk/pecl-memcache/pull/26.patch -Patch1: https://patch-diff.githubusercontent.com/raw/websupport-sk/pecl-memcache/pull/30.patch +Patch0: https://patch-diff.githubusercontent.com/raw/websupport-sk/pecl-memcache/pull/40.patch +Patch1: https://patch-diff.githubusercontent.com/raw/websupport-sk/pecl-memcache/pull/45.patch BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel @@ -118,13 +118,13 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -c -q -%if 0%{?gh_date:1} +%if 1 mv %{gh_project}-%{gh_commit} NTS %{__php} -r ' $pkg = simplexml_load_file("NTS/package.xml"); $pkg->date = substr("%{gh_date}",0,4)."-".substr("%{gh_date}",4,2)."-".substr("%{gh_date}",6,2); - $pkg->version->release = "%{version}dev"; - $pkg->stability->release = "devel"; + $pkg->version->release = "%{version}%{?prever}"; + $pkg->stability->release = "%{?prever}%{!?prever:stable}"; $pkg->asXML("package.xml"); ' %else @@ -137,16 +137,14 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml pushd NTS -%if "%{php_version}" > "7.1" -%patch0 -p1 -b .gh26 -%endif -%patch1 -p1 -b .gh30 +%patch0 -p1 -b .gh40 +%patch1 -p1 -b .gh45 # Chech version as upstream often forget to update this dir=php$(%{__php} -r 'echo PHP_MAJOR_VERSION;') extver=$(sed -n '/#define PHP_MEMCACHE_VERSION/{s/.* "//;s/".*$//;p}' $dir/php_memcache.h) -if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then - : Error: Upstream version is now ${extver}, expecting %{version}%{?gh_date:-dev}. +if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then + : Error: Upstream version is now ${extver}, expecting %{version}%{?prever:-%{prever}} : Update the pdover macro and rebuild. exit 1 fi @@ -182,6 +180,11 @@ extension=%{pecl_name}.so ; Lock Timeout ;memcache.lock_timeout = 15 +;memcache.prefix_host_key = 0 +;memcache.prefix_host_key_remove_www = 1 +;memcache.prefix_host_key_remove_subdomain = 0 +;memcache.prefix_static_key = '' + ; ----- Options to use the memcache session handler ; RPM note : save_handler and save_path are defined @@ -191,7 +194,13 @@ extension=%{pecl_name}.so ; Use memcache as a session handler ;session.save_handler=memcache ; Defines a comma separated of server urls to use for session storage +; Only used when memcache.session_save_path is not set ;session.save_path="tcp://localhost:11211?persistent=1&weight=1&timeout=1&retry_interval=15" +;memcache.session_prefix_host_key = 0 +;memcache.session_prefix_host_key_remove_www = 1 +;memcache.session_prefix_host_key_remove_subdomain = 0 +;memcache.session_prefix_static_key = '' +;memcache.session_save_path = '' EOF %if %{with_zts} @@ -256,7 +265,7 @@ sed -e "s:/var/run/memcached/memcached.sock:$PWD/memcached.sock:" \ -i tests/connect.inc : Udp tests -rm tests/0{36,38,39,55,57}.phpt +rm tests/0{35,40,44,53}.phpt tests/bug73539.phpt : Launch the daemons memcached -p 11211 -U 11211 -d -P $PWD/memcached1.pid @@ -315,6 +324,13 @@ fi %changelog +* Tue Mar 19 2019 Remi Collet <remi@remirepo.net> - 4.0.2-2 +- update to 4.0.2 from https://github.com/websupport-sk/pecl-memcache +- add patch for PHP < 7.2 from + https://github.com/websupport-sk/pecl-memcache/pull/40 +- add patch to allow session.save_path from + https://github.com/websupport-sk/pecl-memcache/pull/45 + * Mon Jan 21 2019 Remi Collet <remi@remirepo.net> - 3.0.9-0.13.20170802.e702b5f - refresh patch (for php < 7.2) |