Selaa lähdekoodia

php-ext-phpredis-5.3.4-1

Tomohiro "Tomo-p" KATO 2 vuotta sitten
vanhempi
commit
54f066b305
1 muutettua tiedostoa jossa 65 lisäystä ja 2 poistoa
  1. 65 2
      p/php-ext-phpredis/php-ext-phpredis-vl.spec

+ 65 - 2
p/php-ext-phpredis/php-ext-phpredis-vl.spec

@@ -3,15 +3,16 @@
 Summary: A redis extension for PHP
 Summary(ja): PHP用redis拡張
 Name: php-ext-phpredis
-Version: 5.3.3
+Version: 5.3.4
 Release: 1%{_dist_release}
 Group: programming
 Vendor: Project Vine
 Distribution: Vine Linux
 Packager: tomop
 
-Source: https://github.com/phpredis/phpredis/archive/%{version}.tar.gz#/phpredis-%{version}.tgz
 License: The PHP License
+URL: https://github.com/phpredis/phpredis
+Source: https://github.com/phpredis/phpredis/archive/%{version}.tar.gz#/phpredis-%{version}.tgz
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 
 %description
@@ -22,6 +23,23 @@ key-value store.
  phpredis拡張は、Redis KVSと通信するためのAPIを提供します。
 
 
+%package -n php81-ext-phpredis
+Summary: A redis extension for PHP
+Summary(ja): PHP用redis拡張
+Group: programming
+BuildRequires: php81-devel
+%if "%{?req_php81_api}" != ""
+Requires: %{req_php81_api}
+%endif
+
+%description -n php81-ext-phpredis
+ The phpredis extension provides an API for communicating with the Redis
+key-value store.
+
+%description -n php81-ext-phpredis -l ja
+ phpredis拡張は、Redis KVSと通信するためのAPIを提供します。
+
+
 %package -n php80-ext-phpredis
 Summary: A redis extension for PHP
 Summary(ja): PHP用redis拡張
@@ -63,6 +81,11 @@ key-value store.
 %setup -q -c -n phpredis-%{version}
 cp %{extname}-%{version}/{COPYING,CREDITS,Changelog.md,*.markdown} ./
 
+cp -a %{extname}-%{version} php81
+pushd php81
+phpize81
+popd
+
 cp -a %{extname}-%{version} php80
 pushd php80
 phpize80
@@ -75,6 +98,11 @@ popd
 
 
 %build
+pushd php81
+%configure --with-php-config=%{_bindir}/php-config81
+%__make %{?_smp_mflags}
+popd
+
 pushd php80
 %configure --with-php-config=%{_bindir}/php-config80
 %__make %{?_smp_mflags}
@@ -88,6 +116,30 @@ popd
 
 %install
 rm -rf %{buildroot}
+pushd php81
+mkdir -p %{buildroot}%{_libdir}/php81/
+mkdir -p %{buildroot}%{_sysconfdir}/php81/php.d
+%makeinstall INSTALL_ROOT=%{buildroot}
+
+cat > %{buildroot}%{_sysconfdir}/php81/php.d/redis.ini <<EOF
+; Enable redis extension module
+extension=redis.so
+
+;session.save_handler = redis
+;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"
+
+; Should the locking be enabled? Defaults to: 0.
+;redis.session.locking_enabled = 1
+; How long should the lock live (in seconds)? Defaults to: value of max_execution_time.
+;redis.session.lock_expire = 60
+; How long to wait between attempts to acquire lock, in microseconds (µs)?. Defaults to: 2000
+;redis.session.lock_wait_time = 50000
+; Maximum number of times to retry (-1 means infinite). Defaults to: 10
+;redis.session.lock_retries = 10
+
+EOF
+popd
+
 pushd php80
 mkdir -p %{buildroot}%{_libdir}/php80/
 mkdir -p %{buildroot}%{_sysconfdir}/php80/php.d
@@ -141,6 +193,13 @@ popd
 rm -rf %{buildroot}
 
 
+%files -n php81-ext-phpredis
+%defattr(-,root,root)
+%license COPYING
+%doc CREDITS Changelog.md *.markdown
+%{_libdir}/php81/*
+%config(noreplace) %{_sysconfdir}/php81/php.d/*
+
 %files -n php80-ext-phpredis
 %defattr(-,root,root)
 %license COPYING
@@ -157,6 +216,10 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Fri Nov 26 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.3.4-1
+- new upstream release.
+- added php81 support.
+
 * Sat Mar 20 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.3.3-1
 - new upstream release.