]> git.pld-linux.org Git - packages/php-pear-PEAR.git/blob - php-pear-PEAR.spec
- update english summary
[packages/php-pear-PEAR.git] / php-pear-PEAR.spec
1 %include        /usr/lib/rpm/macros.php
2 %define         _class          PEAR
3 %define         _status         stable
4 %define         _pearname       %{_class}
5
6 Summary:        PEAR Base System
7 Summary(pl):    %{_pearname} - podstawowa klasa dla PHP PEAR
8 Name:           php-pear-%{_pearname}
9 Version:        1.4.8
10 Release:        0.4
11 Epoch:          1
12 License:        PHP 3.0
13 Group:          Development/Languages/PHP
14 Source0:        http://pear.php.net/get/%{_pearname}-%{version}.tgz
15 # Source0-md5:  4d29453e1926f11e05b7cfbf4ab085e7
16 Source1:        %{name}-template.spec
17 Patch0:         %{name}-sysconfdir.patch
18 Patch1:         %{name}-rpmpkgname.patch
19 Patch2:         %{name}-rpmvars.patch
20 Patch3:         %{name}-old-api.patch
21 Patch4:         %{name}-specfile.patch
22 Patch5:         %{name}-FHS.patch
23 URL:            http://pear.php.net/package/PEAR
24 BuildRequires:  php-cli
25 BuildRequires:  php-pear >= 4:1.0-12.3
26 BuildRequires:  rpm-php-pearprov >= 4.4.2-11
27 Requires:       %{name}-core = %{epoch}:%{version}-%{release}
28 Requires:       /usr/bin/php
29 Requires:       php-pcre
30 Requires:       php-pear >= 4:1.0-5.5
31 Requires:       php-pear-Archive_Tar >= 1.1
32 Requires:       php-pear-Console_Getopt >= 1.2
33 Requires:       php-pear-XML_RPC >= 1.4.0
34 Requires:       php-xml
35 Requires:       php-zlib
36 Obsoletes:      php-pear-PEAR-Command
37 Obsoletes:      php-pear-PEAR-Frontend-CLI
38 Obsoletes:      php-pear-PEAR-OS
39 #Suggests:      php-pear-Net_FTP
40 Conflicts:      php-pear-Archive_Tar = 1.3.0
41 Conflicts:      php-pear-PEAR_Frontend_Gtk < 0.4.0
42 Conflicts:      php-pear-PEAR_Frontend_Web < 0.5.0
43 BuildArch:      noarch
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 # PEAR_Command_Packaging is separate package
47 %define         _noautoreq      'pear(PEAR/FTP.php)' 'pear(Net/FTP.php)' 'pear(XML/RPC.*)' 'pear(PEAR/Command/Packaging.php)'
48 %define         _statedir       /var/lib/pear
49
50 %description
51 The PEAR package contains:
52 - the PEAR installer, for creating, distributing and installing
53   packages
54 - the alpha-quality PEAR_Exception PHP5 error handling mechanism
55 - the beta-quality PEAR_ErrorStack advanced error handling mechanism
56 - the PEAR_Error error handling mechanism
57 - the OS_Guess class for retrieving info about the OS where PHP is
58   running on
59 - the System class for quick handling of common operations with files
60   and directories
61 - the PEAR base class packages
62
63 In PEAR status of this package is: %{_status}.
64
65 %description -l pl
66 Pakiet PEAR zawiara:
67 - PEAR installer do tworzenia, dystrybucji i instalowania pakietów,
68 - mechanizm PEAR_Exception (w fazie alpha) do obs³ugi b³êdów PHP5,
69 - zaawansowany mechanizm PEAR_ErrorStack (w fazie beta) do obs³ugi
70   b³êdów,
71 - mechanizm obs³ugi b³êdów PEAR_Error,
72 - klasê OS_Guess do pozyskiwania informacji na temat systemu
73   operacyjnego,
74 - klasê System do szybkiej obs³ugi typowych operacji na plikach i
75   katalogach,
76 - podstawow± klasy PEAR.
77
78 Ta klasa ma w PEAR status: %{_status}.
79
80 %package core
81 Summary:        PEAR core classes
82 Summary(pl):    G³ówne klasy PEAR-a
83 Group:          Development/Languages/PHP
84
85 %description core
86 This package includes PEAR core classes:
87 - PEAR class and PEAR_Error
88 - System
89 - OS_Guess
90 and classes for PHP 5:
91 - PEAR_ErrorStack and PEAR_Exception
92
93 %description core -l pl
94 Ten pakiet zawiera g³ówne klasy PEAR-a:
95 - klasê PEAR i PEAR_Error
96 - System
97 - OS_Gueass
98 oraz klasy dla PHP 5:
99 - PEAR_ErrorStack i PEAR_Exception
100
101 %prep
102 %pear_package_setup
103 %patch0 -p1
104 %patch1 -p1
105 %patch2 -p1
106 %patch3 -p1
107 %patch4 -p1
108 %patch5 -p1
109
110 find '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v
111
112 %install
113 rm -rf $RPM_BUILD_ROOT
114
115 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{php_pear_dir},%{_bindir}}
116
117 D=$(pwd)
118 pearcmd() {
119         php -doutput_buffering=1 -dinclude_path=".:${D}%{php_pear_dir}" ${D}%{php_pear_dir}/pearcmd.php -c ${D}/pearrc "$@"
120 }
121 pearcmd config-set doc_dir %{_docdir} || exit
122 pearcmd config-set data_dir %{php_pear_dir}/data || exit
123 pearcmd config-set php_dir %{php_pear_dir} || exit
124 pearcmd config-set test_dir %{php_pear_dir}/tests || exit
125 pearcmd config-set sig_bin %{_bindir}/gpg || exit
126 cp $D/pearrc $RPM_BUILD_ROOT%{_sysconfdir}/pear.conf
127
128 %pear_package_install
129
130 install -d $RPM_BUILD_ROOT%{_statedir}/{registry/.channel.{__uri,pecl.php.net},channels/.alias}
131 touch $RPM_BUILD_ROOT%{_statedir}/.depdb{,lock}
132 touch $RPM_BUILD_ROOT%{_statedir}/channels/{__uri,{pear,pecl}.php.net}.reg
133 touch $RPM_BUILD_ROOT%{_statedir}/channels/.alias/{pear,pecl}.txt
134 touch $RPM_BUILD_ROOT%{_statedir}/.filemap
135 touch $RPM_BUILD_ROOT%{_statedir}/.lock
136
137 # -C and -q options were for php-cgi, in php-cli they're enabled by default.
138 %define php_exec exec /usr/bin/php -dinclude_path=%{php_pear_dir} -doutput_buffering=1
139 cat > $RPM_BUILD_ROOT%{_bindir}/pear <<'EOF'
140 #!/bin/sh
141 %php_exec -dopen_basedir="" -dmemory_limit=24M %{php_pear_dir}/pearcmd.php "$@"
142 EOF
143 cat > $RPM_BUILD_ROOT%{_bindir}/peardev <<'EOF'
144 #!/bin/sh
145 %php_exec -dopen_basedir="" -dmemory_limit=-1 %{php_pear_dir}/pearcmd.php "$@"
146 EOF
147 # This -dextension=pcre.so works with php-5.1, and patched php-cli >= 4:5.0.5-18.1, php4-cli >= 3:4.4.1-6.1
148 # -n is there because devs on #pear said this avoids locking problems when replacing in use libraries.
149 cat > $RPM_BUILD_ROOT%{_bindir}/pecl <<'EOF'
150 #!/bin/sh
151 %php_exec -dmemory_limit=24M -dsafe_mode=0 -n -dextension=pcre.so -dextension=xml.so %{php_pear_dir}/peclcmd.php "$@"
152 EOF
153 # for rpm to find interpreter
154 chmod +x $RPM_BUILD_ROOT%{_bindir}/*
155
156 sed -e '/^\$''Log: /,$d' %{SOURCE1} > $RPM_BUILD_ROOT%{php_pear_dir}/data/%{_class}/template.spec
157 echo '$''Log: $' >> $RPM_BUILD_ROOT%{php_pear_dir}/data/%{_class}/template.spec
158
159 %post
160 if [ -f %{_docdir}/%{name}-%{version}/optional-packages.txt ]; then
161         cat %{_docdir}/%{name}-%{version}/optional-packages.txt
162 fi
163 if [ ! -f %{_statedir}/.lock ]; then
164         umask 2
165         touch %{_statedir}/.lock
166 fi
167 if [ ! -e %{php_pear_dir}/.registry ]; then
168         ln -s %{_statedir}/registry %{php_pear_dir}/.registry
169 fi
170
171 %triggerpostun -- %{name} < 1:1.4.7-0.3
172 if [ ! -L %{php_pear_dir}/.registry ]; then
173         mv -f %{php_pear_dir}/.registry/*.reg %{_statedir}/registry
174         rmdir %{php_pear_dir}/.registry 2>/dev/null || mv -v %{php_pear_dir}/.registry{,.rpmsave}
175         ln -s %{_statedir}/registry %{php_pear_dir}/.registry
176 fi
177 rm -f %{php_pear_dir}/.{lock,depdb*,filemap}
178
179 %clean
180 rm -rf $RPM_BUILD_ROOT
181
182 %files
183 %defattr(644,root,root,755)
184 %doc install.log optional-packages.txt
185 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pear.conf
186 %attr(755,root,root) %{_bindir}/*
187 %{php_pear_dir}/.registry/*.reg
188 %{php_pear_dir}/pearcmd.php
189 %{php_pear_dir}/peclcmd.php
190 %{php_pear_dir}/PEAR/[!CE]*
191 %{php_pear_dir}/PEAR/ChannelFile*
192 %{php_pear_dir}/PEAR/Command*
193 %{php_pear_dir}/PEAR/Config.php
194 %{php_pear_dir}/PEAR/Common.php
195
196 %{php_pear_dir}/data/*
197
198 %dir %{_statedir}/channels
199 %dir %{_statedir}/registry
200 %dir %{_statedir}/channels/.alias
201
202 %ghost %{_statedir}/channels/.alias/pear.txt
203 %ghost %{_statedir}/channels/.alias/pecl.txt
204 %ghost %{_statedir}/channels/pear.php.net.reg
205 %ghost %{_statedir}/channels/pecl.php.net.reg
206 %ghost %{_statedir}/channels/__uri.reg
207 %ghost %{_statedir}/registry/.channel.__uri
208 %ghost %{_statedir}/registry/.channel.pecl.php.net
209 %ghost %{_statedir}/.depdblock
210 %ghost %{_statedir}/.depdb
211 %ghost %{_statedir}/.filemap
212 %ghost %{_statedir}/.lock
213
214 %files core
215 %defattr(644,root,root,755)
216 %{php_pear_dir}/PEAR.php
217 %{php_pear_dir}/System.php
218 %{php_pear_dir}/OS
219 %dir %{php_pear_dir}/PEAR
220 %{php_pear_dir}/PEAR/ErrorStack.php
221 %{php_pear_dir}/PEAR/Exception.php
This page took 0.107549 seconds and 4 git commands to generate.