]>
Commit | Line | Data |
---|---|---|
25de18da | 1 | Summary: PEAR - PHP Extension and Application Repository |
76e800da | 2 | Summary(pl.UTF-8): PEAR - rozszerzenie PHP i repozytorium aplikacji |
25de18da | 3 | Name: php-pear |
924f9510 | 4 | Version: 1.2 |
57d254d6 | 5 | Release: 2 |
25de18da ER |
6 | Epoch: 4 |
7 | License: Public Domain | |
8 | Group: Development/Languages/PHP | |
799471e8 ER |
9 | Source0: channel-phpunit.xml |
10 | Source1: channel-phing.xml | |
11 | Source2: channel-phpdb.xml | |
fcc14391 | 12 | Source3: channel-firephp.xml |
924f9510 ER |
13 | Source10: php-channel-prov.php |
14 | BuildRequires: /usr/bin/php | |
799471e8 | 15 | BuildRequires: php-pear-PEAR |
25de18da | 16 | Obsoletes: php-pear-additional_classes |
109b2b0a | 17 | Obsoletes: php4-pear |
448d9ae1 | 18 | Conflicts: php-pear-PEAR < 1:1.7.2-10 |
25de18da ER |
19 | BuildArch: noarch |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
21 | ||
924f9510 ER |
22 | %define __reg_provides php %{SOURCE10} |
23 | ||
57d254d6 | 24 | # find channel provides |
924f9510 ER |
25 | %define _use_internal_dependency_generator 0 |
26 | %define __find_provides %{__reg_provides} | |
27 | %define __find_requires %{nil} | |
28 | ||
57d254d6 ER |
29 | # avoid rpm 4.4.9 adding rm -rf buildroot, we need the dirs to check consistency |
30 | %define __spec_clean_body %{nil} | |
31 | ||
25de18da ER |
32 | %description |
33 | PEAR - PHP Extension and Application Repository. | |
34 | ||
35 | Please note that this package provides only basic directory structure. | |
36 | If you want to use base PEAR classes (PEAR.php, PEAR/*.php), that come | |
37 | with PHP, please install appropriate php-pear-* (php-pear-PEAR, | |
38 | php-PEAR-Archive_Tar, etc) packages. | |
39 | ||
84a3ead2 | 40 | %description -l pl.UTF-8 |
25de18da ER |
41 | PEAR (PHP Extension and Application Repository) - rozszerzenie PHP i |
42 | repozytorium aplikacji. | |
43 | ||
84a3ead2 JR |
44 | Należy pamiętać, że ten pakiet dostarcza tylko podstawową strukturę |
45 | katalogów. Aby użyć podstawowych klas PEAR (PEAR.php PEAR/*.php), | |
46 | dostarczanych z PHP, należy zainstalować odpowiednie pakiety | |
25de18da ER |
47 | php-pear-* (php-pear-PEAR, php-pear-Archive_Tar, itp). |
48 | ||
49 | %prep | |
367add8f | 50 | %setup -qcT |
25de18da ER |
51 | |
52 | %install | |
54b72825 | 53 | rm -rf $RPM_BUILD_ROOT |
20487384 | 54 | install -d $RPM_BUILD_ROOT%{php_pear_dir}/{bin,data,tests} |
e47124f8 | 55 | |
367add8f | 56 | # add extra channels |
fcc14391 | 57 | pear -c pearrc config-set php_dir $RPM_BUILD_ROOT%{php_pear_dir} |
367add8f | 58 | pear -c pearrc channel-add %{SOURCE0} |
799471e8 ER |
59 | pear -c pearrc channel-add %{SOURCE1} |
60 | pear -c pearrc channel-add %{SOURCE2} | |
fcc14391 | 61 | pear -c pearrc channel-add %{SOURCE3} |
367add8f | 62 | |
e47124f8 ER |
63 | while read dir; do |
64 | install -d $RPM_BUILD_ROOT$dir | |
65 | done <<EOF | |
f2e5d717 | 66 | %{php_pear_dir}/.registry |
9c7aa2c0 | 67 | %{php_pear_dir}/bin |
e47124f8 | 68 | %{php_pear_dir}/Archive |
8b36818a | 69 | %{php_pear_dir}/Auth |
7051e1d1 | 70 | %{php_pear_dir}/Cache |
e47124f8 | 71 | %{php_pear_dir}/Console |
d135aaea | 72 | %{php_pear_dir}/Contact |
7051e1d1 | 73 | %{php_pear_dir}/Crypt |
8b36818a | 74 | %{php_pear_dir}/DB/DataObject |
b67f38ff | 75 | %{php_pear_dir}/Event |
6a776838 | 76 | %{php_pear_dir}/File |
7fe1ecf4 | 77 | %{php_pear_dir}/Genealogy |
8b36818a | 78 | %{php_pear_dir}/Gtk |
baff6ba1 | 79 | %{php_pear_dir}/Gtk2 |
e47124f8 | 80 | %{php_pear_dir}/HTML |
a64748d8 | 81 | %{php_pear_dir}/HTML/QuickForm |
3314c2d4 ER |
82 | %{php_pear_dir}/HTML/Table |
83 | %{php_pear_dir}/HTML/Template | |
e47124f8 | 84 | %{php_pear_dir}/HTTP |
21dc0ab4 ER |
85 | %{php_pear_dir}/HTTP/WebDAV |
86 | %{php_pear_dir}/HTTP/WebDAV/Tools | |
f7198b38 | 87 | %{php_pear_dir}/I18N |
e47124f8 | 88 | %{php_pear_dir}/Image |
6c23b1d5 | 89 | %{php_pear_dir}/MP3 |
3314c2d4 | 90 | %{php_pear_dir}/Math |
e47124f8 ER |
91 | %{php_pear_dir}/Net |
92 | %{php_pear_dir}/Numbers | |
d135aaea | 93 | %{php_pear_dir}/PHP |
3314c2d4 | 94 | %{php_pear_dir}/Payment |
698a23ed | 95 | %{php_pear_dir}/QA |
e47124f8 ER |
96 | %{php_pear_dir}/Science |
97 | %{php_pear_dir}/Services | |
d7c960b2 | 98 | %{php_pear_dir}/Structures |
dff95dc3 | 99 | %{php_pear_dir}/Testing |
e47124f8 | 100 | %{php_pear_dir}/Text |
fb984fdb | 101 | %{php_pear_dir}/Text/Spell |
3438e6b2 | 102 | %{php_pear_dir}/URI |
c8e9976e AG |
103 | %{php_pear_dir}/Validate |
104 | %{php_pear_dir}/Validate/Finance | |
698a23ed AG |
105 | %{php_pear_dir}/VersionControl |
106 | %{php_pear_dir}/XML | |
e47124f8 | 107 | EOF |
54b72825 | 108 | |
08a1e49d | 109 | %clean |
57d254d6 ER |
110 | cd $RPM_BUILD_ROOT%{php_pear_dir} |
111 | ||
112 | check_channel_dirs() { | |
113 | RPMFILE=%{name}-%{version}-%{release}.%{_target_cpu}.rpm | |
114 | TMPFILE=$(mktemp) | |
115 | find .channels .registry -type d | LC_ALL=C sort > $TMPFILE | |
116 | ||
117 | # find finds also '.', so use option -B for diff | |
118 | if rpm -qplv %{_rpmdir}/$RPMFILE | sed -ne '/^d/s,^.*%{php_pear_dir}/\.,.,p' | LC_ALL=C sort | diff -uB $TMPFILE - ; then | |
119 | rm -rf $RPM_BUILD_ROOT | |
120 | else | |
121 | echo -e "\nNot so good, some channel directories are not included in package\n" | |
122 | exit 1 | |
123 | fi | |
124 | rm -f $TMPFILE | |
125 | } | |
126 | check_channel_dirs | |
08a1e49d | 127 | |
25de18da ER |
128 | %files |
129 | %defattr(644,root,root,755) | |
367add8f ER |
130 | %dir %{php_pear_dir} |
131 | %{php_pear_dir}/* | |
132 | ||
448d9ae1 ER |
133 | %ghost %{php_pear_dir}/.depdblock |
134 | %ghost %{php_pear_dir}/.depdb | |
135 | %ghost %{php_pear_dir}/.filemap | |
136 | %ghost %{php_pear_dir}/.lock | |
137 | ||
367add8f ER |
138 | %dir %{php_pear_dir}/.registry |
139 | %dir %{php_pear_dir}/.channels | |
140 | %dir %{php_pear_dir}/.channels/.alias | |
141 | ||
448d9ae1 ER |
142 | %{php_pear_dir}/.channels/__uri.reg |
143 | %{php_pear_dir}/.registry/.channel.__uri | |
144 | ||
145 | %{php_pear_dir}/.channels/.alias/pear.txt | |
146 | %{php_pear_dir}/.channels/pear.php.net.reg | |
147 | ||
148 | %{php_pear_dir}/.channels/.alias/pecl.txt | |
448d9ae1 ER |
149 | %{php_pear_dir}/.channels/pecl.php.net.reg |
150 | %{php_pear_dir}/.registry/.channel.pecl.php.net | |
151 | ||
367add8f ER |
152 | %{php_pear_dir}/.channels/.alias/phpunit.txt |
153 | %{php_pear_dir}/.channels/pear.phpunit.de.reg | |
8ffa46a8 | 154 | %{php_pear_dir}/.registry/.channel.pear.phpunit.de |
799471e8 ER |
155 | |
156 | %{php_pear_dir}/.channels/.alias/phing.txt | |
157 | %{php_pear_dir}/.channels/pear.phing.info.reg | |
8ffa46a8 | 158 | %{php_pear_dir}/.registry/.channel.pear.phing.info |
799471e8 ER |
159 | |
160 | %{php_pear_dir}/.channels/.alias/phpdb.txt | |
161 | %{php_pear_dir}/.channels/pear.phpdb.org.reg | |
8ffa46a8 | 162 | %{php_pear_dir}/.registry/.channel.pear.phpdb.org |
fcc14391 ER |
163 | |
164 | %{php_pear_dir}/.channels/.alias/firephp.txt | |
165 | %{php_pear_dir}/.channels/pear.firephp.org.reg | |
57d254d6 | 166 | %{php_pear_dir}/.registry/.channel.pear.firephp.org |