2005-12-01 17:12:57 +00:00
|
|
|
|
|
|
|
%define peardir %{_datadir}/pear
|
|
|
|
|
2007-01-04 11:49:53 +00:00
|
|
|
%define xmlrpcver 1.5.1
|
2005-12-01 17:38:15 +00:00
|
|
|
|
2007-02-05 19:01:54 +00:00
|
|
|
# Upstream only make the latest .phar available via the following URL,
|
|
|
|
# no archive of each version of the installer archives exists:
|
|
|
|
# http://pear.php.net/install-pear-nozlib.phar
|
|
|
|
|
2005-12-01 17:12:57 +00:00
|
|
|
Summary: PHP Extension and Application Repository framework
|
|
|
|
Name: php-pear
|
2007-01-04 11:49:53 +00:00
|
|
|
Version: 1.4.11
|
2007-02-05 19:01:54 +00:00
|
|
|
Release: 4
|
2005-12-01 17:12:57 +00:00
|
|
|
Epoch: 1
|
2007-01-04 11:49:53 +00:00
|
|
|
License: The PHP License v3.0
|
2007-02-05 19:01:54 +00:00
|
|
|
Group: Development/Languages
|
2005-12-01 17:12:57 +00:00
|
|
|
URL: http://pear.php.net/package/PEAR
|
|
|
|
Source0: install-pear-nozlib-%{version}.phar
|
|
|
|
Source2: relocate.php
|
2005-12-14 09:06:39 +00:00
|
|
|
Source3: strip.php
|
2006-05-08 09:33:59 +00:00
|
|
|
Source4: LICENSE
|
2005-12-04 16:12:18 +00:00
|
|
|
Source10: pear.sh
|
|
|
|
Source11: pecl.sh
|
|
|
|
Source12: peardev.sh
|
2006-07-13 12:15:27 +00:00
|
|
|
Source13: macros.pear
|
2006-05-08 09:33:59 +00:00
|
|
|
Source20: http://pear.php.net/get/XML_RPC-%{xmlrpcver}.tgz
|
|
|
|
Patch0: php-pear-1.4.8-template.patch
|
|
|
|
Patch1: php-pear-1.4.8-package.patch
|
2007-02-05 12:33:03 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
2007-02-05 12:38:18 +00:00
|
|
|
BuildRequires: php >= 5.1.0-1, gnupg
|
2005-12-01 17:38:15 +00:00
|
|
|
Provides: php-pear(Archive_Tar) = 1.3.1
|
|
|
|
Provides: php-pear(Console_Getopt) = 1.2
|
2005-12-06 17:40:15 +00:00
|
|
|
Provides: php-pear(PEAR) = %{version}
|
2005-12-01 17:38:15 +00:00
|
|
|
Provides: php-pear(XML_RPC) = %{xmlrpcver}
|
2006-07-13 12:15:27 +00:00
|
|
|
Requires: php >= 5.1.0-1, php-cli
|
2005-12-01 17:12:57 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
PEAR is a framework and distribution system for reusable PHP
|
|
|
|
components. This package contains the basic PEAR components.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -cTn pear-%{version}
|
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
export PHP_PEAR_SYSCONF_DIR=`pwd`
|
2005-12-14 09:06:39 +00:00
|
|
|
export PHP_PEAR_SIG_KEYDIR=/etc/pearkeys
|
2007-02-05 12:38:18 +00:00
|
|
|
export PHP_PEAR_SIG_BIN=/usr/bin/gpg
|
2007-01-04 11:49:53 +00:00
|
|
|
|
|
|
|
# 1.4.11 tries to write to the cache directory during installation
|
|
|
|
# so it's not possible to set a sane default via the environment.
|
|
|
|
# The ${PWD} bit will be stripped via relocate.php later.
|
|
|
|
export PHP_PEAR_CACHE_DIR=${PWD}%{_localstatedir}/cache/php-pear
|
|
|
|
export PHP_PEAR_TEMP_DIR=/var/tmp
|
2005-12-01 17:12:57 +00:00
|
|
|
|
|
|
|
%{_bindir}/php -n -dshort_open_tag=0 -dsafe_mode=0 \
|
|
|
|
-derror_reporting=E_ALL -ddetect_unicode=0 \
|
2005-12-14 09:06:39 +00:00
|
|
|
%{SOURCE0} -d $RPM_BUILD_ROOT%{peardir} \
|
|
|
|
-b $RPM_BUILD_ROOT%{_bindir} \
|
|
|
|
%{SOURCE20}
|
2005-12-01 17:12:57 +00:00
|
|
|
|
2006-01-13 11:26:56 +00:00
|
|
|
pushd %{buildroot}%{peardir}
|
2006-05-08 09:33:59 +00:00
|
|
|
%{__patch} -p0 < %{PATCH0}
|
|
|
|
%{__patch} -p0 < %{PATCH1}
|
2006-01-13 11:26:56 +00:00
|
|
|
popd
|
|
|
|
|
2005-12-14 09:06:39 +00:00
|
|
|
# Replace /usr/bin/* with simple scripts:
|
2005-12-04 16:12:18 +00:00
|
|
|
for f in pecl pear peardev; do
|
|
|
|
install -m 755 $RPM_SOURCE_DIR/${f}.sh $RPM_BUILD_ROOT%{_bindir}/${f}
|
|
|
|
done
|
2005-12-01 17:12:57 +00:00
|
|
|
|
2006-02-28 13:46:12 +00:00
|
|
|
install -d $RPM_BUILD_ROOT%{_sysconfdir} \
|
2006-05-08 09:33:59 +00:00
|
|
|
$RPM_BUILD_ROOT%{_localstatedir}/cache/php-pear \
|
2006-07-13 12:19:37 +00:00
|
|
|
$RPM_BUILD_ROOT%{peardir}/.pkgxml \
|
|
|
|
$RPM_BUILD_ROOT%{_sysconfdir}/rpm
|
2005-12-01 17:12:57 +00:00
|
|
|
|
|
|
|
# Relocate everything:
|
|
|
|
sed -si "s,$RPM_BUILD_ROOT,,g" \
|
|
|
|
$RPM_BUILD_ROOT%{peardir}/*.php \
|
|
|
|
$RPM_BUILD_ROOT%{peardir}/*/*.php \
|
|
|
|
$RPM_BUILD_ROOT%{peardir}/*/*/*.php
|
|
|
|
|
2005-12-14 09:06:39 +00:00
|
|
|
# Sanitize the pear.conf
|
2007-01-04 11:49:53 +00:00
|
|
|
%{_bindir}/php -n %{SOURCE2} pear.conf $RPM_BUILD_ROOT |
|
|
|
|
%{_bindir}/php -n %{SOURCE2} php://stdin $PWD > new-pear.conf
|
2005-12-14 09:06:39 +00:00
|
|
|
%{_bindir}/php -n %{SOURCE3} new-pear.conf ext_dir > $RPM_BUILD_ROOT%{_sysconfdir}/pear.conf
|
2005-12-01 17:12:57 +00:00
|
|
|
|
|
|
|
for f in $RPM_BUILD_ROOT%{peardir}/.registry/*.reg; do
|
|
|
|
%{_bindir}/php -n %{SOURCE2} ${f} $RPM_BUILD_ROOT > ${f}.new
|
|
|
|
mv ${f}.new ${f}
|
|
|
|
done
|
|
|
|
|
2006-05-08 09:33:59 +00:00
|
|
|
install -m 644 -c $RPM_SOURCE_DIR/LICENSE .
|
|
|
|
|
2006-07-13 12:15:27 +00:00
|
|
|
install -m 644 -c $RPM_SOURCE_DIR/macros.pear \
|
|
|
|
$RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.pear
|
|
|
|
|
2005-12-01 17:12:57 +00:00
|
|
|
%check
|
2007-02-05 12:33:03 +00:00
|
|
|
# Check that no bogus paths are left in the configuration, or in
|
|
|
|
# the generated registry files.
|
2005-12-01 17:12:57 +00:00
|
|
|
grep $RPM_BUILD_ROOT $RPM_BUILD_ROOT%{_sysconfdir}/pear.conf && exit 1
|
2005-12-14 09:06:39 +00:00
|
|
|
grep %{_libdir} $RPM_BUILD_ROOT%{_sysconfdir}/pear.conf && exit 1
|
2007-01-04 11:49:53 +00:00
|
|
|
grep '"/tmp"' $RPM_BUILD_ROOT%{_sysconfdir}/pear.conf && exit 1
|
2007-02-05 12:33:03 +00:00
|
|
|
grep /usr/local $RPM_BUILD_ROOT%{_sysconfdir}/pear.conf && exit 1
|
|
|
|
grep -rl $RPM_BUILD_ROOT $RPM_BUILD_ROOT && exit 1
|
2005-12-01 17:12:57 +00:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
rm pear.conf
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{peardir}
|
|
|
|
%{_bindir}/*
|
2007-02-05 19:01:54 +00:00
|
|
|
%config(noreplace) %{_sysconfdir}/pear.conf
|
2006-07-14 13:21:27 +00:00
|
|
|
%config %{_sysconfdir}/rpm/macros.pear
|
2006-02-28 13:46:12 +00:00
|
|
|
%dir %{_localstatedir}/cache/php-pear
|
2006-05-08 09:33:59 +00:00
|
|
|
%doc LICENSE
|
2005-12-01 17:12:57 +00:00
|
|
|
|
|
|
|
%changelog
|
2007-02-05 19:01:54 +00:00
|
|
|
* Mon Feb 5 2007 Joe Orton <jorton@redhat.com> 1:1.4.11-4
|
|
|
|
- fix Group, mark pear.conf noreplace (#226295)
|
|
|
|
|
2007-02-05 12:33:03 +00:00
|
|
|
* Mon Feb 5 2007 Joe Orton <jorton@redhat.com> 1:1.4.11-3
|
|
|
|
- use BuildArch not BuildArchitectures (#226925)
|
|
|
|
- fix to use preferred BuildRoot (#226925)
|
|
|
|
- strip more buildroot-relative paths from *.reg
|
2007-02-05 12:38:18 +00:00
|
|
|
- force correct gpg path in default pear.conf
|
2007-02-05 12:33:03 +00:00
|
|
|
|
2007-01-04 11:49:53 +00:00
|
|
|
* Thu Jan 4 2007 Joe Orton <jorton@redhat.com> 1:1.4.11-2
|
|
|
|
- update to 1.4.11
|
|
|
|
|
2006-07-14 13:21:27 +00:00
|
|
|
* Fri Jul 14 2006 Joe Orton <jorton@redhat.com> 1:1.4.9-4
|
|
|
|
- update to XML_RPC-1.5.0
|
|
|
|
- really package macros.pear
|
|
|
|
|
2006-07-13 12:15:27 +00:00
|
|
|
* Thu Jul 13 2006 Joe Orton <jorton@redhat.com> 1:1.4.9-3
|
|
|
|
- require php-cli
|
|
|
|
- add /etc/rpm/macros.pear (Christopher Stone)
|
|
|
|
|
2006-07-12 07:49:07 +00:00
|
|
|
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1:1.4.9-2.1
|
|
|
|
- rebuild
|
|
|
|
|
2006-05-08 09:33:59 +00:00
|
|
|
* Mon May 8 2006 Joe Orton <jorton@redhat.com> 1:1.4.9-2
|
|
|
|
- update to 1.4.9 (thanks to Remi Collet, #183359)
|
|
|
|
- package /usr/share/pear/.pkgxml (#190252)
|
|
|
|
- update to XML_RPC-1.4.8
|
|
|
|
- bundle the v3.0 LICENSE file
|
|
|
|
|
2006-02-28 13:46:12 +00:00
|
|
|
* Tue Feb 28 2006 Joe Orton <jorton@redhat.com> 1:1.4.6-2
|
|
|
|
- set cache_dir directory, own /var/cache/php-pear
|
|
|
|
|
2006-01-30 15:47:59 +00:00
|
|
|
* Mon Jan 30 2006 Joe Orton <jorton@redhat.com> 1:1.4.6-1
|
|
|
|
- update to 1.4.6
|
|
|
|
- require php >= 5.1.0 (#178821)
|
|
|
|
|
2006-01-13 11:26:56 +00:00
|
|
|
* Fri Dec 30 2005 Tim Jackson <tim@timj.co.uk> 1:1.4.5-6
|
|
|
|
- Patches to fix "pear makerpm"
|
|
|
|
|
2005-12-14 09:06:39 +00:00
|
|
|
* Wed Dec 14 2005 Joe Orton <jorton@redhat.com> 1:1.4.5-5
|
|
|
|
- set default sig_keydir to /etc/pearkeys
|
|
|
|
- remove ext_dir setting from /etc/pear.conf (#175673)
|
|
|
|
|
2005-12-09 22:42:43 +00:00
|
|
|
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
|
|
|
|
- rebuilt
|
|
|
|
|
2005-12-06 17:40:15 +00:00
|
|
|
* Tue Dec 6 2005 Joe Orton <jorton@redhat.com> 1:1.4.5-4
|
|
|
|
- fix virtual provide for PEAR package (#175074)
|
|
|
|
|
2005-12-04 16:12:18 +00:00
|
|
|
* Sun Dec 4 2005 Joe Orton <jorton@redhat.com> 1:1.4.5-3
|
|
|
|
- fix /usr/bin/{pecl,peardev} (#174882)
|
|
|
|
|
2005-12-01 17:38:15 +00:00
|
|
|
* Thu Dec 1 2005 Joe Orton <jorton@redhat.com> 1:1.4.5-2
|
|
|
|
- add virtual provides (#173806)
|
|
|
|
|
2005-12-01 17:12:57 +00:00
|
|
|
* Wed Nov 23 2005 Joe Orton <jorton@redhat.com> 1.4.5-1
|
|
|
|
- initial build (Epoch: 1 to allow upgrade from php-pear-5.x)
|