3 %bcond_with tests # build with tests
5 %include /usr/lib/rpm/macros.php
8 %define _pearname %{_class}
9 %define php_min_version 5.2.7
10 Summary: %{_pearname} - regression testing framework for unit tests
11 Summary(pl.UTF-8): %{_pearname} - zestaw testów regresyjnych
12 Name: php-%{_pearname}
16 Group: Development/Languages/PHP
17 Source0: http://pear.phpunit.de/get/PHPUnit-%{version}.tgz
18 # Source0-md5: ea0e53d8bfe0ca8dadc9d22b953909b9
19 URL: http://www.phpunit.de/
20 BuildRequires: php-channel(components.ez.no)
21 BuildRequires: php-channel(pear.phpunit.de)
22 BuildRequires: php-channel(pear.symfony-project.com)
23 BuildRequires: php-pear >= 4:1.1-2
24 BuildRequires: php-pear-PEAR >= 1:1.9.1
25 BuildRequires: rpm-php-pearprov >= 4.4.2-11
26 BuildRequires: rpmbuild(macros) >= 1.473
27 Requires: php-channel(pear.phpunit.de)
28 Requires: php-common >= 4:%{php_min_version}
31 Requires: php-pear >= 4:1.1-2
32 Requires: php-phpunit-DbUnit >= 1.0.0
33 Requires: php-phpunit-File_Iterator >= 1.2.3
34 Requires: php-phpunit-PHPUnit_MockObject >= 1.0.0
35 Requires: php-phpunit-PHPUnit_Selenium >= 1.0.0
36 Requires: php-phpunit-PHP_CodeCoverage >= 1.0.0
37 Requires: php-phpunit-PHP_Timer >= 1.0.0
38 Requires: php-phpunit-Text_Template >= 1.0.0
39 Requires: php-reflection
41 Requires: php-symfony-YAML >= 1.0.2
46 Suggests: php-tokenizer
48 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50 # exclude optional dependencies
51 %define dep_optional pear(Image/GraphViz.*) pear(Log.*) pear(SymfonyComponents/.*) pear(XML/RPC2/Client.php)
52 %define dep_missing1 pear(File/Iterator/Factory.php) pear(PHP/CodeCoverage.*) pear(PHP/Timer.php) pear(Text/Template.php)
54 # put it together for rpmbuild
55 %define _noautoreq %{?dep_optional} %{?dep_missing}
58 PHPUnit is a regression testing framework used by the developer who
59 implements unit tests in PHP. It is based upon JUnit, which can be
60 found at <http://www.junit.org/>.
62 In PEAR status of this package is: %{_status}.
64 %description -l pl.UTF-8
65 PHPUnit jest zestawem testów regresyjnych używanych przez developerów,
66 którzy implementują jednostki testowe w PHP. Jest bazowane na JUnit,
67 który można znaleźć pod adresem <http://www.junit.org/>.
69 Ta klasa ma w PEAR status: %{_status}.
72 Summary: Tests for PEAR::%{_pearname}
73 Summary(pl.UTF-8): Testy dla PEAR::%{_pearname}
74 Group: Development/Languages/PHP
75 Requires: %{name} = %{version}-%{release}
80 Tests for PEAR::%{_pearname}.
82 %description tests -l pl.UTF-8
83 Testy dla PEAR::%{_pearname}.
89 rm -rf $RPM_BUILD_ROOT
90 install -d $RPM_BUILD_ROOT%{php_pear_dir}
91 install -d $RPM_BUILD_ROOT%{_bindir}
92 install -p usr/bin/phpunit $RPM_BUILD_ROOT%{_bindir}
96 rm -rf $RPM_BUILD_ROOT
99 %defattr(644,root,root,755)
100 %doc install.log optional-packages.txt
101 %{php_pear_dir}/.registry/.channel.pear.phpunit.de/*.reg
102 %attr(755,root,root) %{_bindir}/phpunit
103 %{php_pear_dir}/%{_class}
107 %defattr(644,root,root,755)
108 %{php_pear_dir}/tests/%{_pearname}