%define upstream_name Mail_IMAPv2 %define xmldir %{_var}/lib/pear %define peardir %(pear config-get php_dir 2> /dev/null) Name: php-pear-%{upstream_name} Version: 0.2.1 Release: %mkrel 2 Summary: Provides a c-client backend for webmail License: PHP Group: Development/PHP Source0: http://pear.php.net/get/Mail_IMAPv2-%{version}.tgz URL: http://pear.php.net/package/Mail_IMAPv2 BuildRequires: php-pear >= 1.4.7 BuildArch: noarch %description Mail_IMAPv2 provides a simplified backend for working with the c-client (IMAP) extension. It serves as an OO wrapper for commonly used c-client functions. It provides structure and header parsing as well as body retrieval. Mail_IMAPv2 provides a simple inbox example that demonstrates its ability to parse and view simple and multipart email messages. Mail_IMAPv2 also provides a connection wizard to determine the correct protocol and port settings for a remote mail server, all you need to provide is a server, a username and a password. Mail_IMAPv2 may be used as a webmail backend or as a component in a mailing list manager. This package requires the c-client extension. To download the latest version of the c-client extension goto: http://www.php.net/imap. %prep %setup -c -T pear -v -c pearrc \ -d php_dir=%{peardir} \ -d doc_dir=/docs \ -d bin_dir=%{_bindir} \ -d data_dir=%{peardir}/data \ -d test_dir=%{peardir}/tests \ -d ext_dir=%{_libdir} \ -s %build %install rm -rf %{buildroot} pear -c pearrc install --nodeps --packagingroot %{buildroot} %{SOURCE0} # Clean up unnecessary files rm pearrc rm %{buildroot}/%{peardir}/.filemap rm %{buildroot}/%{peardir}/.lock rm -rf %{buildroot}/%{peardir}/.registry rm -rf %{buildroot}%{peardir}/.channels rm %{buildroot}%{peardir}/.depdb rm %{buildroot}%{peardir}/.depdblock # Install XML package description mkdir -p %{buildroot}%{xmldir} tar -xzf %{SOURCE0} package.xml cp -p package.xml %{buildroot}%{xmldir}/Mail_IMAPv2.xml %clean rm -rf %{buildroot} %post pear install --nodeps --soft --force --register-only %{xmldir}/Mail_IMAPv2.xml %postun if [ "$1" -eq "0" ]; then pear uninstall --nodeps --ignore-errors --register-only pear.php.net/Mail_IMAPv2 fi %files %defattr(-,root,root) %{peardir}/* %{xmldir}/Mail_IMAPv2.xml %changelog * Sun Jan 13 2013 umeabot <umeabot> 0.2.1-2.mga3 + Revision: 376819 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Tue Mar 06 2012 spuhler <spuhler> 0.2.1-1.mga2 + Revision: 219580 - upgrade to 0.2.1 pearized spec * Sat Jan 29 2011 spuhler <spuhler> 0.2.0-6.mga1 + Revision: 43147 - removed buildroot definition from .spec removed the if mdkversion lines - imported package php-pear-Mail_IMAPv2