move data to /usr/share/pear-data

This commit is contained in:
remi 2012-08-19 07:36:09 +02:00
parent c1e9a57e37
commit 0b5a555e7c

View File

@ -14,7 +14,7 @@
Summary: PHP Extension and Application Repository framework
Name: php-pear
Version: 1.9.4
Release: 10%{?dist}
Release: 11%{?dist}
Epoch: 1
# PEAR, Archive_Tar, XML_Util are BSD
# Console_Getopt is PHP
@ -70,9 +70,11 @@ do
file=${archive##*/}
[ -f LICENSE ] && mv LICENSE LICENSE-${file%%-*}
[ -f README ] && mv README README-${file%%-*}
tar xzf $archive 'package*xml'
[ -f package2.xml ] && mv package2.xml ${file%%-*}.xml \
|| mv package.xml ${file%%-*}.xml
done
tar xzf %{SOURCE24} package.xml
mv package.xml XML_Util.xml
# apply patches on used PEAR during install
# -- no patch
@ -110,7 +112,8 @@ export INSTALL_ROOT=$RPM_BUILD_ROOT
--bin %{_bindir} \
--www %{_localstatedir}/www/html \
--doc %{_docdir}/pear \
--test %{_datarootdir}/tests/pear \
--test %{_datadir}/tests/pear \
--data %{_datadir}/pear-data \
%{SOURCE0} %{SOURCE21} %{SOURCE22} %{SOURCE23} %{SOURCE24}
# Replace /usr/bin/* with simple scripts:
@ -141,7 +144,7 @@ popd
rm -rf $RPM_BUILD_ROOT/.depdb* $RPM_BUILD_ROOT/.lock $RPM_BUILD_ROOT/.channels $RPM_BUILD_ROOT/.filemap
# Need for re-registrying XML_Util
install -m 644 XML_Util.xml $RPM_BUILD_ROOT%{_localstatedir}/lib/pear/pkgxml
install -m 644 *.xml $RPM_BUILD_ROOT%{_localstatedir}/lib/pear/pkgxml
%check
@ -178,8 +181,13 @@ rm new-pear.conf
%post
# force new value as pear.conf is (noreplace)
%{_bindir}/pear config-set test_dir \
%{_datarootdir}/tests/pear system >/dev/null || :
%{_bindir}/pear config-set \
test_dir %{_datadir}/tests/pear \
system >/dev/null || :
%{_bindir}/pear config-set \
data_dir %{_datadir}/pear-data \
system >/dev/null || :
%triggerpostun -- php-pear-XML-Util
@ -200,12 +208,17 @@ rm new-pear.conf
%doc README* LICENSE*
%dir %{_docdir}/pear
%doc %{_docdir}/pear/*
%dir %{_datarootdir}/tests
%{_datarootdir}/tests/pear
%dir %{_datadir}/tests
%{_datadir}/tests/pear
%{_datadir}/pear-data
%{_localstatedir}/lib/pear
%changelog
* Sun Aug 19 2012 Remi Collet <remi@fedoraproject.org> 1:1.9.4-11
- move data to /usr/share/pear-data
- provides all package.xml
* Tue Aug 15 2012 Remi Collet <remi@fedoraproject.org> 1:1.9.4-10
- enforce test_dir on update