%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}} %global pear_name Mail_mimeDecode Name: php-pear-Mail-mimeDecode Version: 1.5.4 Release: 1%{?dist} Summary: Class to decode mime messages Group: Development/Libraries License: BSD URL: http://pear.php.net/package/Mail_mimeDecode Source0: http://pear.php.net/get/%{pear_name}-%{version}.tgz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: php-pear >= 1:1.6.0 # BR for tests BuildRequires: php-pear(Mail_Mime) > 1.4.0 Requires: php-pear(PEAR) >= 1.6.0 Requires: php-pear(Mail_Mime) > 1.4.0 Requires(post): %{__pear} Requires(postun): %{__pear} Provides: php-pear(%{pear_name}) = %{version} %description Provides a class to deal with the decoding and interpreting of mime messages. This package used to be part of the Mail_Mime package, but has been split off. To run post-installation tests, execute: pear run-tests -p Mail_mimeDecode %prep %setup -q -c # Create a "localized" php.ini to avoid build warning cp /etc/php.ini . echo "date.timezone=UTC" >>php.ini cd %{pear_name}-%{version} # Package.xml is V2 mv ../package.xml %{name}.xml # Empty build section, nothing required %build %install rm -rf %{buildroot} docdir cd %{pear_name}-%{version} PHPRC=../php.ini %{__pear} install \ --nodeps \ --packagingroot %{buildroot} %{name}.xml # Clean up unnecessary files rm -rf %{buildroot}%{pear_phpdir}/.??* # Install XML package description mkdir -p %{buildroot}%{pear_xmldir} install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir} %check cd %{pear_name}-%{version} # Sanity check lst=$(find %{buildroot}%{pear_xmldir} -exec grep -q %{buildroot} {} \; -print) [ ! -z "$lst" ] && echo "Reference to BUILDROOT in $lst" && exit 1; # Test suite PHPRC=../php.ini %{__pear} run-tests \ -i "-d include_path=%{buildroot}%{pear_phpdir}:%{pear_phpdir}" \ tests %clean rm -rf %{buildroot} %post %{__pear} install --nodeps --soft --force --register-only %{pear_xmldir}/%{name}.xml >/dev/null ||: %postun # if refcount = 0 then package has been removed (not upgraded) if [ "$1" -eq "0" ]; then %{__pear} uninstall --nodeps --ignore-errors --register-only %{pear_name} >/dev/null ||: fi %files %defattr(-,root,root,-) %{pear_xmldir}/%{name}.xml %{pear_testdir}/%{pear_name} %{pear_phpdir}/Mail/mimeDecode.php %changelog * Tue Sep 14 2010 Remi Collet <Fedora@FamilleCollet.com> 1.5.4-1 - update to 1.5.4 (Critical Security release) * Sun Sep 05 2010 Remi Collet <Fedora@FamilleCollet.com> 1.5.3-1 - update to 1.5.3 (Major Bugfix release) - define pear_name macro - set date.timezone during build - run test during %%check * Thu Dec 03 2009 Remi Collet <Fedora@FamilleCollet.com> 1.5.1-1 - update to 1.5.1 - rename Mail_mimeDecode.xml to php-pear-Mail-mimeDecode.xml * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Sun Mar 30 2008 Brandon Holbrook <fedora at theholbrooks.org> 1.5.0-3 - Re-Corrected license :) * Wed Mar 26 2008 Brandon Holbrook <fedora at theholbrooks.org> 1.5.0-2 - Corrected license - No longer own pear_datadir/Mail * Thu Dec 6 2007 Brandon Holbrook <fedora at theholbrooks.org> 1.5.0-1 - Initial Build