%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}} %define pear_name Console_Color Name: php-pear-Console-Color Version: 1.0.2 Release: 4%{?dist} Summary: Easily use ANSI console colors from PHP applications Summary(en_GB): Easily use ANSI console colours from PHP applications Group: Development/Libraries License: MIT URL: http://pear.php.net/package/Console_Color 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.4.9-1.2 Requires(post): %{__pear} Requires(postun): %{__pear} Provides: php-pear(%{pear_name}) = %{version} %description The Console_Color class makes it easy to use ANSI color codes from CLI-based applications written in PHP. %description -l en_GB The Console_Color class makes it easy to use ANSI colour codes from CLI-based applications written in PHP. %prep %setup -q -c [ -f package2.xml ] || mv package.xml package2.xml mv package2.xml %{pear_name}-%{version}/%{pear_name}.xml cd %{pear_name}-%{version} %build cd %{pear_name}-%{version} # Empty build section, nothing required %install cd %{pear_name}-%{version} rm -rf $RPM_BUILD_ROOT docdir %{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{pear_name}.xml # Move documentation mkdir -p docdir mv $RPM_BUILD_ROOT%{pear_docdir}/* docdir # Clean up unnecessary files rm -rf $RPM_BUILD_ROOT%{pear_phpdir}/.??* # Install XML package description mkdir -p $RPM_BUILD_ROOT%{pear_xmldir} install -pm 644 %{pear_name}.xml $RPM_BUILD_ROOT%{pear_xmldir} %clean rm -rf $RPM_BUILD_ROOT %post %{__pear} install --nodeps --soft --force --register-only \ %{pear_xmldir}/%{pear_name}.xml >/dev/null || : %postun if [ $1 -eq 0 ] ; then %{__pear} uninstall --nodeps --ignore-errors --register-only \ %{pear_name} >/dev/null || : fi %files %defattr(-,root,root,-) %doc %{pear_name}-%{version}/docdir/%{pear_name}/* %{pear_xmldir}/%{pear_name}.xml %{pear_phpdir}/Console/Color.php %changelog * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Thu Aug 28 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.0.2-2 - fix license tag * Sat Jan 27 2006 Tim Jackson <rpm@timj.co.uk> 1.0.2-1 - Update to 1.0.2 - Upstream now includes license file (changed to X11) - Add en_GB summary/description * Thu Jan 25 2006 Tim Jackson <rpm@timj.co.uk> 1.0.1-1 - Initial RPM build