This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathphp74-pecl-yaml.spec
272 lines (199 loc) · 9.06 KB
/
php74-pecl-yaml.spec
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
# we don't want -z defs linker flag
%undefine _strict_symbol_defs_build
%global pecl_name yaml
%global ini_name 40-%{pecl_name}.ini
%global php php74
Name: %{php}-pecl-yaml
Version: 2.2.2
Release: 1%{?dist}
Summary: Support for YAML 1.1 serialization using the LibYAML library
License: MIT
URL: https://pecl.php.net/package/yaml
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
BuildRequires: %{php}-devel
# build require pear1's dependencies to avoid mismatched php stacks
BuildRequires: pear1 %{php}-cli %{php}-common %{php}-xml
BuildRequires: libyaml-devel
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}
# safe replacement
Provides: php-pecl-%{pecl_name} = %{version}-%{release}
Provides: php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
Conflicts: php-pecl-%{pecl_name} < %{version}-%{release}
%description
The YAML PHP Extension provides a wrapper to the LibYAML library. It gives the
user the ability to parse YAML document streams into PHP constructs and emit PHP
constructs as valid YAML 1.1 documents.
%prep
%setup -q -c
# Remove test file to avoid regsitration (pecl list-files yaml)
sed -e 's/role="test"/role="src"/' \
-e '/LICENSE/s/role="doc"/role="src"/' \
package.xml >%{pecl_name}-%{version}%{?prever}/package.xml
cd %{pecl_name}-%{version}%{?prever}
%build
cd %{pecl_name}-%{version}%{?prever}
phpize
%configure
make %{?_smp_mflags}
%check
cd %{pecl_name}-%{version}%{?prever}
make test NO_INTERACTION=1 REPORT_EXIT_STATUS=1
%install
cd %{pecl_name}-%{version}%{?prever}
make install INSTALL_ROOT=%{buildroot}
# Basic configuration
mkdir -p %{buildroot}%{php_inidir}
cat > %{buildroot}%{php_inidir}/%{ini_name} << 'EOF'
; Enable %{pecl_name} extension module
extension=%{pecl_name}.so
; %{pecl_name} extension configuration
; see http://www.php.net/manual/en/yaml.configuration.php
; Decode entities which have the explicit tag "tag:yaml.org,2002:binary"
yaml.decode_binary = 0
; Controls the decoding of "tag:yaml.org,2002:timestamp"
; 0 will not apply any decoding.
; 1 will use strtotime().
; 2 will use date_create().
yaml.decode_timestamp = 0
; Cause canonical form output.
yaml.output_canonical = 0
; Number of spaces to indent sections. Value should be between 1 and 10.
yaml.output_indent = 2
; Set the preferred line width. -1 means unlimited.
yaml.output_width = 80
; Enable/disable serialized php object processing.
yaml.decode_php = 0
EOF
# Package info
mkdir -p %{buildroot}%{pecl_xmldir}
install -p -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{pecl_name}.xml
# Documentation
for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
%triggerin -- pear1
if [ -x %{__pecl} ]; then
%{pecl_install} %{pecl_xmldir}/%{pecl_name}.xml >/dev/null || :
fi
%posttrans
if [ -x %{__pecl} ]; then
%{pecl_install} %{pecl_xmldir}/%{pecl_name}.xml >/dev/null || :
fi
%postun
if [ $1 -eq 0 -a -x %{__pecl} ]; then
%{pecl_uninstall} %{pecl_name} >/dev/null || :
fi
%files
%license %{pecl_name}-%{version}%{?prever}/LICENSE
%doc %{pecl_docdir}/%{pecl_name}
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
%{pecl_xmldir}/%{pecl_name}.xml
%changelog
* Fri Sep 30 2022 Carl George <[email protected]> - 2.2.2-1
- Update to 2.2.2
* Wed Jul 29 2020 Carl George <[email protected]> - 2.1.0-3
- Port from Fedora to IUS
* Tue Jul 28 2020 Fedora Release Engineering <[email protected]> - 2.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Apr 23 2020 Remi Collet <[email protected]> - 2.1.0-1
- update to 2.1.0
- raise dependency on PHP 7.1
- fix 32-bit build using patch from
https://github.com/php/pecl-file_formats-yaml/pull/45
* Thu Jan 30 2020 Fedora Release Engineering <[email protected]> - 2.0.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Oct 03 2019 Remi Collet <[email protected]> - 2.0.4-4
- rebuild for https://fedoraproject.org/wiki/Changes/php74
* Fri Jul 26 2019 Fedora Release Engineering <[email protected]> - 2.0.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sat Feb 02 2019 Fedora Release Engineering <[email protected]> - 2.0.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Nov 26 2018 Remi Collet <[email protected]> - 2.0.4-1
- update to 2.0.4
* Tue Nov 13 2018 Remi Collet <[email protected]> - 2.0.3-1
- update to 2.0.3
- drop patch merged upstream
* Thu Oct 11 2018 Remi Collet <[email protected]> - 2.0.2-5
- Rebuild for https://fedoraproject.org/wiki/Changes/php73
- add better patch for PHP 7.3 from
https://github.com/php/pecl-file_formats-yaml/pull/33
* Fri Jul 13 2018 Fedora Release Engineering <[email protected]> - 2.0.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri Feb 09 2018 Fedora Release Engineering <[email protected]> - 2.0.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Fri Jan 26 2018 Remi Collet <[email protected]> - 2.0.2-2
- undefine _strict_symbol_defs_build
* Tue Oct 3 2017 Remi Collet <[email protected]> - 2.0.2-1
- update to 2.0.2
* Thu Aug 03 2017 Fedora Release Engineering <[email protected]> - 2.0.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <[email protected]> - 2.0.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Wed Mar 29 2017 Remi Collet <[email protected]> - 2.0.0-3
- add upstream patch to fix FTBFS with 7.1.4RC1, reported by Koschei
* Sat Feb 11 2017 Fedora Release Engineering <[email protected]> - 2.0.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Nov 14 2016 Remi Collet <[email protected]> - 2.0.0-1
- upate to 2.0.0
- fix project URL
* Mon Jun 27 2016 Remi Collet <[email protected]> - 2.0.0-0.1.RC8
- upate to 2.0.0RC8
- rebuild for https://fedoraproject.org/wiki/Changes/php70
- fix license installation
* Thu Mar 10 2016 Remi Collet <[email protected]> - 1.2.0-2
- enable test suite for Koschei
- drop 1 known to fail test
* Tue Mar 08 2016 Theodore Lee <[email protected]> - 1.2.0-1
- Update to upstream 1.2.0 release
- Disable test suite until datetime handling is fixed
* Thu Feb 04 2016 Fedora Release Engineering <[email protected]> - 1.1.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Jun 18 2015 Fedora Release Engineering <[email protected]> - 1.1.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Fri Aug 29 2014 Remi Collet <[email protected]> - 1.1.1-5
- provides php-yaml
- install doc in pecl_docdir
- cleanup
* Sun Aug 17 2014 Fedora Release Engineering <[email protected]> - 1.1.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Thu Jun 19 2014 Remi Collet <[email protected]> - 1.1.1-3
- rebuild for https://fedoraproject.org/wiki/Changes/Php56
- add numerical prefix to extension configuration file
* Sat Jun 07 2014 Fedora Release Engineering <[email protected]> - 1.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Wed Nov 20 2013 Theodore Lee <[email protected]> - 1.1.1-1
- Update to upstream 1.1.1 release
* Sun Aug 04 2013 Fedora Release Engineering <[email protected]> - 1.1.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Fri Mar 22 2013 Remi Collet <[email protected]> - 1.1.0-4
- rebuild for http://fedoraproject.org/wiki/Features/Php55
* Thu Feb 14 2013 Fedora Release Engineering <[email protected]> - 1.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sat Jul 21 2012 Fedora Release Engineering <[email protected]> - 1.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Apr 20 2012 Theodore Lee <[email protected]> - 1.1.0-1
- Update to upstream 1.1.0 release
- Drop upstreamed cflags patch
* Thu Jan 19 2012 Remi Collet <[email protected]> - 1.0.1-6
- build against php 5.4
- fix filters
* Sat Jan 14 2012 Fedora Release Engineering <[email protected]> - 1.0.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Fri May 13 2011 Theodore Lee <[email protected]> - 1.0.1-4
- Fix commenting in module configuration
* Thu May 12 2011 Theodore Lee <[email protected]> - 1.0.1-3
- Remove unused php_apiver macro
- Specify version in php-devel requires
- Note upstream report for CFLAGS patch
- Add check section
- Document options in default config file
* Wed May 04 2011 Theodore Lee <[email protected]> - 1.0.1-2
- Update patch to preserve original compiler flags
* Tue May 03 2011 Theodore Lee <[email protected]> - 1.0.1-1
- Initial package