Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 9fa130ffb506c6f94678c32c93e2069a > files > 2

php-pear-PHPUnit_Story-1.0.0-3.mga3.src.rpm

%define upstream_name PHPUnit_Story
%define peardir %(pear config-get php_dir 2> /dev/null || echo %{_datadir}/pear)
%define xmldir  /var/lib/pear


Name: 		php-pear-%{upstream_name}
Version:     	1.0.0
Release:     	%mkrel 3
Summary:    	Utility class for invoking callables with a timeout
License:    	BSD License
Group:       	Networking/Mail
Url:         	http://pear.phpunit.de/package/%{upstream_name}
Source0:    	Source0: http://pear.horde.org/get/%{upstream_name}-%{version}.tgz
BuildArch:  	noarch
Requires:    	php-pear > 1.4.7
Requires:     	php-channel-phpunit
BuildRequires:	php-pear > 1.4.7
BuildRequires: 	php-channel-phpunit

%description
Story extension for PHPUnit to facilitate Behaviour-Driven Development

%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

mv %{buildroot}/docs .


# Install XML package description
mkdir -p %{buildroot}%{xmldir}
tar -xzf %{SOURCE0} package.xml
cp -p package.xml %{buildroot}%{xmldir}/PHPUnit_Story.xml

%clean
rm -rf %{buildroot}

%post
pear install --nodeps --soft --force --register-only %{xmldir}/PHPUnit_Story.xml

%postun
if [ "$1" -eq "0" ]; then
    pear uninstall --nodeps --ignore-errors --register-only pear.phpunit.de/PHPUnit_Story
fi

%files
%defattr(-,root,root)
%doc docs/PHPUnit_Story/*
%{peardir}/*
%{xmldir}/PHPUnit_Story.xml

%changelog

* Sun Jan 13 2013 umeabot <umeabot> 1.0.0-3.mga3
+ Revision: 377137
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Sat Dec 31 2011 spuhler <spuhler> 1.0.0-2.mga2
+ Revision: 189388
- changed BuildRequires: php-pear-channel-phpunit to BuildRequires:php-channel-phpunit

* Tue Nov 15 2011 spuhler <spuhler> 1.0.0-1.mga2
+ Revision: 167899
- imported package php-pear-PHPUnit_Story