日本OpenSolaris Users Group有志による、レポジトリサーバ作成のためのspecファイル群です。
Revision | 96d1353dc52bc0d281dce0bee9691207fc486ae7 (tree) |
---|---|
Time | 2019-02-04 05:26:58 |
Author | tsundoku <me@tsun...> |
Commiter | tsundoku |
SFEphp-memcache: spec cleanup (do not try to build for PHP 7.x)
@@ -4,12 +4,6 @@ | ||
4 | 4 | %define build53 %( test -x /usr/php/5.3/bin/php && echo 1 || echo 0) |
5 | 5 | %define build55 %( test -x /usr/php/5.5/bin/php && echo 1 || echo 0) |
6 | 6 | %define build56 %( test -x /usr/php/5.6/bin/php && echo 1 || echo 0) |
7 | -%define build71 %( test -x /usr/php/7.1/bin/php && echo 1 || echo 0) | |
8 | -%define build72 %( test -x /usr/php/7.2/bin/php && echo 1 || echo 0) | |
9 | -%define build73 %( test -x /usr/php/7.3/bin/php && echo 1 || echo 0) | |
10 | -%define build71jposug %( test -x /opt/jposug/php/7.1/bin/php && echo 1 || echo 0) | |
11 | -%define build72jposug %( test -x /opt/jposug/php/7.2/bin/php && echo 1 || echo 0) | |
12 | -%define build73jposug %( test -x /opt/jposug/php/7.3/bin/php && echo 1 || echo 0) | |
13 | 7 | |
14 | 8 | %define tarball_name memcache |
15 | 9 |
@@ -49,6 +43,7 @@ | ||
49 | 43 | IPS_package_name: web/php/extension/php-memcache-56 |
50 | 44 | BuildRequires: web/php-56 = * |
51 | 45 | Requires: web/php-56 = * |
46 | +%define zts_version_56 20131226 | |
52 | 47 | |
53 | 48 | %package 56-old |
54 | 49 | IPS_package_name: web/php-56/extension/php-memcache |
@@ -59,48 +54,6 @@ | ||
59 | 54 | Renamed_To: web/php/extension/php-memcache-56 = * |
60 | 55 | %endif |
61 | 56 | |
62 | -%if %{build71} | |
63 | -%package 71 | |
64 | -IPS_package_name: web/php/extension/php-memcache-71 | |
65 | -BuildRequires: web/php-71 = * | |
66 | -Requires: web/php-71 = * | |
67 | -%endif | |
68 | - | |
69 | -%if %{build72} | |
70 | -%package 72 | |
71 | -IPS_package_name: web/php/extension/php-memcache-72 | |
72 | -BuildRequires: web/php-72 = * | |
73 | -Requires: web/php-72 = * | |
74 | -%endif | |
75 | - | |
76 | -%if %{build73} | |
77 | -%package 73 | |
78 | -IPS_package_name: web/php/extension/php-memcache-73 | |
79 | -BuildRequires: web/php-73 = * | |
80 | -Requires: web/php-73 = * | |
81 | -%endif | |
82 | - | |
83 | -%if %{build71jposug} | |
84 | -%package 71jposug | |
85 | -IPS_package_name: web/php/extension/php-memcache-71jposug | |
86 | -BuildRequires: web/php-71jposug = * | |
87 | -Requires: web/php-71jposug = * | |
88 | -%endif | |
89 | - | |
90 | -%if %{build72jposug} | |
91 | -%package 72jposug | |
92 | -IPS_package_name: web/php/extension/php-memcache-72jposug | |
93 | -BuildRequires: web/php-72jposug = * | |
94 | -Requires: web/php-72jposug = * | |
95 | -%endif | |
96 | - | |
97 | -%if %{build73jposug} | |
98 | -%package 73jposug | |
99 | -IPS_package_name: web/php/extension/php-memcache-73jposug | |
100 | -BuildRequires: web/php-73jposug = * | |
101 | -Requires: web/php-73jposug = * | |
102 | -%endif | |
103 | - | |
104 | 57 | %prep |
105 | 58 | |
106 | 59 | cd %{_builddir} |
@@ -129,37 +82,13 @@ | ||
129 | 82 | %if %{build56} |
130 | 83 | setup_for 5.6 |
131 | 84 | %endif |
132 | -%if %{build71} | |
133 | -setup_for 7.1 | |
134 | -%endif | |
135 | -%if %{build72} | |
136 | -setup_for 7.2 | |
137 | -%endif | |
138 | -%if %{build73} | |
139 | -setup_for 7.3 | |
140 | -%endif | |
141 | -%if %{build71jposug} | |
142 | -setup_for 7.1jposug | |
143 | -%endif | |
144 | -%if %{build72jposug} | |
145 | -setup_for 7.2jposug | |
146 | -%endif | |
147 | -%if %{build73jposug} | |
148 | -setup_for 7.3jposug | |
149 | -%endif | |
150 | 85 | |
151 | 86 | %build |
152 | 87 | |
153 | 88 | build_for() { |
154 | 89 | cd %{_builddir}/%{tarball_name}-%{version}/${1} |
155 | - if [ "x${1}" = 'x7.1jposug' -o "x${1}" = 'x7.2jposug' -o "x${1}" = 'x7.3jposug' ] | |
156 | - then | |
157 | - php_ver=$(echo $1 | sed -e 's/jposug//') | |
158 | - php_bindir=/opt/jposug/php/${php_ver}/bin | |
159 | - else | |
160 | - php_ver=$1 | |
161 | - php_bindir=/usr/php/${php_ver}/bin | |
162 | - fi | |
90 | + php_ver=$1 | |
91 | + php_bindir=/usr/php/${php_ver}/bin | |
163 | 92 | |
164 | 93 | ${php_bindir}/phpize |
165 | 94 | ./configure \ |
@@ -200,24 +129,6 @@ | ||
200 | 129 | %if %{build56} |
201 | 130 | build_for 5.6 |
202 | 131 | %endif |
203 | -%if %{build71} | |
204 | -build_for 7.1 | |
205 | -%endif | |
206 | -%if %{build72} | |
207 | -build_for 7.2 | |
208 | -%endif | |
209 | -%if %{build73} | |
210 | -build_for 7.3 | |
211 | -%endif | |
212 | -%if %{build71jposug} | |
213 | -build_for 7.1jposug | |
214 | -%endif | |
215 | -%if %{build72jposug} | |
216 | -build_for 7.2jposug | |
217 | -%endif | |
218 | -%if %{build73jposug} | |
219 | -build_for 7.3jposug | |
220 | -%endif | |
221 | 132 | |
222 | 133 | %install |
223 | 134 |
@@ -225,47 +136,23 @@ | ||
225 | 136 | |
226 | 137 | install_for() { |
227 | 138 | cd %{_builddir}/%{tarball_name}-%{version}/${1} |
228 | - if [ "x${1}" = 'x7.1jposug' -o "x${1}" = 'x7.2jposug' -o "x${1}" = 'x7.3jposug' ] | |
229 | - then | |
230 | - php_ver=$(echo $1 | sed -e 's/jposug//') | |
231 | - php_prefix=/opt/jposug | |
232 | - else | |
233 | - php_ver=$1 | |
234 | - php_prefix=%{_prefix} | |
235 | - fi | |
139 | + php_ver=$1 | |
140 | + php_prefix=%{_prefix} | |
236 | 141 | |
237 | - mkdir -p $RPM_BUILD_ROOT/${php_prefix}/php/${php_ver}/lib/extensions/no-debug-non-zts-20180731/ | |
238 | - cp modules/memcache.so $RPM_BUILD_ROOT/${php_prefix}/php/${php_ver}/lib/extensions/no-debug-non-zts-20180731/ | |
142 | + mkdir -p $RPM_BUILD_ROOT/${php_prefix}/php/${php_ver}/lib/extensions/no-debug-non-zts-${2}/ | |
143 | + cp modules/memcache.so $RPM_BUILD_ROOT/${php_prefix}/php/${php_ver}/lib/extensions/no-debug-non-zts-${2}/ | |
239 | 144 | mkdir -p /etc/php/${php_ver}/conf.d |
240 | 145 | cp %{SOURCE1} $RPM_BUILD_ROOT/etc/php/${php_ver}/conf.d/%{tarball_name}.ini |
241 | 146 | } |
242 | 147 | |
243 | 148 | %if %{build53} |
244 | -install_for 5.3 | |
149 | +install_for 5.3 %{zts_version_53} | |
245 | 150 | %endif |
246 | 151 | %if %{build55} |
247 | -install_for 5.5 | |
152 | +install_for 5.5 %{zts_version_55} | |
248 | 153 | %endif |
249 | 154 | %if %{build56} |
250 | -install_for 5.6 | |
251 | -%endif | |
252 | -%if %{build71} | |
253 | -install_for 7.1 | |
254 | -%endif | |
255 | -%if %{build72} | |
256 | -install_for 7.2 | |
257 | -%endif | |
258 | -%if %{build73} | |
259 | -install_for 7.3 | |
260 | -%endif | |
261 | -%if %{build71jposug} | |
262 | -install_for 7.1jposug | |
263 | -%endif | |
264 | -%if %{build72jposug} | |
265 | -install_for 7.2jposug | |
266 | -%endif | |
267 | -%if %{build73jposug} | |
268 | -install_for 7.3jposug | |
155 | +install_for 5.6 %{zts_version_56} | |
269 | 156 | %endif |
270 | 157 | |
271 | 158 | %{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT} |
@@ -281,8 +168,8 @@ | ||
281 | 168 | %defattr (-, root, bin) |
282 | 169 | %dir %attr(0755, root, bin) %{_prefix}/php/5.3/lib |
283 | 170 | %dir %attr(0755, root, bin) %{_prefix}/php/5.3/lib/extensions |
284 | -%dir %attr(0755, root, bin) %{_prefix}/php/5.3/lib/extensions/no-debug-non-zts-20180731 | |
285 | -%attr(0444, root, bin) %{_prefix}/php/5.3/lib/extensions/no-debug-non-zts-20180731/memcache.so | |
171 | +%dir %attr(0755, root, bin) %{_prefix}/php/5.3/lib/extensions/no-debug-non-zts-%{zts_version_53} | |
172 | +%attr(0444, root, bin) %{_prefix}/php/5.3/lib/extensions/no-debug-non-zts-%{zts_version_53}/memcache.so | |
286 | 173 | %dir %attr(0755, root, sys) %{_sysconfdir} |
287 | 174 | %{_sysconfdir}/php/5.3/conf.d/* |
288 | 175 | %endif |
@@ -292,8 +179,8 @@ | ||
292 | 179 | %defattr (-, root, bin) |
293 | 180 | %dir %attr(0755, root, bin) %{_prefix}/php/5.5/lib |
294 | 181 | %dir %attr(0755, root, bin) %{_prefix}/php/5.5/lib/extensions |
295 | -%dir %attr(0755, root, bin) %{_prefix}/php/5.5/lib/extensions/no-debug-non-zts-20180731 | |
296 | -%attr(0444, root, bin) %{_prefix}/php/5.5/lib/extensions/no-debug-non-zts-20180731/memcache.so | |
182 | +%dir %attr(0755, root, bin) %{_prefix}/php/5.5/lib/extensions/no-debug-non-zts-%{zts_version_55} | |
183 | +%attr(0444, root, bin) %{_prefix}/php/5.5/lib/extensions/no-debug-non-zts-%{zts_version_55}/memcache.so | |
297 | 184 | %dir %attr(0755, root, sys) %{_sysconfdir} |
298 | 185 | %{_sysconfdir}/php/5.5/conf.d/* |
299 | 186 | %endif |
@@ -303,79 +190,16 @@ | ||
303 | 190 | %defattr (-, root, bin) |
304 | 191 | %dir %attr(0755, root, bin) %{_prefix}/php/5.6/lib |
305 | 192 | %dir %attr(0755, root, bin) %{_prefix}/php/5.6/lib/extensions |
306 | -%dir %attr(0755, root, bin) %{_prefix}/php/5.6/lib/extensions/no-debug-non-zts-20180731 | |
307 | -%attr(0444, root, bin) %{_prefix}/php/5.6/lib/extensions/no-debug-non-zts-20180731/memcache.so | |
193 | +%dir %attr(0755, root, bin) %{_prefix}/php/5.6/lib/extensions/no-debug-non-zts-%{zts_version_56} | |
194 | +%attr(0444, root, bin) %{_prefix}/php/5.6/lib/extensions/no-debug-non-zts-%{zts_version_56}/memcache.so | |
308 | 195 | %dir %attr(0755, root, sys) %{_sysconfdir} |
309 | 196 | %{_sysconfdir}/php/5.6/conf.d/* |
310 | 197 | %endif |
311 | 198 | |
312 | -%if %{build71} | |
313 | -%files 71 | |
314 | -%defattr (-, root, bin) | |
315 | -%dir %attr(0755, root, bin) %{_prefix}/php/7.1/lib | |
316 | -%dir %attr(0755, root, bin) %{_prefix}/php/7.1/lib/extensions | |
317 | -%dir %attr(0755, root, bin) %{_prefix}/php/7.1/lib/extensions/no-debug-non-zts-20180731 | |
318 | -%attr(0444, root, bin) %{_prefix}/php/7.1/lib/extensions/no-debug-non-zts-20180731/memcache.so | |
319 | -%dir %attr(0755, root, sys) %{_sysconfdir} | |
320 | -%{_sysconfdir}/php/7.1/conf.d/* | |
321 | -%endif | |
322 | - | |
323 | -%if %{build72} | |
324 | -%files 72 | |
325 | -%defattr (-, root, bin) | |
326 | -%dir %attr(0755, root, bin) %{_prefix}/php/7.2/lib | |
327 | -%dir %attr(0755, root, bin) %{_prefix}/php/7.2/lib/extensions | |
328 | -%dir %attr(0755, root, bin) %{_prefix}/php/7.2/lib/extensions/no-debug-non-zts-20180731 | |
329 | -%attr(0444, root, bin) %{_prefix}/php/7.2/lib/extensions/no-debug-non-zts-20180731/memcache.so | |
330 | -%dir %attr(0755, root, sys) %{_sysconfdir} | |
331 | -%{_sysconfdir}/php/7.2/conf.d/* | |
332 | -%endif | |
333 | - | |
334 | -%if %{build73} | |
335 | -%files 73 | |
336 | -%defattr (-, root, bin) | |
337 | -%dir %attr(0755, root, bin) %{_prefix}/php/7.3/lib | |
338 | -%dir %attr(0755, root, bin) %{_prefix}/php/7.3/lib/extensions | |
339 | -%dir %attr(0755, root, bin) %{_prefix}/php/7.3/lib/extensions/no-debug-non-zts-20180731 | |
340 | -%attr(0444, root, bin) %{_prefix}/php/7.3/lib/extensions/no-debug-non-zts-20180731/memcache.so | |
341 | -%dir %attr(0755, root, sys) %{_sysconfdir} | |
342 | -%{_sysconfdir}/php/7.3/conf.d/* | |
343 | -%endif | |
344 | - | |
345 | -%if %{build71jposug} | |
346 | -%files 71jposug | |
347 | -%defattr (-, root, bin) | |
348 | -%dir %attr(0755, root, bin) /opt/jposug/php/7.1/lib | |
349 | -%dir %attr(0755, root, bin) /opt/jposug/php/7.1/lib/extensions | |
350 | -%dir %attr(0755, root, bin) /opt/jposug/php/7.1/lib/extensions/no-debug-non-zts-20180731 | |
351 | -%attr(0444, root, bin) /opt/jposug/php/7.1/lib/extensions/no-debug-non-zts-20180731/memcache.so | |
352 | -%dir %attr(0755, root, sys) %{_sysconfdir} | |
353 | -%{_sysconfdir}/php/7.1jposug/conf.d/* | |
354 | -%endif | |
355 | - | |
356 | -%if %{build72jposug} | |
357 | -%files 72jposug | |
358 | -%defattr (-, root, bin) | |
359 | -%dir %attr(0755, root, bin) /opt/jposug/php/7.2/lib | |
360 | -%dir %attr(0755, root, bin) /opt/jposug/php/7.2/lib/extensions | |
361 | -%dir %attr(0755, root, bin) /opt/jposug/php/7.2/lib/extensions/no-debug-non-zts-20180731 | |
362 | -%attr(0444, root, bin) /opt/jposug/php/7.2/lib/extensions/no-debug-non-zts-20180731/memcache.so | |
363 | -%dir %attr(0755, root, sys) %{_sysconfdir} | |
364 | -%{_sysconfdir}/php/7.2jposug/conf.d/* | |
365 | -%endif | |
366 | - | |
367 | -%if %{build73jposug} | |
368 | -%files 73jposug | |
369 | -%defattr (-, root, bin) | |
370 | -%dir %attr(0755, root, bin) /opt/jposug/php/7.3/lib | |
371 | -%dir %attr(0755, root, bin) /opt/jposug/php/7.3/lib/extensions | |
372 | -%dir %attr(0755, root, bin) /opt/jposug/php/7.3/lib/extensions/no-debug-non-zts-20180731 | |
373 | -%attr(0444, root, bin) /opt/jposug/php/7.3/lib/extensions/no-debug-non-zts-20180731/memcache.so | |
374 | -%dir %attr(0755, root, sys) %{_sysconfdir} | |
375 | -%{_sysconfdir}/php/7.3jposug/conf.d/* | |
376 | -%endif | |
377 | - | |
378 | 199 | %changelog |
200 | +* Sun Feb 03 2019 <me@tsundoku.ne.jp> | |
201 | +- build for PHP 5.x only (use memcached for 7.x) | |
202 | + zts_version*_53 and zts_version_55 are undefined but builds earlier than 5.6 are not anticipated | |
379 | 203 | * Sat Feb 02 2019 <me@tsundoku.ne.jp> |
380 | 204 | - finish initial spec |
381 | 205 | * Sun Jan 20 2019 <me@tsundoku.ne.jp> |