f2c4aa5
f2c4aa5
%define peardir %{_datadir}/pear
f2c4aa5
7550ac1
%define xmlrpcver 1.5.1
b5bac4b
30e6e23
# Upstream only make the latest .phar available via the following URL,
30e6e23
# no archive of each version of the installer archives exists:
30e6e23
#   http://pear.php.net/install-pear-nozlib.phar
30e6e23
f2c4aa5
Summary: PHP Extension and Application Repository framework
f2c4aa5
Name: php-pear
582fcef
Version: 1.5.4
3ed1b7d
Release: 4
f2c4aa5
Epoch: 1
7550ac1
License: The PHP License v3.0
30e6e23
Group: Development/Languages
f2c4aa5
URL: http://pear.php.net/package/PEAR
f2c4aa5
Source0: install-pear-nozlib-%{version}.phar
f2c4aa5
Source2: relocate.php
9178c0f
Source3: strip.php
f98fc6f
Source4: LICENSE
c4b9d17
Source10: pear.sh
c4b9d17
Source11: pecl.sh
c4b9d17
Source12: peardev.sh
21dfe00
Source13: macros.pear
f98fc6f
Source20: http://pear.php.net/get/XML_RPC-%{xmlrpcver}.tgz
cbe20f7
BuildArch: noarch
cbe20f7
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
5215bfd
BuildRequires: php-cli >= 5.1.0-1, gnupg
780e0ef
Provides: php-pear(Archive_Tar) = 1.3.2
780e0ef
Provides: php-pear(Console_Getopt) = 1.2.1
977b82d
Provides: php-pear(PEAR) = %{version}
780e0ef
Provides: php-pear(Structures_Graph) = 1.0.2
b5bac4b
Provides: php-pear(XML_RPC) = %{xmlrpcver}
21dfe00
Requires: php >= 5.1.0-1, php-cli
f2c4aa5
f2c4aa5
%description
f2c4aa5
PEAR is a framework and distribution system for reusable PHP
f2c4aa5
components.  This package contains the basic PEAR components.
f2c4aa5
f2c4aa5
%prep
f2c4aa5
%setup -cTn pear-%{version}
f2c4aa5
5215bfd
%build
5215bfd
# This is an empty build section.
5215bfd
f2c4aa5
%install
f2c4aa5
rm -rf $RPM_BUILD_ROOT
f2c4aa5
f2c4aa5
export PHP_PEAR_SYSCONF_DIR=`pwd`
9178c0f
export PHP_PEAR_SIG_KEYDIR=/etc/pearkeys
9894d03
export PHP_PEAR_SIG_BIN=/usr/bin/gpg
7550ac1
7550ac1
# 1.4.11 tries to write to the cache directory during installation
7550ac1
# so it's not possible to set a sane default via the environment.
7550ac1
# The ${PWD} bit will be stripped via relocate.php later.
7550ac1
export PHP_PEAR_CACHE_DIR=${PWD}%{_localstatedir}/cache/php-pear
7550ac1
export PHP_PEAR_TEMP_DIR=/var/tmp
f2c4aa5
f2c4aa5
%{_bindir}/php -n -dshort_open_tag=0 -dsafe_mode=0 \
f2c4aa5
         -derror_reporting=E_ALL -ddetect_unicode=0 \
9178c0f
      %{SOURCE0} -d $RPM_BUILD_ROOT%{peardir} \
9178c0f
                 -b $RPM_BUILD_ROOT%{_bindir} \
9178c0f
                 %{SOURCE20}
f2c4aa5
9178c0f
# Replace /usr/bin/* with simple scripts:
c4b9d17
for f in pecl pear peardev; do 
c4b9d17
   install -m 755 $RPM_SOURCE_DIR/${f}.sh $RPM_BUILD_ROOT%{_bindir}/${f}
c4b9d17
done
f2c4aa5
49ab520
install -d $RPM_BUILD_ROOT%{_sysconfdir} \
f98fc6f
           $RPM_BUILD_ROOT%{_localstatedir}/cache/php-pear \
49aa7f5
           $RPM_BUILD_ROOT%{peardir}/.pkgxml \
49aa7f5
           $RPM_BUILD_ROOT%{_sysconfdir}/rpm
f2c4aa5
f2c4aa5
# Relocate everything:
f2c4aa5
sed -si "s,$RPM_BUILD_ROOT,,g" \
f2c4aa5
         $RPM_BUILD_ROOT%{peardir}/*.php \
f2c4aa5
         $RPM_BUILD_ROOT%{peardir}/*/*.php \
f2c4aa5
         $RPM_BUILD_ROOT%{peardir}/*/*/*.php
f2c4aa5
9178c0f
# Sanitize the pear.conf
7550ac1
%{_bindir}/php -n %{SOURCE2} pear.conf $RPM_BUILD_ROOT | 
7550ac1
  %{_bindir}/php -n %{SOURCE2} php://stdin $PWD > new-pear.conf
9178c0f
%{_bindir}/php -n %{SOURCE3} new-pear.conf ext_dir > $RPM_BUILD_ROOT%{_sysconfdir}/pear.conf
f2c4aa5
f2c4aa5
for f in $RPM_BUILD_ROOT%{peardir}/.registry/*.reg; do
f2c4aa5
   %{_bindir}/php -n %{SOURCE2} ${f} $RPM_BUILD_ROOT > ${f}.new
f2c4aa5
   mv ${f}.new ${f}
f2c4aa5
done
f2c4aa5
f98fc6f
install -m 644 -c $RPM_SOURCE_DIR/LICENSE .
f98fc6f
21dfe00
install -m 644 -c $RPM_SOURCE_DIR/macros.pear \
21dfe00
           $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.pear        
21dfe00
f2c4aa5
%check
cbe20f7
# Check that no bogus paths are left in the configuration, or in
cbe20f7
# the generated registry files.
f2c4aa5
grep $RPM_BUILD_ROOT $RPM_BUILD_ROOT%{_sysconfdir}/pear.conf && exit 1
9178c0f
grep %{_libdir} $RPM_BUILD_ROOT%{_sysconfdir}/pear.conf && exit 1
7550ac1
grep '"/tmp"' $RPM_BUILD_ROOT%{_sysconfdir}/pear.conf && exit 1
cbe20f7
grep /usr/local $RPM_BUILD_ROOT%{_sysconfdir}/pear.conf && exit 1
cbe20f7
grep -rl $RPM_BUILD_ROOT $RPM_BUILD_ROOT && exit 1
f2c4aa5
f2c4aa5
%clean
f2c4aa5
rm -rf $RPM_BUILD_ROOT
f2c4aa5
rm pear.conf
f2c4aa5
f2c4aa5
%files
f2c4aa5
%defattr(-,root,root,-)
f2c4aa5
%{peardir}
f2c4aa5
%{_bindir}/*
30e6e23
%config(noreplace) %{_sysconfdir}/pear.conf
7aebec6
%config %{_sysconfdir}/rpm/macros.pear
49ab520
%dir %{_localstatedir}/cache/php-pear
f98fc6f
%doc LICENSE
f2c4aa5
f2c4aa5
%changelog
3ed1b7d
* Mon Jul 16 2007 Remi Collet <Fedora@FamilleCollet.com> 1:1.5.4-4
3ed1b7d
- update macros.pear (without define)
3ed1b7d
5bb29ca
* Mon Jul 16 2007 Joe Orton <jorton@redhat.com> 1:1.5.4-3
5bb29ca
- add pecl_{un,}install macros to macros.pear (from Remi)
5bb29ca
582fcef
* Fri May 11 2007 Joe Orton <jorton@redhat.com> 1:1.5.4-2
582fcef
- update to 1.5.4
582fcef
5215bfd
* Tue Mar  6 2007 Joe Orton <jorton@redhat.com> 1:1.5.0-3
5215bfd
- add redundant build section (#226295)
5215bfd
- BR php-cli not php (#226295)
5215bfd
780e0ef
* Mon Feb 19 2007 Joe Orton <jorton@redhat.com> 1:1.5.0-2
780e0ef
- update builtin module provides (Remi Collet, #226295)
780e0ef
- drop patch 0
780e0ef
fa2f675
* Thu Feb 15 2007 Joe Orton <jorton@redhat.com> 1:1.5.0-1
fa2f675
- update to 1.5.0
fa2f675
30e6e23
* Mon Feb  5 2007 Joe Orton <jorton@redhat.com> 1:1.4.11-4
30e6e23
- fix Group, mark pear.conf noreplace (#226295)
30e6e23
cbe20f7
* Mon Feb  5 2007 Joe Orton <jorton@redhat.com> 1:1.4.11-3
cbe20f7
- use BuildArch not BuildArchitectures (#226925)
cbe20f7
- fix to use preferred BuildRoot (#226925)
cbe20f7
- strip more buildroot-relative paths from *.reg
9894d03
- force correct gpg path in default pear.conf
cbe20f7
7550ac1
* Thu Jan  4 2007 Joe Orton <jorton@redhat.com> 1:1.4.11-2
7550ac1
- update to 1.4.11
7550ac1
7aebec6
* Fri Jul 14 2006 Joe Orton <jorton@redhat.com> 1:1.4.9-4
7aebec6
- update to XML_RPC-1.5.0
7aebec6
- really package macros.pear
7aebec6
21dfe00
* Thu Jul 13 2006 Joe Orton <jorton@redhat.com> 1:1.4.9-3
21dfe00
- require php-cli
21dfe00
- add /etc/rpm/macros.pear (Christopher Stone)
21dfe00
2f9a8bc
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1:1.4.9-2.1
2f9a8bc
- rebuild
2f9a8bc
f98fc6f
* Mon May  8 2006 Joe Orton <jorton@redhat.com> 1:1.4.9-2
f98fc6f
- update to 1.4.9 (thanks to Remi Collet, #183359)
f98fc6f
- package /usr/share/pear/.pkgxml (#190252)
f98fc6f
- update to XML_RPC-1.4.8
f98fc6f
- bundle the v3.0 LICENSE file
f98fc6f
49ab520
* Tue Feb 28 2006 Joe Orton <jorton@redhat.com> 1:1.4.6-2
49ab520
- set cache_dir directory, own /var/cache/php-pear
49ab520
cc0d744
* Mon Jan 30 2006 Joe Orton <jorton@redhat.com> 1:1.4.6-1
cc0d744
- update to 1.4.6
cc0d744
- require php >= 5.1.0 (#178821)
cc0d744
83fab8f
* Fri Dec 30 2005 Tim Jackson <tim@timj.co.uk> 1:1.4.5-6
83fab8f
- Patches to fix "pear makerpm"
83fab8f
9178c0f
* Wed Dec 14 2005 Joe Orton <jorton@redhat.com> 1:1.4.5-5
9178c0f
- set default sig_keydir to /etc/pearkeys
9178c0f
- remove ext_dir setting from /etc/pear.conf (#175673)
9178c0f
d58f42d
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
d58f42d
- rebuilt
d58f42d
977b82d
* Tue Dec  6 2005 Joe Orton <jorton@redhat.com> 1:1.4.5-4
977b82d
- fix virtual provide for PEAR package (#175074)
977b82d
c4b9d17
* Sun Dec  4 2005 Joe Orton <jorton@redhat.com> 1:1.4.5-3
c4b9d17
- fix /usr/bin/{pecl,peardev} (#174882)
c4b9d17
b5bac4b
* Thu Dec  1 2005 Joe Orton <jorton@redhat.com> 1:1.4.5-2
b5bac4b
- add virtual provides (#173806) 
b5bac4b
f2c4aa5
* Wed Nov 23 2005 Joe Orton <jorton@redhat.com> 1.4.5-1
f2c4aa5
- initial build (Epoch: 1 to allow upgrade from php-pear-5.x)