%define _class Translation %define _status stable %define _pearname %{_class} Summary: %{_pearname} - class for creating multilingual websites Name: php-pear-%{_pearname} Version: 1.2.6pl1 Release: %mkrel 8 License: PHP License Group: Development/PHP Source0: http://pear.php.net/get/%{_pearname}-%{version}.tar.bz2 URL: http://pear.php.net/package/Translation/ Requires(post): php-pear Requires(preun): php-pear Requires: php-pear BuildArch: noarch BuildRequires: dos2unix BuildRequires: recode BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot %description Class allows to store and retrieve all the strings on multilingual site in the database. Class connects to any database using PHP PEAR extension. The object should be created for every page. While creation all the strings connected with specific page and the strings connected with all the pages on the site are loaded into variable, so access to them is quite fast and does not overload database server connection. In PEAR status of this package is: %{_status}. %prep %setup -q -c find . -type d -perm 0700 -exec chmod 755 {} \; find . -type f -perm 0555 -exec chmod 755 {} \; find . -type f -perm 0444 -exec chmod 644 {} \; for i in `find . -type d -name CVS` `find . -type f -name .cvs\*` `find . -type f -name .#\*`; do if [ -e "$i" ]; then rm -rf $i; fi >&/dev/null done # strip away annoying ^M find -type f | grep -v ".gif" | grep -v ".png" | grep -v ".jpg" | xargs dos2unix -U # fix bad xml recode -d latin-1..html < package.xml > package.xml~ mv package.xml~ package.xml %install rm -rf %{buildroot} install -d %{buildroot}%{_datadir}/pear/%{_class} install %{_pearname}-%{version}/*.php %{buildroot}%{_datadir}/pear/%{_class} install -d %{buildroot}%{_datadir}/pear/packages install -m0644 package.xml %{buildroot}%{_datadir}/pear/packages/%{_pearname}.xml %post if [ "$1" = "1" ]; then if [ -x %{_bindir}/pear -a -f %{_datadir}/pear/packages/%{_pearname}.xml ]; then %{_bindir}/pear install --nodeps -r %{_datadir}/pear/packages/%{_pearname}.xml fi fi if [ "$1" = "2" ]; then if [ -x %{_bindir}/pear -a -f %{_datadir}/pear/packages/%{_pearname}.xml ]; then %{_bindir}/pear upgrade -f --nodeps -r %{_datadir}/pear/packages/%{_pearname}.xml fi fi %preun if [ "$1" = 0 ]; then if [ -x %{_bindir}/pear -a -f %{_datadir}/pear/packages/%{_pearname}.xml ]; then %{_bindir}/pear uninstall --nodeps -r %{_pearname} fi fi %clean rm -rf %{buildroot} %files %defattr(644,root,root,755) %doc %{_pearname}-%{version}/docs/* %dir %{_datadir}/pear/%{_class} %{_datadir}/pear/%{_class}/*.php %{_datadir}/pear/packages/%{_pearname}.xml %changelog * Sat Nov 11 2006 Oden Eriksson <oeriksson@mandriva.com> 1.2.6pl1-8mdv2007.0 + Revision: 82763 - Import php-pear-Translation * Fri Feb 10 2006 Oden Eriksson <oeriksson@mandriva.com> 1.2.6pl1-8mdk - new group (Development/PHP) * Fri Aug 26 2005 Oden Eriksson <oeriksson@mandriva.com> 1.2.6pl1-7mdk - rebuilt to fix auto deps * Wed Aug 10 2005 Oden Eriksson <oeriksson@mandriva.com> 1.2.6pl1-6mdk - rebuilt to use new pear auto deps/reqs from pld * Sun Jul 31 2005 Oden Eriksson <oeriksson@mandriva.com> 1.2.6pl1-5mdk - fix deps * Fri Jul 22 2005 Oden Eriksson <oeriksson@mandriva.com> 1.2.6pl1-4mdk - fix the package.xml file so it will register * Thu Jul 21 2005 Oden Eriksson <oeriksson@mandriva.com> 1.2.6pl1-3mdk - reworked the %%post and %%preun stuff, like in conectiva - fix deps * Wed Jul 20 2005 Oden Eriksson <oeriksson@mandriva.com> 1.2.6pl1-2mdk - fix deps * Tue Jul 19 2005 Oden Eriksson <oeriksson@mandriva.com> 1.2.6pl1-1mdk - initial Mandriva package (PLD import)