Sophie

Sophie

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

php-pear-DbUnit-1.1.2-2.mga3.src.rpm

%define  upstream_name DbUnit
##%define _requires_exceptions pear(TestConfiguration.php)
%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.1.2
Release:	%mkrel 2
Summary:	DbUnit port for PHP/PHPUnit
License:	BSD
Group:		Development/PHP
URL:		http://pear.phpunit.de/package/DbUnit
Source0:	http://pear.phpunit.de/get/DbUnit-%{version}.tgz
Requires(post): php-pear > 1.9.4
Requires(preun): php-pear >= 1.9.4
Requires:	php-pear >= 1.9.4
Requires:	php-channel-phpunit
Requires:	php-cli
BuildArch:	noarch
BuildRequires:	php-pear >= 1.9.4
BuildRequires:	php-channel-phpunit
Requires:	symfony-YAML >= 1.0.2


%description
DbUnit port for PHP/PHPUnit to support database interaction testing.

%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}/DbUnit.xml

%clean
rm -rf %{buildroot}

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

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

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




%changelog

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

* Sat Feb 11 2012 spuhler <spuhler> 1.1.2-1.mga2
+ Revision: 207433
- upgrade to 1.1.2

* Tue Nov 15 2011 spuhler <spuhler> 1.1.1-1.mga2
+ Revision: 167910
- upgrade to 1.1.1
  Spec file pearized

* Thu Jul 14 2011 spuhler <spuhler> 1.0.2-2.mga2
+ Revision: 123907
- changed Requires from YAML to Requires: symfony-YAML
  increase rel to 2

* Mon Jul 11 2011 spuhler <spuhler> 1.0.2-1.mga2
+ Revision: 122004
- imported package php-pear-DbUnit