]> git.pld-linux.org Git - packages/php-pear.git/blame - php-pear.spec
- added bootstrap bcond
[packages/php-pear.git] / php-pear.spec
CommitLineData
1c3b25a3
JB
1#
2# Conditional build:
3%bcond_with bootstrap # bootstrap build without PEAR installed (for first php-pear-PEAR installation)
4
25de18da 5Summary: PEAR - PHP Extension and Application Repository
76e800da 6Summary(pl.UTF-8): PEAR - rozszerzenie PHP i repozytorium aplikacji
25de18da 7Name: php-pear
01f97755 8Version: 1.4
eedd2fcc 9Release: 2
25de18da
ER
10Epoch: 4
11License: Public Domain
12Group: Development/Languages/PHP
3e35a10f 13Source0: php-channel-prov.php
6d85ce34 14Source100: update-channels.sh
799471e8
ER
15Source1: channel-phing.xml
16Source2: channel-phpdb.xml
fcc14391 17Source3: channel-firephp.xml
cdfa5e00 18Source4: channel-symfony.xml
3e35a10f
ER
19Source5: channel-phpunit.xml
20Source6: channel-phpseclib.xml
1275fa38 21Source7: channel-horde.xml
cdfa5e00 22Source8: channel-rc.xml
d9ff93b5 23Source9: channel-ezc.xml
4c5242d9 24Source10: channel-propel.xml
a9af1509 25Source11: channel-docblox.xml
d92a3b44 26Source12: channel-michelf.xml
f84845e8
ER
27Source13: channel-phpmd.xml
28Source14: channel-pdepend.xml
5f88c87c 29Source15: channel-symfony2.xml
d1682f5e 30Source16: channel-saucelabs.xml
73b1fcbc 31Source17: channel-twig.xml
3ba22036 32Source18: channel-zz.xml
7a1a8238 33Source19: channel-theseer.xml
7e5dea50 34Source20: channel-indeyets.xml
237c2312 35Source21: channel-phpdoc.xml
902a69a3 36Source22: channel-bartlett.xml
1c3b25a3 37%if %{without bootstrap}
924f9510 38BuildRequires: /usr/bin/php
3d75bfd5 39BuildRequires: php-pear-PEAR >= 1:1.9.0
1c3b25a3 40%endif
c827a14e 41BuildRequires: rpmbuild(macros) >= 1.570
eedd2fcc 42Requires: php-dirs >= 1.6-1
25de18da 43Obsoletes: php-pear-additional_classes
109b2b0a 44Obsoletes: php4-pear
448d9ae1 45Conflicts: php-pear-PEAR < 1:1.7.2-10
25de18da
ER
46BuildArch: noarch
47BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
c6fd9bb8 49%define __reg_provides %{__php} %{SOURCE0}
924f9510 50
57d254d6 51# find channel provides
924f9510
ER
52%define _use_internal_dependency_generator 0
53%define __find_provides %{__reg_provides}
54%define __find_requires %{nil}
55
57d254d6
ER
56# avoid rpm 4.4.9 adding rm -rf buildroot, we need the dirs to check consistency
57%define __spec_clean_body %{nil}
58
25de18da
ER
59%description
60PEAR - PHP Extension and Application Repository.
61
62Please note that this package provides only basic directory structure.
63If you want to use base PEAR classes (PEAR.php, PEAR/*.php), that come
64with PHP, please install appropriate php-pear-* (php-pear-PEAR,
3d43731c 65php-pear-Archive_Tar, etc) packages.
25de18da 66
84a3ead2 67%description -l pl.UTF-8
25de18da
ER
68PEAR (PHP Extension and Application Repository) - rozszerzenie PHP i
69repozytorium aplikacji.
70
84a3ead2
JR
71Należy pamiętać, że ten pakiet dostarcza tylko podstawową strukturę
72katalogów. Aby użyć podstawowych klas PEAR (PEAR.php PEAR/*.php),
73dostarczanych z PHP, należy zainstalować odpowiednie pakiety
25de18da
ER
74php-pear-* (php-pear-PEAR, php-pear-Archive_Tar, itp).
75
76%prep
367add8f 77%setup -qcT
25de18da 78
1d546840
ER
79%build
80rm -rf pear
81install -d pear
e47124f8 82
1c3b25a3 83%if %{without bootstrap}
367add8f 84# add extra channels
1d546840 85%{__pear} -c pearrc config-set php_dir pear
8bbf817c
ER
86for xml in $(awk '/^Source[0-9]+:.+channel-.+.xml$/ {print $NF}' %{_specdir}/%{name}.spec); do
87 %{__pear} -c pearrc channel-add %{_sourcedir}/$xml
88done
1c3b25a3 89%endif
367add8f 90
1d546840 91%install
1c3b25a3
JB
92install -d $RPM_BUILD_ROOT%{php_pear_dir}/{.channels/.alias,.registry,bin,data,tests}
93%if %{without bootstrap}
1d546840 94cp -a pear/.??* $RPM_BUILD_ROOT%{php_pear_dir}
1c3b25a3
JB
95%else
96touch $RPM_BUILD_ROOT%{php_pear_dir}/{.depdblock,.depdb,.filemap,.lock}
97%endif
1d546840 98
e47124f8
ER
99while read dir; do
100 install -d $RPM_BUILD_ROOT$dir
101done <<EOF
e47124f8 102%{php_pear_dir}/Archive
8b36818a 103%{php_pear_dir}/Auth
7051e1d1 104%{php_pear_dir}/Cache
e47124f8 105%{php_pear_dir}/Console
d135aaea 106%{php_pear_dir}/Contact
7051e1d1 107%{php_pear_dir}/Crypt
b67f38ff 108%{php_pear_dir}/Event
6a776838 109%{php_pear_dir}/File
7fe1ecf4 110%{php_pear_dir}/Genealogy
8b36818a 111%{php_pear_dir}/Gtk
baff6ba1 112%{php_pear_dir}/Gtk2
e47124f8 113%{php_pear_dir}/HTML
a64748d8 114%{php_pear_dir}/HTML/QuickForm
3314c2d4
ER
115%{php_pear_dir}/HTML/Table
116%{php_pear_dir}/HTML/Template
e47124f8 117%{php_pear_dir}/HTTP
21dc0ab4
ER
118%{php_pear_dir}/HTTP/WebDAV
119%{php_pear_dir}/HTTP/WebDAV/Tools
39946e2d 120%{php_pear_dir}/Horde
66057c98 121%{php_pear_dir}/Horde/Stream
39946e2d
ER
122%{php_pear_dir}/Horde/Text
123%{php_pear_dir}/Horde/Xml
f7198b38 124%{php_pear_dir}/I18N
e47124f8 125%{php_pear_dir}/Image
6c23b1d5 126%{php_pear_dir}/MP3
f15f8dfb 127%{php_pear_dir}/Mail
3314c2d4 128%{php_pear_dir}/Math
e47124f8 129%{php_pear_dir}/Net
c827a14e 130%{php_pear_dir}/Net/UserAgent
e47124f8 131%{php_pear_dir}/Numbers
d135aaea 132%{php_pear_dir}/PHP
3314c2d4 133%{php_pear_dir}/Payment
698a23ed 134%{php_pear_dir}/QA
e47124f8 135%{php_pear_dir}/Science
0ac4465c 136%{php_pear_dir}/SebastianBergmann
e47124f8 137%{php_pear_dir}/Services
d7c960b2 138%{php_pear_dir}/Structures
ee179261 139%{php_pear_dir}/Symfony
1f9bdd5d 140%{php_pear_dir}/Symfony/Bridge
ee179261 141%{php_pear_dir}/Symfony/Component
dff95dc3 142%{php_pear_dir}/Testing
e47124f8 143%{php_pear_dir}/Text
f0386318 144%{php_pear_dir}/Text/CAPTCHA
fb984fdb 145%{php_pear_dir}/Text/Spell
3438e6b2 146%{php_pear_dir}/URI
c8e9976e
AG
147%{php_pear_dir}/Validate
148%{php_pear_dir}/Validate/Finance
698a23ed
AG
149%{php_pear_dir}/VersionControl
150%{php_pear_dir}/XML
e47124f8 151EOF
54b72825 152
08a1e49d 153%clean
57d254d6 154check_channel_dirs() {
1d546840
ER
155 local RPMFILE=%{name}-%{version}-%{release}.%{_target_cpu}.rpm
156 local installed=$(mktemp -t instXXXXXX.tmp)
157 local rpmfiles=$(mktemp -t rpmXXXXXX.tmp)
158 local rc diff=$(mktemp -t diffXXXXXX.tmp)
159
160 find $RPM_BUILD_ROOT%{php_pear_dir} | LC_ALL=C sort > $installed
161 sed -i -re "s#^$RPM_BUILD_ROOT%{php_pear_dir}/?##" $installed
162
01f97755
ER
163 rpm -qpl %{_rpmdir}/$RPMFILE | LC_ALL=C sort > $rpmfiles
164
1d546840 165 sed -i -re "s#^%{php_pear_dir}/?##" $rpmfiles
57d254d6
ER
166
167 # find finds also '.', so use option -B for diff
1d546840
ER
168 if ! diff -uB $installed $rpmfiles > $diff; then
169 cat <<-EOF
170
171 ERROR: some files/directories are not included in package:
172
173 $(%{__sed} -ne '/^-[^-]/ s#^-#%%{php_pear_dir}/#p' $diff)
174
175 EOF
176
57d254d6
ER
177 exit 1
178 fi
1d546840
ER
179 rm -rf $RPM_BUILD_ROOT
180 rm -f $installed $rpmfiles $diff
57d254d6 181}
1d546840 182
57d254d6 183check_channel_dirs
08a1e49d 184
25de18da
ER
185%files
186%defattr(644,root,root,755)
367add8f
ER
187%dir %{php_pear_dir}
188%{php_pear_dir}/*
189
01f97755 190# PEAR state files
448d9ae1
ER
191%ghost %{php_pear_dir}/.depdblock
192%ghost %{php_pear_dir}/.depdb
193%ghost %{php_pear_dir}/.filemap
194%ghost %{php_pear_dir}/.lock
195
367add8f
ER
196%dir %{php_pear_dir}/.registry
197%dir %{php_pear_dir}/.channels
198%dir %{php_pear_dir}/.channels/.alias
199
1c3b25a3 200%if %{without bootstrap}
16d1038b 201# core channels
448d9ae1
ER
202%{php_pear_dir}/.channels/__uri.reg
203%{php_pear_dir}/.registry/.channel.__uri
204
205%{php_pear_dir}/.channels/.alias/pear.txt
206%{php_pear_dir}/.channels/pear.php.net.reg
207
208%{php_pear_dir}/.channels/.alias/pecl.txt
448d9ae1
ER
209%{php_pear_dir}/.channels/pecl.php.net.reg
210%{php_pear_dir}/.registry/.channel.pecl.php.net
211
16d1038b
ER
212%{php_pear_dir}/.channels/.alias/phpdocs.txt
213%{php_pear_dir}/.channels/doc.php.net.reg
214%{php_pear_dir}/.registry/.channel.doc.php.net
215
216# addon channels
367add8f
ER
217%{php_pear_dir}/.channels/.alias/phpunit.txt
218%{php_pear_dir}/.channels/pear.phpunit.de.reg
8ffa46a8 219%{php_pear_dir}/.registry/.channel.pear.phpunit.de
799471e8
ER
220
221%{php_pear_dir}/.channels/.alias/phing.txt
222%{php_pear_dir}/.channels/pear.phing.info.reg
8ffa46a8 223%{php_pear_dir}/.registry/.channel.pear.phing.info
799471e8
ER
224
225%{php_pear_dir}/.channels/.alias/phpdb.txt
226%{php_pear_dir}/.channels/pear.phpdb.org.reg
8ffa46a8 227%{php_pear_dir}/.registry/.channel.pear.phpdb.org
fcc14391
ER
228
229%{php_pear_dir}/.channels/.alias/firephp.txt
230%{php_pear_dir}/.channels/pear.firephp.org.reg
57d254d6 231%{php_pear_dir}/.registry/.channel.pear.firephp.org
16d1038b
ER
232
233%{php_pear_dir}/.channels/.alias/symfony.txt
234%{php_pear_dir}/.channels/pear.symfony-project.com.reg
235%{php_pear_dir}/.registry/.channel.pear.symfony-project.com
3e35a10f
ER
236
237%{php_pear_dir}/.channels/.alias/phpseclib.txt
238%{php_pear_dir}/.channels/phpseclib.sourceforge.net.reg
239%{php_pear_dir}/.registry/.channel.phpseclib.sourceforge.net
1275fa38
ER
240
241%{php_pear_dir}/.channels/.alias/horde.txt
242%{php_pear_dir}/.channels/pear.horde.org.reg
243%{php_pear_dir}/.registry/.channel.pear.horde.org
20007f01
ER
244
245%{php_pear_dir}/.channels/.alias/rc.txt
246%{php_pear_dir}/.channels/pear.roundcube.net.reg
247%{php_pear_dir}/.registry/.channel.pear.roundcube.net
d9ff93b5
ER
248
249%{php_pear_dir}/.channels/.alias/ezc.txt
250%{php_pear_dir}/.channels/components.ez.no.reg
251%{php_pear_dir}/.registry/.channel.components.ez.no
4c5242d9
ER
252
253%{php_pear_dir}/.channels/.alias/propel.txt
254%{php_pear_dir}/.channels/pear.propelorm.org.reg
255%{php_pear_dir}/.registry/.channel.pear.propelorm.org
a9af1509
ER
256
257%{php_pear_dir}/.channels/.alias/docblox.txt
258%{php_pear_dir}/.channels/pear.docblox-project.org.reg
259%{php_pear_dir}/.registry/.channel.pear.docblox-project.org
d92a3b44
ER
260
261%{php_pear_dir}/.channels/.alias/michelf.txt
262%{php_pear_dir}/.channels/pear.michelf.com.reg
263%{php_pear_dir}/.registry/.channel.pear.michelf.com
f84845e8
ER
264
265%{php_pear_dir}/.channels/.alias/pdepend.txt
266%{php_pear_dir}/.channels/pear.pdepend.org.reg
267%{php_pear_dir}/.registry/.channel.pear.pdepend.org
268
269%{php_pear_dir}/.channels/.alias/phpmd.txt
270%{php_pear_dir}/.channels/pear.phpmd.org.reg
271%{php_pear_dir}/.registry/.channel.pear.phpmd.org
5f88c87c
ER
272
273%{php_pear_dir}/.channels/.alias/symfony2.txt
274%{php_pear_dir}/.channels/pear.symfony.com.reg
275%{php_pear_dir}/.registry/.channel.pear.symfony.com
d1682f5e
ER
276
277%{php_pear_dir}/.channels/.alias/saucelabs.txt
278%{php_pear_dir}/.channels/saucelabs.github.com_pear.reg
279%{php_pear_dir}/.registry/.channel.saucelabs.github.com_pear
73b1fcbc
ER
280
281%{php_pear_dir}/.channels/.alias/twig.txt
282%{php_pear_dir}/.channels/pear.twig-project.org.reg
283%{php_pear_dir}/.registry/.channel.pear.twig-project.org
3ba22036
ER
284
285%{php_pear_dir}/.channels/.alias/zz.txt
286%{php_pear_dir}/.channels/zustellzentrum.cweiske.de.reg
287%{php_pear_dir}/.registry/.channel.zustellzentrum.cweiske.de
7a1a8238
ER
288
289%{php_pear_dir}/.channels/.alias/theseer.txt
290%{php_pear_dir}/.channels/pear.netpirates.net.reg
291%{php_pear_dir}/.registry/.channel.pear.netpirates.net
7e5dea50
ER
292
293%{php_pear_dir}/.channels/.alias/indeyets.txt
294%{php_pear_dir}/.channels/pear.indeyets.ru.reg
295%{php_pear_dir}/.registry/.channel.pear.indeyets.ru
237c2312
ER
296
297%{php_pear_dir}/.channels/.alias/phpdoc.txt
298%{php_pear_dir}/.channels/pear.phpdoc.org.reg
299%{php_pear_dir}/.registry/.channel.pear.phpdoc.org
902a69a3
ER
300
301%{php_pear_dir}/.channels/.alias/bartlett.txt
302%{php_pear_dir}/.channels/bartlett.laurent-laville.org.reg
303%{php_pear_dir}/.registry/.channel.bartlett.laurent-laville.org
1c3b25a3 304%endif
This page took 0.088392 seconds and 4 git commands to generate.