Logoj0ke.net Open Build Service > Projects > internetx:php5:EL5:5.3.26:extensions > php-pear > php-pear.spec
Sign Up | Log In

File php-pear.spec of Package php-pear

 
1
2
%global peardir %{_datadir}/pear
3
4
%global xmlrpcver 1.5.2
5
%global getoptver 1.2.3
6
%global arctarver 1.3.3
7
%global structver 1.0.2
8
%global xmlutil   1.2.1
9
10
Summary: PHP Extension and Application Repository framework
11
Name: php-pear
12
Version: 1.9.0
13
Release: 1%{?dist}
14
Epoch: 1
15
License: PHP
16
Group: Development/Languages
17
URL: http://pear.php.net/package/PEAR
18
Source0: http://download.pear.php.net/package/PEAR-%{version}.tgz
19
# wget http://cvs.php.net/viewvc.cgi/pear-core/install-pear.php?revision=1.39 -O install-pear.php
20
Source1: install-pear.php
21
Source2: relocate.php
22
Source3: strip.php
23
Source4: LICENSE
24
Source10: pear.sh
25
Source11: pecl.sh
26
Source12: peardev.sh
27
Source13: macros.pear
28
Source20: http://pear.php.net/get/XML_RPC-%{xmlrpcver}.tgz
29
Source21: http://pear.php.net/get/Archive_Tar-%{arctarver}.tgz
30
Source22: http://pear.php.net/get/Console_Getopt-%{getoptver}.tgz
31
Source23: http://pear.php.net/get/Structures_Graph-%{structver}.tgz
32
Source24: http://pear.php.net/get/XML_Util-%{xmlutil}.tgz
33
34
BuildArch: noarch
35
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
36
BuildRequires: php-cli >= 5.1.0-1, php-xml, gnupg
37
Provides: php-pear(Console_Getopt) = %{getoptver}
38
Provides: php-pear(Archive_Tar) = %{arctarver}
39
Provides: php-pear(PEAR) = %{version}
40
Provides: php-pear(Structures_Graph) = %{structver}
41
Provides: php-pear(XML_RPC) = %{xmlrpcver}
42
Provides: php-pear(XML_Util) = %{xmlutil}
43
Obsoletes: php-pear-XML-Util <= %{xmlutil}
44
Provides:  php-pear-XML-Util = %{xmlutil}-%{release}
45
Requires: php-cli >= 5.1.0-1
46
47
%description
48
PEAR is a framework and distribution system for reusable PHP
49
components.  This package contains the basic PEAR components.
50
51
%prep
52
%setup -cT
53
54
# Create a usable PEAR directory (used by install-pear.php)
55
for archive in %{SOURCE0} %{SOURCE21} %{SOURCE22} %{SOURCE23} %{SOURCE24}
56
do
57
    tar xzf  $archive --strip-components 1 || tar xzf  $archive --strip-path 1
58
done
59
tar xzf %{SOURCE24} package.xml
60
mv package.xml XML_Util.xml
61
62
# apply patches on used PEAR during install
63
# -- no patch
64
65
%build
66
# This is an empty build section.
67
68
%install
69
rm -rf $RPM_BUILD_ROOT
70
71
export PHP_PEAR_SYSCONF_DIR=%{_sysconfdir}
72
export PHP_PEAR_SIG_KEYDIR=%{_sysconfdir}/pearkeys
73
export PHP_PEAR_SIG_BIN=%{_bindir}/gpg
74
export PHP_PEAR_INSTALL_DIR=%{peardir}
75
76
# 1.4.11 tries to write to the cache directory during installation
77
# so it's not possible to set a sane default via the environment.
78
# The ${PWD} bit will be stripped via relocate.php later.
79
export PHP_PEAR_CACHE_DIR=${PWD}%{_localstatedir}/cache/php-pear
80
export PHP_PEAR_TEMP_DIR=/var/tmp
81
82
install -d $RPM_BUILD_ROOT%{peardir} \
83
           $RPM_BUILD_ROOT%{_localstatedir}/cache/php-pear \
84
           $RPM_BUILD_ROOT%{_localstatedir}/www/html \
85
           $RPM_BUILD_ROOT%{peardir}/.pkgxml \
86
           $RPM_BUILD_ROOT%{_sysconfdir}/rpm \
87
           $RPM_BUILD_ROOT%{_sysconfdir}/pear
88
89
export INSTALL_ROOT=$RPM_BUILD_ROOT
90
91
%{_bindir}/php -n -dmemory_limit=32M -dshort_open_tag=0 -dsafe_mode=0 \
92
         -derror_reporting=E_ALL -ddetect_unicode=0 \
93
      %{SOURCE1} -d %{peardir} \
94
                 -c %{_sysconfdir}/pear \
95
                 -b %{_bindir} \
96
                 -w %{_localstatedir}/www/html \
97
                 %{SOURCE0} %{SOURCE21} %{SOURCE22} %{SOURCE23} %{SOURCE24} %{SOURCE20}
98
99
# Replace /usr/bin/* with simple scripts:
100
install -m 755 %{SOURCE10} $RPM_BUILD_ROOT%{_bindir}/pear
101
install -m 755 %{SOURCE11} $RPM_BUILD_ROOT%{_bindir}/pecl
102
install -m 755 %{SOURCE12} $RPM_BUILD_ROOT%{_bindir}/peardev
103
104
# Sanitize the pear.conf
105
%{_bindir}/php -n %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/pear.conf $RPM_BUILD_ROOT | 
106
  %{_bindir}/php -n %{SOURCE2} php://stdin $PWD > new-pear.conf
107
%{_bindir}/php -n %{SOURCE3} new-pear.conf ext_dir |
108
  %{_bindir}/php -n %{SOURCE3} php://stdin http_proxy > $RPM_BUILD_ROOT%{_sysconfdir}/pear.conf
109
110
%{_bindir}/php -r "print_r(unserialize(substr(file_get_contents('$RPM_BUILD_ROOT%{_sysconfdir}/pear.conf'),17)));"
111
112
install -m 644 -c %{SOURCE4} LICENSE
113
114
install -m 644 -c %{SOURCE13} \
115
           $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.pear     
116
117
# apply patches on installed PEAR tree
118
pushd $RPM_BUILD_ROOT%{peardir} 
119
# -- no patch
120
popd
121
122
# Why this file here ?
123
rm -rf $RPM_BUILD_ROOT/.depdb* $RPM_BUILD_ROOT/.lock $RPM_BUILD_ROOT/.channels $RPM_BUILD_ROOT/.filemap
124
125
# Need for re-registrying XML_Util
126
install -m 644 XML_Util.xml $RPM_BUILD_ROOT%{peardir}/.pkgxml/
127
128
129
%check
130
# Check that no bogus paths are left in the configuration, or in
131
# the generated registry files.
132
grep $RPM_BUILD_ROOT $RPM_BUILD_ROOT%{_sysconfdir}/pear.conf && exit 1
133
grep %{_libdir} $RPM_BUILD_ROOT%{_sysconfdir}/pear.conf && exit 1
134
grep '"/tmp"' $RPM_BUILD_ROOT%{_sysconfdir}/pear.conf && exit 1
135
grep /usr/local $RPM_BUILD_ROOT%{_sysconfdir}/pear.conf && exit 1
136
grep -rl $RPM_BUILD_ROOT $RPM_BUILD_ROOT && exit 1
137
138
139
%clean
140
rm -rf $RPM_BUILD_ROOT
141
rm new-pear.conf
142
143
144
%triggerpostun -- php-pear-XML-Util
145
# re-register extension unregistered during postun of obsoleted php-pear-XML-Util
146
%{_bindir}/pear install --nodeps --soft --force --register-only %{pear_xmldir}/XML_Util.xml >/dev/null || :
147
148
149
%files
150
%defattr(-,root,root,-)
151
%{peardir}
152
%{_bindir}/*
153
%config(noreplace) %{_sysconfdir}/pear.conf
154
%config %{_sysconfdir}/rpm/macros.pear
155
%dir %{_localstatedir}/cache/php-pear
156
%dir %{_localstatedir}/www/html
157
%dir %{_sysconfdir}/pear
158
%doc LICENSE README
159
160
161
%changelog
162
* Sat Sep 05 2009 Remi Collet <Fedora@FamilleCollet.com> 1:1.9.0-1
163
- update to PEAR 1.9.0, XML_RPC 1.5.2
164
165
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.8.1-2
166
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
167
168
* Sat May 30 2009 Remi Collet <Fedora@FamilleCollet.com> 1:1.8.1-1
169
- update to 1.8.1
170
- Update install-pear.php script (1.39)
171
- add XML_Util
172
173
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.7.2-3
174
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
175
176
* Sun May 18 2008 Remi Collet <Fedora@FamilleCollet.com> 1:1.7.2-2
177
- revert to install-pear.php script 1.31 (for cfg_dir)
178
179
* Sun May 18 2008 Remi Collet <Fedora@FamilleCollet.com> 1:1.7.2-1
180
- update to 1.7.2
181
- Update install-pear.php script (1.32)
182
183
* Tue Mar 11 2008 Tim Jackson <rpm@timj.co.uk> 1:1.7.1-2
184
- Set cfg_dir to be %%{_sysconfdir}/pear (and own it)
185
- Update install-pear.php script
186
- Add %%pear_cfgdir and %%pear_wwwdir macros
187
188
* Sun Feb  3 2008 Remi Collet <Fedora@FamilleCollet.com> 1:1.7.1-1
189
- update to 1.7.1
190
191
* Fri Feb  1 2008 Remi Collet <Fedora@FamilleCollet.com> 1:1.7.0-1
192
- update to 1.7.0
193
194
* Thu Oct  4 2007 Joe Orton <jorton@redhat.com> 1:1.6.2-2
195
- require php-cli not php
196
197
* Sun Sep  9 2007 Remi Collet <Fedora@FamilleCollet.com> 1:1.6.2-1
198
- update to 1.6.2
199
- remove patches merged upstream
200
- Fix : "pear install" hangs on non default channel (#283401)
201
202
* Tue Aug 21 2007 Joe Orton <jorton@redhat.com> 1:1.6.1-2
203
- fix License
204
205
* Thu Jul 19 2007 Remi Collet <Fedora@FamilleCollet.com> 1:1.6.1-1
206
- update to PEAR-1.6.1 and Console_Getopt-1.2.3
207
208
* Thu Jul 19 2007 Remi Collet <Fedora@FamilleCollet.com> 1:1.5.4-5
209
- new SPEC using install-pear.php instead of install-pear-nozlib-1.5.4.phar
210
211
* Mon Jul 16 2007 Remi Collet <Fedora@FamilleCollet.com> 1:1.5.4-4
212
- update macros.pear (without define)
213
214
* Mon Jul 16 2007 Joe Orton <jorton@redhat.com> 1:1.5.4-3
215
- add pecl_{un,}install macros to macros.pear (from Remi)
216
217
* Fri May 11 2007 Joe Orton <jorton@redhat.com> 1:1.5.4-2
218
- update to 1.5.4
219
220
* Tue Mar  6 2007 Joe Orton <jorton@redhat.com> 1:1.5.0-3
221
- add redundant build section (#226295)
222
- BR php-cli not php (#226295)
223
224
* Mon Feb 19 2007 Joe Orton <jorton@redhat.com> 1:1.5.0-2
225
- update builtin module provides (Remi Collet, #226295)
226
- drop patch 0
227
228
* Thu Feb 15 2007 Joe Orton <jorton@redhat.com> 1:1.5.0-1
229
- update to 1.5.0
230
231
* Mon Feb  5 2007 Joe Orton <jorton@redhat.com> 1:1.4.11-4
232
- fix Group, mark pear.conf noreplace (#226295)
233
234
* Mon Feb  5 2007 Joe Orton <jorton@redhat.com> 1:1.4.11-3
235
- use BuildArch not BuildArchitectures (#226925)
236
- fix to use preferred BuildRoot (#226925)
237
- strip more buildroot-relative paths from *.reg
238
- force correct gpg path in default pear.conf
239
240
* Thu Jan  4 2007 Joe Orton <jorton@redhat.com> 1:1.4.11-2
241
- update to 1.4.11
242
243
* Fri Jul 14 2006 Joe Orton <jorton@redhat.com> 1:1.4.9-4
244
- update to XML_RPC-1.5.0
245
- really package macros.pear
246
247
* Thu Jul 13 2006 Joe Orton <jorton@redhat.com> 1:1.4.9-3
248
- require php-cli
249
- add /etc/rpm/macros.pear (Christopher Stone)
250
251
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1:1.4.9-2.1
252
- rebuild
253
254
* Mon May  8 2006 Joe Orton <jorton@redhat.com> 1:1.4.9-2
255
- update to 1.4.9 (thanks to Remi Collet, #183359)
256
- package /usr/share/pear/.pkgxml (#190252)
257
- update to XML_RPC-1.4.8
258
- bundle the v3.0 LICENSE file
259
260
* Tue Feb 28 2006 Joe Orton <jorton@redhat.com> 1:1.4.6-2
261
- set cache_dir directory, own /var/cache/php-pear
262
263
* Mon Jan 30 2006 Joe Orton <jorton@redhat.com> 1:1.4.6-1
264
- update to 1.4.6
265
- require php >= 5.1.0 (#178821)
266
267
* Fri Dec 30 2005 Tim Jackson <tim@timj.co.uk> 1:1.4.5-6
268
- Patches to fix "pear makerpm"
269
270
* Wed Dec 14 2005 Joe Orton <jorton@redhat.com> 1:1.4.5-5
271
- set default sig_keydir to /etc/pearkeys
272
- remove ext_dir setting from /etc/pear.conf (#175673)
273
274
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
275
- rebuilt
276
277
* Tue Dec  6 2005 Joe Orton <jorton@redhat.com> 1:1.4.5-4
278
- fix virtual provide for PEAR package (#175074)
279
280
* Sun Dec  4 2005 Joe Orton <jorton@redhat.com> 1:1.4.5-3
281
- fix /usr/bin/{pecl,peardev} (#174882)
282
283
* Thu Dec  1 2005 Joe Orton <jorton@redhat.com> 1:1.4.5-2
284
- add virtual provides (#173806) 
285
286
* Wed Nov 23 2005 Joe Orton <jorton@redhat.com> 1.4.5-1
287
- initial build (Epoch: 1 to allow upgrade from php-pear-5.x)
288