1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
|
%{!?__pecl: %{expand: %%global __pecl %{_bindir}/pecl}}
%global GIT d069e23
%global pecl_name runkit
Summary: Mangle with user defined functions and classes
Summary(ru): Манипулирование пользовательскими функциями и классами
Summary(pl): Obróbka zdefiniowanych przez użytkownika funkcji i klas
Name: php-pecl-%{pecl_name}
Version: 1.0.4
Release: 0.3%{?GIT:.git%{GIT}}%{?dist}.1
License: PHP
Group: Development/Libraries
#URL: http://pecl.php.net/package/runkit/
# New upstream URL - https://bugs.php.net/bug.php?id=61189
URL: https://github.com/zenovich/runkit
%if 0%{?GIT:1}
# https://github.com/zenovich/runkit/tarball/d069e230
Source0: zenovich-%{pecl_name}-%{GIT}.tar.gz
%else
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(id -u -n)
BuildRequires: php-pear
BuildRequires: php-devel
Requires(post): %{__pecl}
Requires(postun): %{__pecl}
Requires: php(zend-abi) = %{php_zend_api}
Requires: php(api) = %{php_core_api}
Provides: php-%{pecl_name} = %{version}
Provides: php-%{pecl_name}%{?_isa} = %{version}
Provides: php-pecl(%{pecl_name}) = %{version}
Provides: php-pecl(%{pecl_name})%{?_isa} = %{version}
# Other third party repo stuff
Obsoletes: php53-pecl-%{pecl_name}
Obsoletes: php53u-pecl-%{pecl_name}
%if "%{php_version}" > "5.4"
Obsoletes: php54-pecl-%{pecl_name}
%endif
%if "%{php_version}" > "5.4"
Obsoletes: php55-pecl-%{pecl_name}
%endif
# filter private shared
%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
%{?filter_setup}
%description
Replace, rename, and remove user defined functions and classes. Define
customized superglobal variables for general purpose use. Execute code
in restricted environment (sandboxing).
%description -l ru
Замещение, переименование и удаление оперделенных пользователем функций
и классов. Определение собственных суперглобальных переменных. Выполнение
кода в ограниченной среде (песочнице)
%description -l pl
Zastępowanie, zmiana nazwy lub usuwanie zdefiniowanych przez
użytkownika funkcji i klas. Definiowanie zmiennych superglobalnych do
ogólnego użytku. Wykonywanie danego kodu w ograniczonym środowisku
(sandbox).
%prep
%setup -q -c
mv zenovich-runkit-%{GIT} nts
%if 0%{?rhel} == 5
sed -e 's/-Werror//' -i nts/config.m4
%endif
cp -r nts zts
# Create the configuration file
cat <<'EOF' > %{pecl_name}.ini
; Enable %{pecl_name} extension module
extension=%{pecl_name}.so
EOF
%build
cd nts
%{_bindir}/phpize
%configure \
--with-%{pecl_name}\
--with-php-config=%{_bindir}/php-config
make %{?_smp_mflags}
cd ../zts
%{_bindir}/zts-phpize
%configure \
--with-%{pecl_name}\
--with-php-config=%{_bindir}/zts-php-config
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
make install -C nts install INSTALL_ROOT=%{buildroot}
make install -C zts install INSTALL_ROOT=%{buildroot}
# Drop in the bit of configuration
install -Dpm 644 %{pecl_name}.ini %{buildroot}%{php_inidir}/%{pecl_name}.ini
install -Dpm 644 %{pecl_name}.ini %{buildroot}%{php_ztsinidir}/%{pecl_name}.ini
# Install XML package description
install -Dpm 0664 nts/package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
%check
# Minimal load test
%{__php} --no-php-ini \
--define extension_dir=%{buildroot}%{php_extdir} \
--define extension=%{pecl_name}.so \
-m | grep %{pecl_name}
%{__ztsphp} --no-php-ini \
--define extension_dir=%{buildroot}%{php_ztsextdir} \
--define extension=%{pecl_name}.so \
-m | grep %{pecl_name}
# Provided test suite
cd nts
TEST_PHP_EXECUTABLE=%{__php} \
TEST_PHP_ARGS="-n -d extension_dir=%{buildroot}%{php_extdir} -d extension=%{pecl_name}.so" \
NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
%{_bindir}/php -n run-tests.php
cd ../zts
TEST_PHP_EXECUTABLE=%{__ztsphp} \
TEST_PHP_ARGS="-n -d extension_dir=%{buildroot}%{php_ztsextdir} -d extension=%{pecl_name}.so" \
NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
%{_bindir}/php -n run-tests.php
%post
%{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
%postun
if [ "$1" -eq "0" ]; then
%{pecl_uninstall} %{pecl_name} >/dev/null || :
fi
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc nts/{README,LICENSE}
%{pecl_xmldir}/%{name}.xml
%{php_extdir}/%{pecl_name}.so
%config(noreplace) %{php_inidir}/%{pecl_name}.ini
%{php_ztsextdir}/%{pecl_name}.so
%config(noreplace) %{php_ztsinidir}/%{pecl_name}.ini
%changelog
* Fri Dec 4 2012 Remi Collet <remi@fedoraproject.org> - 1.0.4-0.3.d069e23
- update to latest master snapshot
- also provides php-runkit
- run tests during build
- cleanups
* Wed Sep 12 2012 Remi Collet <remi@fedoraproject.org> - 1.0.4-0.2.gita079457
- standardize for remi repo, lot of cleanups
- add ZTS extension
- add %%check section: minimal load test
- update to latest master snapshot
* Mon Sep 3 2012 Pavel Alexeev <Pahan@Hubbitus.info> - 1.0.4-0.1.GIT8c73eaf
- New upstream url - https://bugs.php.net/bug.php?id=61189, continue developing, new version, switch to git SCM.
- Fix compilation error: https://github.com/zenovich/runkit/issues/26#issuecomment-8268795
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-16.CVS20090215
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-15.CVS20090215
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Aug 2 2011 Pavel Alexeev <Pahan@Hubbitus.info> - 0.9-14.CVS20090215
- Fix FBFS on Fedora 16(17 rawhide) and rpm 4.9 - bz#715709
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-13.CVS20090215
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Thu Jul 30 2009 Pavel Alexeev <Pahan@Hubbitus.info> - 0.9-12.CVS20090215
- Apply patches only on PHP>=5.3.0. (Bug: https://bugzilla.redhat.com/show_bug.cgi?id=513096 )
* Sun Apr 5 2009 Pavel Alexeev <Pahan@Hubbitus.info> - 0.9-11.CVS20090215
- By suggestion in the bug https://fedorahosted.org/fedora-infrastructure/ticket/1298 try remove version specifications in requires:
Turn BuildRequires: php-pear >= 1.4.7, php-devel >= 5.0.0 to just BuildRequires: php-pear, php-devel
- Add more magick in Release tag: 11%%{?CVS:.CVS%%{CVS}}%%{?dist}
* Tue Mar 17 2009 Pavel Alexeev <Pahan@Hubbitus.info> - 0.9-10.CVS20090215
- Remi Collet notes in Fedora review:
- Rename back %%{peclName}.xml to %%{name}.xml :)
- Set %%defattr(-,root,root,-) (was %%defattr(644,root,root,755))
- Make the %%post/%%postun scriptlets silent
* Mon Mar 9 2009 Pavel Alexeev <Pahan@Hubbitus.info> - 0.9-9.CVS20090215
- In rename %%{name}.xml to %%{peclName}.xml
- Add BR php-pear >= 1.4.7
* Wed Feb 25 2009 Pavel Alexeev <Pahan [ at ] Hubbitus [ DOT ] spb [ dOt.] su> - 0.9-8.CVS20090215
- All changes inspired by Fedora package review by Remi Collet.
- From summary deleted name.
- Readmy path fixed(replaced %%{peclName}-%%{version}/README to %%{peclName}/README)
- Group changed to Development/Libraries (was: Development/Languages/PHP)
- Removed Obsoletes: php-pear-%%{peclName} it was unnecessary.
* Mon Feb 23 2009 Pavel Alexeev <Pahan [ at ] Hubbitus [ DOT ] spb [ dOt.] su> - 0.9-7.CVS20090215
- Again change version enumeration (https://bugzilla.redhat.com/show_bug.cgi?id=455226#c9).
- %%{pecl_xmldir}/%%{peclName}2.xml changed to %%{pecl_xmldir}/%%{name}.xml
- Recode pl summary and description text from iso8859-2 to UTF-8.
* Sun Feb 15 2009 Pavel Alexeev <Pahan [ at ] Hubbitus [ DOT ] spb [ dOt.] su> - 0.9-0.6.CVS20090215
- Step to CVS build 20090215.
- Replace $RPM_BUILD_ROOT to %%{buildroot} to consistence usage.
- Strip some old comments.
- Add translated Summary(ru) and description.
- Remove legacy macros %%{?requires_php_extension}.
- All macroses %%peclName replaced to %{peclName} usages.
- Add file: %%{pecl_xmldir}/%%{peclName}2.xml
- All followed changes inspired by Fedora review by Remi Collet ( https://bugzilla.redhat.com/show_bug.cgi?id=455226 ).
- Change version enumeration, delete Hu-part.
- Modify Source0 for CVS build. Add comment about get it source.
- Spec-file renamed to php-pecl-runkit.spec.
- File BUG to upstream - http://pecl.php.net/bugs/bug.php?id=15969 .
- %%Post and %%postun scripts to restart apache removed.
- Register extension.
- Add PHP ABI provides/requires and Pre/post requires pecl.
- Defile some macroses from guidelines: php_apiver, __pecl, php_extdir.
- Replace %%extensionsdir by %%php_extdir.
* Mon May 12 2008 Pavel Alexeev <Pahan [ at ] Hubbitus [ DOT ] spb [ dOt.] su> - 0.9-0.CVS20080512.Hu.5
- Add Patch3: php-pecl-runkit-0.9.Z_NEW_REFCOUNT.patch to reflect new zend API
* Mon May 12 2008 Pavel Alexeev <Pahan [ at ] Hubbitus [ DOT ] spb [ dOt.] su> - 0.9-0.CVS20080512.Hu.3
- New CVS20080512 (cvs -d :pserver:cvsread@cvs.php.net/repository checkout pecl/runkit)
- Rename %%{_modname} to peclName to unify SPECs.
- Correct %%if 0%%{?CVS} to %%if 0%%{?CVS:1} - it is not integer!
- Rename pethces to:
Patch0: php-pecl-runkit-0.9-ZVAL_REFCOUNT.patch
Patch1: php-pecl-runkit-0.9-ZVAL_ADDREF.patch
* Mon Mar 10 2008 Pavel Alexeev <Pahan [ at ] Hubbitus [ DOT ] spb [ dOt.] su> - 0.9-0.CVS20080310.Hu.2
- CVS20080310 build. (cvs -d :pserver:cvsread@cvs.php.net:/repository checkout pecl/runkit)
- 0.9 stable are incompatible with php 5.3.0, build from CVS. Disable self patch0
- Enable patch0. Rewritten and rename to fix ZVAL_REFCOUNT.patch
Hu.1
- Add patch1. Fix wrong call ZVAL_ADDREF.patch
Hu.2
* Sun Mar 9 2008 Pavel Alexeev <Pahan [ at ] Hubbitus [ DOT ] info> - 0.9-0.Hu.3
- Add patch (self written) zval_ref.patch. It is allow build.
- Agjust built dir:
BuildRoot: %%{tmpdir}/%%{name}-%%{version}-root-%%(id -u -n)
to
BuildRoot: %%{_tmppath}/%%{name}-%%{version}-root-%%(id -u -n)
- Fix Release: 0%%{?dist}.Hu.2 -> Release: 0%%{?dist}.Hu.2
Hu.2
- Remove %%define _status beta and all apearance of %%{_status}
- Remove %%define _sysconfdir /etc/php (it's already defined in system wide)
- Remove Requires: %%{_sysconfdir}/conf.d
- Change path %%{_sysconfdir}/conf.d to %%{_sysconfdir}/php.d:
Replace:
install -d $RPM_BUILD_ROOT{%%{_sysconfdir}/conf.d,%%{extensionsdir}}
to
install -d $RPM_BUILD_ROOT{%%{_sysconfdir}/php.d,%%{extensionsdir}}
%%config(noreplace) %%verify(not md5 mtime size) %%{_sysconfdir}/conf.d/%%{_modname}.ini
to
%%config(noreplace) %%verify(not md5 mtime size) %%{_sysconfdir}/php.d/%%{_modname}.ini
cat <<'EOF' > $RPM_BUILD_ROOT%%{_sysconfdir}/conf.d/%%{_modname}.ini
to
cat <<'EOF' > $RPM_BUILD_ROOT%%{_sysconfdir}/php.d/%%{_modname}.ini
- Hu.3
* Wed Feb 27 2008 Pavel Alexeev <Pahan [ at ] Hubbitus [ DOT ] info> - 0.9-0.Hu.0
- Import from ftp://ftp.pld-linux.org/dists/2.0/PLD/SRPMS/SRPMS/php-pecl-runkit-0.4-5.src.rpm
- Step to version 0.9
Release: 0{?dist}.Hu.0 (Was: Release: 0)
- Remove defining %%date and:
* %%{date} PLD Team <feedback@pld-linux.org>
All persons listed below can be reached at <cvs_login>@pld-linux.org
due to error: ошибка: %%changelog не в нисходящем хронологическом порядке
- Small reformat of header spec
- Change BuildRequires: php-devel >= 3:5.0.0 to php-devel >= 5.0.0
-Remove BuildRequires: rpmbuild(macros) >= 1.254
|