189 lines
6.6 KiB
RPMSpec
189 lines
6.6 KiB
RPMSpec
#%define _peardir %{_datadir}/pear
|
|
%define peardir %{_libdir}/php
|
|
%global metadir %{_localstatedir}/lib/pear
|
|
%define xml_rpc_version 1.5.5
|
|
%define archive_tar_version 1.3.11
|
|
%define console_getopt_version 1.3.1
|
|
%define structures_graph_version 1.0.4
|
|
%define xml_util_version 1.2.1
|
|
Name: php-pear
|
|
Version: 1.9.4
|
|
Release: 2mamba
|
|
Summary: PHP Extension and Application Repository framework
|
|
Group: Development/Languages
|
|
Vendor: openmamba
|
|
Distribution: openmamba
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
URL: http://pear.php.net/package/PEAR
|
|
Source0: http://download.pear.php.net/package/PEAR-%{version}.tgz
|
|
# 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
|
|
Source10: pear.sh
|
|
Source11: pecl.sh
|
|
Source12: peardev.sh
|
|
Source13: macros.pear
|
|
Source20: http://pear.php.net/get/XML_RPC-%{xml_rpc_version}.tgz
|
|
Source21: http://pear.php.net/get/Archive_Tar-%{archive_tar_version}.tgz
|
|
Source22: http://pear.php.net/get/Console_Getopt-%{console_getopt_version}.tgz
|
|
Source23: http://pear.php.net/get/Structures_Graph-%{structures_graph_version}.tgz
|
|
Source24: http://pear.php.net/get/XML_Util-%{xml_util_version}.tgz
|
|
License: BSD, LGPL, PHP
|
|
## AUTOBUILDREQ-BEGIN
|
|
## AUTOBUILDREQ-END
|
|
BuildRequires: gnupg
|
|
BuildRequires: php
|
|
Provides: php-pear(PEAR) = %{version}
|
|
Provides: php-pear(XML_RPC) = %{xml_rpc_version}
|
|
Provides: php-pear(Archive_Tar) = %{archive_tar_version}
|
|
Provides: php-pear(Console_Getopt) = %{console_getopt_version}
|
|
Provides: php-pear(Structures_Graph) = %{structures_graph_version}
|
|
Provides: php-pear(XML_Util) = %{xml_util_version}
|
|
Requires: php
|
|
Provides: php-PEAR
|
|
Obsoletes: php-PEAR
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
%description
|
|
PEAR is a framework and distribution system for reusable PHP components. This package contains the basic PEAR components.
|
|
|
|
%prep
|
|
%setup -q -c -n PEAR-%{version} -T
|
|
|
|
for p in %{SOURCE0} %{SOURCE21} %{SOURCE22} %{SOURCE23} %{SOURCE24} ; do
|
|
tar xzf $p --strip-components 1 || tar xzf $p --strip-path 1
|
|
fp=${p##*/}
|
|
[ -f LICENSE ] && mv LICENSE LICENSE-${fp%%-*}
|
|
[ -f README ] && mv README README-${fp%%-*}
|
|
done
|
|
tar xzf %{SOURCE24} package.xml
|
|
mv package.xml XML_Util.xml
|
|
|
|
%build
|
|
|
|
%install
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
export PHP_PEAR_SYSCONF_DIR=%{_sysconfdir}/php
|
|
export PHP_PEAR_SIG_KEYDIR=%{_sysconfdir}/php/pearkeys
|
|
export PHP_PEAR_SIG_BIN=%{_bindir}/gpg
|
|
export PHP_PEAR_INSTALL_DIR=%{peardir}
|
|
|
|
export PHP_PEAR_CACHE_DIR=${PWD}%{_localstatedir}/cache/php-pear
|
|
export PHP_PEAR_TEMP_DIR=/var/tmp
|
|
|
|
install -d %{buildroot}%{peardir} \
|
|
%{buildroot}%{_localstatedir}/cache/php-pear \
|
|
%{buildroot}%{_localstatedir}/www/html \
|
|
%{buildroot}%{peardir}/.pkgxml \
|
|
%{buildroot}%{_sysconfdir}/rpm \
|
|
%{buildroot}%{_sysconfdir}/php
|
|
|
|
export INSTALL_ROOT=%{buildroot}
|
|
|
|
%{_bindir}/php -n -dmemory_limit=64M -dshort_open_tag=0 -dsafe_mode=0 \
|
|
-derror_reporting="E_ALL&\~E_DEPRECATED" -ddetect_unicode=0 \
|
|
%{SOURCE1} --force \
|
|
--dir %{peardir} \
|
|
--cache %{_localstatedir}/cache/php-pear \
|
|
--config %{_sysconfdir}/php \
|
|
--bin %{_bindir} \
|
|
--www %{_localstatedir}/www/html \
|
|
--doc %{_docdir}/pear \
|
|
--test %{_datadir}/tests/pear \
|
|
--data %{_datadir}/pear-data \
|
|
--metadata %{metadir} \
|
|
%{SOURCE0} %{SOURCE21} %{SOURCE22} %{SOURCE23} %{SOURCE24} %{SOURCE20}
|
|
|
|
install -D -m 755 %{SOURCE10} %{buildroot}%{_bindir}/pear
|
|
install -m 755 %{SOURCE11} %{buildroot}%{_bindir}/pecl
|
|
install -m 755 %{SOURCE12} %{buildroot}%{_bindir}/peardev
|
|
|
|
sed -i "s|@LIBDIR@|%{_libdir}|g" \
|
|
%{buildroot}%{_bindir}/pear \
|
|
%{buildroot}%{_bindir}/pecl \
|
|
%{buildroot}%{_bindir}/peardev
|
|
|
|
# Sanitize the pear.conf
|
|
%{_bindir}/php %{SOURCE3} %{buildroot}%{_sysconfdir}/php/pear.conf ext_dir >new-pear.conf
|
|
%{_bindir}/php %{SOURCE3} new-pear.conf http_proxy > %{buildroot}%{_sysconfdir}/php/pear.conf
|
|
|
|
%{_bindir}/php -r "print_r(unserialize(substr(file_get_contents('%{buildroot}%{_sysconfdir}/php/pear.conf'),17)));"
|
|
|
|
#%{_bindir}/php -n %{SOURCE2} %{buildroot}%{_sysconfdir}/php/pear.conf %{buildroot} |
|
|
#%{_bindir}/php -n %{SOURCE2} php://stdin $PWD > new-pear.conf
|
|
#%{_bindir}/php -n %{SOURCE3} new-pear.conf ext_dir |
|
|
#%{_bindir}/php -n %{SOURCE3} php://stdin http_proxy > %{buildroot}%{_sysconfdir}/php/pear.conf
|
|
#
|
|
#%{_bindir}/php -r "print_r(unserialize(substr(file_get_contents('%{buildroot}%{_sysconfdir}/php/pear.conf'),17)));"
|
|
|
|
install -m 644 -c %{SOURCE13} %{buildroot}%{_sysconfdir}/rpm/macros.pear
|
|
|
|
pushd %{buildroot}%{peardir}
|
|
# -- no patch
|
|
popd
|
|
|
|
rm -rf %{buildroot}/.depdb* %{buildroot}/.lock %{buildroot}/.channels %{buildroot}/.filemap
|
|
|
|
install -m 644 XML_Util.xml %{buildroot}%{peardir}/.pkgxml/
|
|
|
|
%check
|
|
grep %{buildroot} %{buildroot}%{_sysconfdir}/php/pear.conf && exit 1
|
|
#grep %{_libdir} %{buildroot}%{_sysconfdir}/php/pear.conf && exit 1
|
|
grep '"/tmp"' %{buildroot}%{_sysconfdir}/php/pear.conf && exit 1
|
|
grep /usr/local %{buildroot}%{_sysconfdir}/php/pear.conf && exit 1
|
|
grep -rl %{buildroot} %{buildroot} && exit 1
|
|
|
|
%clean
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
rm new-pear.conf
|
|
|
|
%triggerpostun -- php-pear-XML-Util
|
|
%{_bindir}/pear install --nodeps --soft --force --register-only %{pear_xmldir}/XML_Util.xml >/dev/null || :
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%config(noreplace) %{_sysconfdir}/php/pear.conf
|
|
%config %{_sysconfdir}/rpm/macros.pear
|
|
%dir %{_localstatedir}/cache/php-pear
|
|
%dir %{_localstatedir}/www/html
|
|
%{_bindir}/pear
|
|
%{_bindir}/peardev
|
|
%{_bindir}/pecl
|
|
%dir %{peardir}
|
|
%{peardir}/*
|
|
%dir %{peardir}/.channels
|
|
%{peardir}/.channels/*
|
|
%dir %{peardir}/.channels/.alias
|
|
%{peardir}/.channels/.alias/*
|
|
%dir %{peardir}/.pkgxml
|
|
%{peardir}/.pkgxml/*
|
|
%dir %{peardir}/.registry
|
|
%{peardir}/.registry/*
|
|
%{peardir}/.depdb
|
|
%{peardir}/.depdblock
|
|
%{peardir}/.filemap
|
|
%{peardir}/.lock
|
|
%dir %{_datadir}/pear-data
|
|
%dir %{_datadir}/pear-data/PEAR
|
|
%{_datadir}/pear-data/PEAR/package.dtd
|
|
%{_datadir}/pear-data/PEAR/template.spec
|
|
%dir %{_datadir}/pear-data/Structures_Graph
|
|
%{_datadir}/pear-data/Structures_Graph/LICENSE
|
|
%dir %{_datadir}/tests/pear
|
|
%{_datadir}/tests/pear/*
|
|
%dir %{_datadir}/doc/pear
|
|
%{_datadir}/doc/pear/*
|
|
%doc LICENSE*
|
|
#README*
|
|
|
|
%changelog
|
|
* Sun Jun 15 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 1.9.4-2mamba
|
|
- fix php libdir path for x86_64
|
|
|
|
* Mon Mar 18 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 1.9.4-1mamba
|
|
- update to 1.9.4
|
|
|
|
* Sat Jul 24 2010 gil <puntogil@libero.it> 1.9.0-1mamba
|
|
- package created by autospec
|