php-pear/php-pear.spec

319 lines
11 KiB
RPMSpec
Raw Normal View History

2009-05-30 08:19:19 +00:00
%global peardir %{_datadir}/pear
2010-07-05 17:03:07 +00:00
%global xmlrpcver 1.5.4
2009-05-30 08:19:19 +00:00
%global getoptver 1.2.3
%global arctarver 1.3.7
%global structver 1.0.3
2009-05-30 08:19:19 +00:00
%global xmlutil 1.2.1
2005-12-01 17:38:15 +00:00
Summary: PHP Extension and Application Repository framework
Name: php-pear
2010-05-27 13:24:08 +00:00
Version: 1.9.1
2010-09-10 15:45:45 +00:00
Release: 4%{?dist}
Epoch: 1
# PEAR, Archive_Tar, XML_Util are BSD
# XML-RPC, Console_Getopt are PHP
2010-09-10 15:45:45 +00:00
# Structures_Graph is LGPLv2+
License: BSD and PHP and LGPLv2+
Group: Development/Languages
URL: http://pear.php.net/package/PEAR
Source0: http://download.pear.php.net/package/PEAR-%{version}.tgz
2009-05-30 08:19:19 +00:00
# wget http://cvs.php.net/viewvc.cgi/pear-core/install-pear.php?revision=1.39 -O install-pear.php
Source1: install-pear.php
Source2: relocate.php
Source3: strip.php
2010-09-10 15:45:45 +00:00
Source4: LICENSE-XML_RPC
Source10: pear.sh
Source11: pecl.sh
Source12: peardev.sh
Source13: macros.pear
Source20: http://pear.php.net/get/XML_RPC-%{xmlrpcver}.tgz
Source21: http://pear.php.net/get/Archive_Tar-%{arctarver}.tgz
Source22: http://pear.php.net/get/Console_Getopt-%{getoptver}.tgz
Source23: http://pear.php.net/get/Structures_Graph-%{structver}.tgz
2009-05-30 08:19:19 +00:00
Source24: http://pear.php.net/get/XML_Util-%{xmlutil}.tgz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: php-cli >= 5.1.0-1, php-xml, gnupg
Provides: php-pear(Console_Getopt) = %{getoptver}
Provides: php-pear(Archive_Tar) = %{arctarver}
Provides: php-pear(PEAR) = %{version}
Provides: php-pear(Structures_Graph) = %{structver}
2005-12-01 17:38:15 +00:00
Provides: php-pear(XML_RPC) = %{xmlrpcver}
2009-05-30 08:19:19 +00:00
Provides: php-pear(XML_Util) = %{xmlutil}
Obsoletes: php-pear-XML-Util <= %{xmlutil}
Provides: php-pear-XML-Util = %{xmlutil}-%{release}
Requires: php-cli >= 5.1.0-1, php-devel
%description
PEAR is a framework and distribution system for reusable PHP
components. This package contains the basic PEAR components.
%prep
%setup -cT
# Create a usable PEAR directory (used by install-pear.php)
2009-05-30 08:19:19 +00:00
for archive in %{SOURCE0} %{SOURCE21} %{SOURCE22} %{SOURCE23} %{SOURCE24}
do
2008-02-03 17:45:23 +00:00
tar xzf $archive --strip-components 1 || tar xzf $archive --strip-path 1
file=${archive##*/}
[ -f LICENSE ] && mv LICENSE LICENSE-${file%%-*}
[ -f README ] && mv README README-${file%%-*}
done
2009-05-30 08:19:19 +00:00
tar xzf %{SOURCE24} package.xml
mv package.xml XML_Util.xml
2007-09-09 19:35:42 +00:00
# apply patches on used PEAR during install
# -- no patch
%build
# This is an empty build section.
%install
rm -rf $RPM_BUILD_ROOT
export PHP_PEAR_SYSCONF_DIR=%{_sysconfdir}
export PHP_PEAR_SIG_KEYDIR=%{_sysconfdir}/pearkeys
export PHP_PEAR_SIG_BIN=%{_bindir}/gpg
export PHP_PEAR_INSTALL_DIR=%{peardir}
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
install -d $RPM_BUILD_ROOT%{peardir} \
$RPM_BUILD_ROOT%{_localstatedir}/cache/php-pear \
2009-05-30 08:19:19 +00:00
$RPM_BUILD_ROOT%{_localstatedir}/www/html \
2006-07-13 12:19:37 +00:00
$RPM_BUILD_ROOT%{peardir}/.pkgxml \
$RPM_BUILD_ROOT%{_sysconfdir}/rpm \
$RPM_BUILD_ROOT%{_sysconfdir}/pear
export INSTALL_ROOT=$RPM_BUILD_ROOT
2007-08-21 11:34:25 +00:00
%{_bindir}/php -n -dmemory_limit=32M -dshort_open_tag=0 -dsafe_mode=0 \
-derror_reporting=E_ALL -ddetect_unicode=0 \
%{SOURCE1} -d %{peardir} \
-c %{_sysconfdir}/pear \
-b %{_bindir} \
2009-05-30 08:19:19 +00:00
-w %{_localstatedir}/www/html \
%{SOURCE0} %{SOURCE21} %{SOURCE22} %{SOURCE23} %{SOURCE24} %{SOURCE20}
# Replace /usr/bin/* with simple scripts:
install -m 755 %{SOURCE10} $RPM_BUILD_ROOT%{_bindir}/pear
install -m 755 %{SOURCE11} $RPM_BUILD_ROOT%{_bindir}/pecl
install -m 755 %{SOURCE12} $RPM_BUILD_ROOT%{_bindir}/peardev
# Sanitize the pear.conf
%{_bindir}/php -n %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/pear.conf $RPM_BUILD_ROOT |
2007-01-04 11:49:53 +00:00
%{_bindir}/php -n %{SOURCE2} php://stdin $PWD > new-pear.conf
2008-02-01 17:30:35 +00:00
%{_bindir}/php -n %{SOURCE3} new-pear.conf ext_dir |
%{_bindir}/php -n %{SOURCE3} php://stdin http_proxy > $RPM_BUILD_ROOT%{_sysconfdir}/pear.conf
%{_bindir}/php -r "print_r(unserialize(substr(file_get_contents('$RPM_BUILD_ROOT%{_sysconfdir}/pear.conf'),17)));"
2010-09-10 15:45:45 +00:00
install -m 644 -c %{SOURCE4} LICENSE-XML_RPC
install -m 644 -c %{SOURCE13} \
$RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.pear
2007-09-09 19:35:42 +00:00
# apply patches on installed PEAR tree
2009-05-30 08:19:19 +00:00
pushd $RPM_BUILD_ROOT%{peardir}
2007-09-09 19:35:42 +00:00
# -- no patch
2009-05-30 08:19:19 +00:00
popd
# Why this file here ?
rm -rf $RPM_BUILD_ROOT/.depdb* $RPM_BUILD_ROOT/.lock $RPM_BUILD_ROOT/.channels $RPM_BUILD_ROOT/.filemap
2009-05-30 08:19:19 +00:00
# Need for re-registrying XML_Util
install -m 644 XML_Util.xml $RPM_BUILD_ROOT%{peardir}/.pkgxml/
%check
# Check that no bogus paths are left in the configuration, or in
# the generated registry files.
grep $RPM_BUILD_ROOT $RPM_BUILD_ROOT%{_sysconfdir}/pear.conf && exit 1
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
grep /usr/local $RPM_BUILD_ROOT%{_sysconfdir}/pear.conf && exit 1
grep -rl $RPM_BUILD_ROOT $RPM_BUILD_ROOT && exit 1
2009-05-30 08:19:19 +00:00
%clean
rm -rf $RPM_BUILD_ROOT
rm new-pear.conf
2009-05-30 08:19:19 +00:00
%triggerpostun -- php-pear-XML-Util
# re-register extension unregistered during postun of obsoleted php-pear-XML-Util
%{_bindir}/pear install --nodeps --soft --force --register-only %{pear_xmldir}/XML_Util.xml >/dev/null || :
%files
%defattr(-,root,root,-)
%{peardir}
%{_bindir}/*
%config(noreplace) %{_sysconfdir}/pear.conf
%config %{_sysconfdir}/rpm/macros.pear
%dir %{_localstatedir}/cache/php-pear
2009-05-30 08:19:19 +00:00
%dir %{_localstatedir}/www/html
%dir %{_sysconfdir}/pear
%doc README* LICENSE*
2009-05-30 08:19:19 +00:00
%changelog
2010-09-10 15:45:45 +00:00
* Fri Sep 10 2010 Joe Orton <jorton@redhat.com> - 1:1.9.1-4
- ship LICENSE file for XML_RPC
* Fri Sep 10 2010 Joe Orton <jorton@redhat.com> - 1:1.9.1-3
- require php-devel (without which pecl doesn't work)
2010-07-05 17:03:07 +00:00
* Mon Jul 05 2010 Remi Collet <Fedora@FamilleCollet.com> 1:1.9.1-2
- update to XML_RPC-1.5.4
2010-05-27 13:24:08 +00:00
* Thu May 27 2010 Remi Collet <Fedora@FamilleCollet.com> 1:1.9.1-1
- update to 1.9.1
* Thu Apr 29 2010 Remi Collet <Fedora@FamilleCollet.com> 1:1.9.0-5
- update to Archive_Tar-1.3.7 (only metadata fix)
2010-03-09 14:24:19 +00:00
* Tue Mar 09 2010 Remi Collet <Fedora@FamilleCollet.com> 1:1.9.0-4
- update to Archive_Tar-1.3.6
2010-01-16 09:05:01 +00:00
* Sat Jan 16 2010 Remi Collet <Fedora@FamilleCollet.com> 1:1.9.0-3
- update to XML_RPC-1.5.3
- fix licenses (multiple)
- provide bundled LICENSE files
* Fri Jan 01 2010 Remi Collet <Fedora@FamilleCollet.com> 1:1.9.0-2
- update to Archive_Tar-1.3.5, Structures_Graph-1.0.3
2009-09-05 05:35:05 +00:00
* Sat Sep 05 2009 Remi Collet <Fedora@FamilleCollet.com> 1:1.9.0-1
- update to PEAR 1.9.0, XML_RPC 1.5.2
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.8.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
2009-05-30 08:19:19 +00:00
* Sat May 30 2009 Remi Collet <Fedora@FamilleCollet.com> 1:1.8.1-1
- update to 1.8.1
- Update install-pear.php script (1.39)
- add XML_Util
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.7.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
2008-05-18 06:45:15 +00:00
* Sun May 18 2008 Remi Collet <Fedora@FamilleCollet.com> 1:1.7.2-2
- revert to install-pear.php script 1.31 (for cfg_dir)
2008-05-18 06:16:04 +00:00
* Sun May 18 2008 Remi Collet <Fedora@FamilleCollet.com> 1:1.7.2-1
- update to 1.7.2
- Update install-pear.php script (1.32)
* Tue Mar 11 2008 Tim Jackson <rpm@timj.co.uk> 1:1.7.1-2
2009-05-30 08:19:19 +00:00
- Set cfg_dir to be %%{_sysconfdir}/pear (and own it)
- Update install-pear.php script
- Add %%pear_cfgdir and %%pear_wwwdir macros
2008-02-03 17:45:23 +00:00
* Sun Feb 3 2008 Remi Collet <Fedora@FamilleCollet.com> 1:1.7.1-1
- update to 1.7.1
2008-02-01 17:30:35 +00:00
* Fri Feb 1 2008 Remi Collet <Fedora@FamilleCollet.com> 1:1.7.0-1
- update to 1.7.0
2007-10-04 12:05:41 +00:00
* Thu Oct 4 2007 Joe Orton <jorton@redhat.com> 1:1.6.2-2
- require php-cli not php
2007-09-09 19:35:42 +00:00
* Sun Sep 9 2007 Remi Collet <Fedora@FamilleCollet.com> 1:1.6.2-1
- update to 1.6.2
- remove patches merged upstream
- Fix : "pear install" hangs on non default channel (#283401)
2007-08-21 11:34:25 +00:00
* Tue Aug 21 2007 Joe Orton <jorton@redhat.com> 1:1.6.1-2
- fix License
* Thu Jul 19 2007 Remi Collet <Fedora@FamilleCollet.com> 1:1.6.1-1
- update to PEAR-1.6.1 and Console_Getopt-1.2.3
* Thu Jul 19 2007 Remi Collet <Fedora@FamilleCollet.com> 1:1.5.4-5
- new SPEC using install-pear.php instead of install-pear-nozlib-1.5.4.phar
* Mon Jul 16 2007 Remi Collet <Fedora@FamilleCollet.com> 1:1.5.4-4
- update macros.pear (without define)
* Mon Jul 16 2007 Joe Orton <jorton@redhat.com> 1:1.5.4-3
- add pecl_{un,}install macros to macros.pear (from Remi)
2007-05-11 13:36:34 +00:00
* Fri May 11 2007 Joe Orton <jorton@redhat.com> 1:1.5.4-2
- update to 1.5.4
* Tue Mar 6 2007 Joe Orton <jorton@redhat.com> 1:1.5.0-3
- add redundant build section (#226295)
- BR php-cli not php (#226295)
* Mon Feb 19 2007 Joe Orton <jorton@redhat.com> 1:1.5.0-2
- update builtin module provides (Remi Collet, #226295)
- drop patch 0
2007-02-15 15:53:26 +00:00
* Thu Feb 15 2007 Joe Orton <jorton@redhat.com> 1:1.5.0-1
- update to 1.5.0
* Mon Feb 5 2007 Joe Orton <jorton@redhat.com> 1:1.4.11-4
- fix Group, mark pear.conf noreplace (#226295)
* 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
- force correct gpg path in default pear.conf
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
* 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
* 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
* 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
* Tue Feb 28 2006 Joe Orton <jorton@redhat.com> 1:1.4.6-2
- set cache_dir directory, own /var/cache/php-pear
* 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"
* 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
* Tue Dec 6 2005 Joe Orton <jorton@redhat.com> 1:1.4.5-4
- fix virtual provide for PEAR package (#175074)
* 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)
* 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)