• R/O
  • SSH

contrib-spec-files: Commit

日本OpenSolaris Users Group有志による、レポジトリサーバ作成のためのspecファイル群です。


Commit MetaInfo

Revision96d1353dc52bc0d281dce0bee9691207fc486ae7 (tree)
Time2019-02-04 05:26:58
Authortsundoku <me@tsun...>
Commitertsundoku

Log Message

SFEphp-memcache: spec cleanup (do not try to build for PHP 7.x)

Change Summary

Incremental Difference

diff -r 545f92cc1a5e -r 96d1353dc52b specs/SFEphp-memcache.spec
--- a/specs/SFEphp-memcache.spec Sun Feb 03 06:34:28 2019 +0900
+++ b/specs/SFEphp-memcache.spec Mon Feb 04 05:26:58 2019 +0900
@@ -4,12 +4,6 @@
44 %define build53 %( test -x /usr/php/5.3/bin/php && echo 1 || echo 0)
55 %define build55 %( test -x /usr/php/5.5/bin/php && echo 1 || echo 0)
66 %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)
137
148 %define tarball_name memcache
159
@@ -49,6 +43,7 @@
4943 IPS_package_name: web/php/extension/php-memcache-56
5044 BuildRequires: web/php-56 = *
5145 Requires: web/php-56 = *
46+%define zts_version_56 20131226
5247
5348 %package 56-old
5449 IPS_package_name: web/php-56/extension/php-memcache
@@ -59,48 +54,6 @@
5954 Renamed_To: web/php/extension/php-memcache-56 = *
6055 %endif
6156
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-
10457 %prep
10558
10659 cd %{_builddir}
@@ -129,37 +82,13 @@
12982 %if %{build56}
13083 setup_for 5.6
13184 %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
15085
15186 %build
15287
15388 build_for() {
15489 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
16392
16493 ${php_bindir}/phpize
16594 ./configure \
@@ -200,24 +129,6 @@
200129 %if %{build56}
201130 build_for 5.6
202131 %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
221132
222133 %install
223134
@@ -225,47 +136,23 @@
225136
226137 install_for() {
227138 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}
236141
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}/
239144 mkdir -p /etc/php/${php_ver}/conf.d
240145 cp %{SOURCE1} $RPM_BUILD_ROOT/etc/php/${php_ver}/conf.d/%{tarball_name}.ini
241146 }
242147
243148 %if %{build53}
244-install_for 5.3
149+install_for 5.3 %{zts_version_53}
245150 %endif
246151 %if %{build55}
247-install_for 5.5
152+install_for 5.5 %{zts_version_55}
248153 %endif
249154 %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}
269156 %endif
270157
271158 %{?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 @@
281168 %defattr (-, root, bin)
282169 %dir %attr(0755, root, bin) %{_prefix}/php/5.3/lib
283170 %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
286173 %dir %attr(0755, root, sys) %{_sysconfdir}
287174 %{_sysconfdir}/php/5.3/conf.d/*
288175 %endif
@@ -292,8 +179,8 @@
292179 %defattr (-, root, bin)
293180 %dir %attr(0755, root, bin) %{_prefix}/php/5.5/lib
294181 %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
297184 %dir %attr(0755, root, sys) %{_sysconfdir}
298185 %{_sysconfdir}/php/5.5/conf.d/*
299186 %endif
@@ -303,79 +190,16 @@
303190 %defattr (-, root, bin)
304191 %dir %attr(0755, root, bin) %{_prefix}/php/5.6/lib
305192 %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
308195 %dir %attr(0755, root, sys) %{_sysconfdir}
309196 %{_sysconfdir}/php/5.6/conf.d/*
310197 %endif
311198
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-
378199 %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
379203 * Sat Feb 02 2019 <me@tsundoku.ne.jp>
380204 - finish initial spec
381205 * Sun Jan 20 2019 <me@tsundoku.ne.jp>
Show on old repository browser