Logoj0ke.net Open Build Service > Projects > internetx:php7:EL7 > php-pecl-redis > Changes
Sign Up | Log In

Changes of Revision 2

[-] Added php-pecl-redis.changes
 
1
@@ -0,0 +1,5 @@
2
+-------------------------------------------------------------------
3
+Thu Aug 18 12:52:20 UTC 2016 - cs@linux-administrator.com
4
+
5
+- initial import
6
+
7
[+] Deleted php5-redis.changes ^
[-] Added php-pecl-redis.spec ^
201
 
1
@@ -0,0 +1,246 @@
2
+# spec file for php-pecl-redis
3
+#
4
+# Copyright (c) 2012-2014 Remi Collet
5
+# License: CC-BY-SA
6
+# http://creativecommons.org/licenses/by-sa/3.0/
7
+#
8
+# Please, preserve the changelog entries
9
+#
10
+%global php_inidir  %{_sysconfdir}/php.d
11
+%global __pecl      %{_bindir}/pecl
12
+%global __php       %{_bindir}/php
13
+
14
+%global basepkg     php
15
+%global pecl_name   redis
16
+%global with_zts    0%{?__ztsphp:1}
17
+%global with_tests  %{?_with_tests:1}%{!?_with_tests:0}
18
+
19
+%global with_igbinary 0
20
+
21
+Summary:       Extension for communicating with the Redis key-value store
22
+Name:          %{basepkg}-pecl-redis
23
+Version:       3.0.0
24
+Release:       1%{?dist}
25
+License:       PHP
26
+Group:         Development/Languages
27
+URL:           http://pecl.php.net/package/redis
28
+Source0:       http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
29
+
30
+BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root
31
+BuildRequires: %{basepkg}-devel, %{basepkg}-pear
32
+%if 0%{?with_igbinary}
33
+BuildRequires: %{basepkg}-pecl-igbinary-devel
34
+%endif
35
+# to run Test suite
36
+%if %{with_tests}
37
+BuildRequires: redis >= 2.6
38
+%endif
39
+
40
+Requires:      php(zend-abi) = %{php_zend_api}
41
+Requires:      php(api) = %{php_core_api}
42
+%if 0%{?with_igbinary}
43
+# php-pecl-igbinary missing php-pecl(igbinary)%{?_isa}
44
+Requires:      php-pecl-igbinary%{?_isa}
45
+%endif
46
+Provides:      php-redis = %{version}-%{release}
47
+Provides:      php-redis%{?_isa} = %{version}-%{release}
48
+Provides:      php-pecl(%{pecl_name}) = %{version}
49
+Provides:      php-pecl(%{pecl_name})%{?_isa} = %{version}
50
+Provides:      php-pecl-%{pecl_name} = %{version}-%{release}
51
+Provides:      php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
52
+
53
+%if 0%{?fedora} < 20 && 0%{?rhel} < 7
54
+# Filter private shared object
55
+%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
56
+%{?filter_setup}
57
+%endif
58
+
59
+
60
+%description
61
+The phpredis extension provides an API for communicating
62
+with the Redis key-value store.
63
+
64
+This Redis client implements most of the latest Redis API.
65
+As method only only works when also implemented on the server side,
66
+some doesn't work with an old redis server version.
67
+
68
+
69
+%prep
70
+%setup -q -c
71
+
72
+# rename source folder
73
+mv %{pecl_name}-%{version} nts
74
+
75
+# Sanity check, really often broken
76
+extver=$(sed -n '/#define PHP_REDIS_VERSION/{s/.* "//;s/".*$//;p}' nts/php_redis.h)
77
+if test "x${extver}" != "x%{version}"; then
78
+   : Error: Upstream extension version is ${extver}, expecting %{version}.
79
+   exit 1
80
+fi
81
+
82
+%if %{with_zts}
83
+# duplicate for ZTS build
84
+cp -pr nts zts
85
+%endif
86
+
87
+# Drop in the bit of configuration
88
+cat > %{pecl_name}.ini << 'EOF'
89
+; Enable %{pecl_name} extension module
90
+extension = %{pecl_name}.so
91
+
92
+; phpredis can be used to store PHP sessions. 
93
+; To do this, uncomment and configure below
94
+;session.save_handler = %{pecl_name}
95
+;session.save_path = "tcp://host1:6379?weight=1, tcp://host2:6379?weight=2&timeout=2.5, tcp://host3:6379?weight=2"
96
+EOF
97
+
98
+
99
+%build
100
+cd nts
101
+%{_bindir}/phpize
102
+%configure \
103
+    --enable-redis \
104
+    --enable-redis-session \
105
+%if 0%{?with_igbinary}
106
+    --enable-redis-igbinary \
107
+%endif
108
+    --with-php-config=%{_bindir}/php-config
109
+make %{?_smp_mflags}
110
+
111
+%if %{with_zts}
112
+cd ../zts
113
+%{_bindir}/zts-phpize
114
+%configure \
115
+    --enable-redis \
116
+    --enable-redis-session \
117
+%if 0%{?with_igbinary}
118
+    --enable-redis-igbinary \
119
+%endif
120
+    --with-php-config=%{_bindir}/zts-php-config
121
+make %{?_smp_mflags}
122
+%endif
123
+
124
+
125
+%install
126
+# Install the NTS stuff
127
+make -C nts install INSTALL_ROOT=%{buildroot}
128
+install -D -m 644 %{pecl_name}.ini %{buildroot}%{php_inidir}/%{pecl_name}.ini
129
+
130
+%if %{with_zts}
131
+# Install the ZTS stuff
132
+make -C zts install INSTALL_ROOT=%{buildroot}
133
+install -D -m 644 %{pecl_name}.ini %{buildroot}%{php_ztsinidir}/%{pecl_name}.ini
134
+%endif
135
+
136
+# Install the package XML file
137
+install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
138
+
139
+# Test & Documentation
140
+cd nts
141
+for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
142
+do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
143
+done
144
+
145
+
146
+%check
147
+# simple module load test
148
+%{__php} --no-php-ini \
149
+%if 0%{?with_igbinary}
150
+    --define extension=igbinary.so \
151
+%endif
152
+    --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
153
+    --modules | grep %{pecl_name}
154
+
155
+%if %{with_zts}
156
+%{__ztsphp} --no-php-ini \
157
+%if 0%{?with_igbinary}
158
+    --define extension=igbinary.so \
159
+%endif
160
+    --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
161
+    --modules | grep %{pecl_name}
162
+%endif
163
+
164
+%if %{with_tests}
165
+cd nts/tests
166
+
167
+# this test requires redis >= 2.6.9
168
+# https://github.com/nicolasff/phpredis/pull/333
169
+sed -e s/testClient/SKIP_testClient/ \
170
+    -i TestRedis.php
171
+
172
+# Launch redis server
173
+mkdir -p {run,log,lib}/redis
174
+sed -e "s:/var:$PWD:" \
175
+    -e "/daemonize/s/no/yes/" \
176
+    /etc/redis.conf >redis.conf
177
+# port number to allow 32/64 build at same time
178
+# and avoid conflict with a possible running server
179
+%if 0%{?__isa_bits}
180
+port=$(expr %{__isa_bits} + 6350)
181
+%else
182
+%ifarch x86_64
183
+port=6414
184
+%else
185
+port=6382
186
+%endif
187
+%endif
188
+sed -e "s/6379/$port/" -i redis.conf
189
+sed -e "s/6379/$port/" -i TestRedis.php
190
+%{_sbindir}/redis-server ./redis.conf
191
+
192
+# Run the test Suite
193
+ret=0
194
+%{__php} --no-php-ini \
195
+%if 0%{?with_igbinary}
196
+    --define extension=igbinary.so \
197
+%endif
198
+    --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
199
+    TestRedis.php || ret=1
200
+
201
[+] Deleted php5-redis.spec ^
Deleted redis-2.2.7.tgz ^
Deleted redis-2.2.8.tgz ^
Changed redis-3.0.0.tgz ^