%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}} %global pear_name PHPUnit_MockObject %global channel pear.phpunit.de Name: php-phpunit-PHPUnit-MockObject Version: 1.0.1 Release: 1%{?dist} Summary: Mock Object library for PHPUnit Group: Development/Libraries License: BSD URL: http://pear.phpunit.de/ Source0: http://pear.phpunit.de/get/%{pear_name}-%{version}.tgz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: php-pear(PEAR) >= 1.9.1 BuildRequires: php-channel(%{channel}) Requires(post): %{__pear} Requires(postun): %{__pear} Requires: php-common >= 5.2.7 Requires: php-pear(%{channel}/Text_Template) >= 1.0.0 Requires: php-pear(%{channel}/PHPUnit) >= 3.5.0 Provides: php-pear(%{channel}/%{pear_name}) = %{version} %description Mock Object library for PHPUnit %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 %build cd %{pear_name}-%{version} # Empty build section, most likely nothing required. %install cd %{pear_name}-%{version} rm -rf $RPM_BUILD_ROOT docdir PHPRC=../php.ini %{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{name}.xml # 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 %{name}.xml $RPM_BUILD_ROOT%{pear_xmldir} %clean rm -rf $RPM_BUILD_ROOT %post %{__pear} install --nodeps --soft --force --register-only \ %{pear_xmldir}/%{name}.xml >/dev/null || : %postun if [ $1 -eq 0 ] ; then %{__pear} uninstall --nodeps --ignore-errors --register-only \ %{channel}/%{pear_name} >/dev/null || : fi %files %defattr(-,root,root,-) %{pear_xmldir}/%{name}.xml %{pear_phpdir}/PHPUnit/Framework/MockObject %changelog * Mon Oct 25 2010 Remi Collet - 1.0.1-1 - Version 1.0.1 (stable)- API (1.0.0) stable * Sun Sep 26 2010 Remi Collet - 1.0.0-1 - initial generated spec + clean