]> git.pld-linux.org Git - packages/phpunit.git/blobdiff - php-phpunit-PHPUnit.spec
- deps from proper channel, version up to 3.5.2
[packages/phpunit.git] / php-phpunit-PHPUnit.spec
index 5230433c3eaa939f3dcec6cab6d996e34c99c352..38eb2c742eafa84473f223422cebc36b6db19abc 100644 (file)
@@ -1,29 +1,58 @@
+#
+# Conditional build:
+%bcond_with    tests           # build with tests
+
 %include       /usr/lib/rpm/macros.php
 %define                _class          PHPUnit
 %define                _status         stable
 %define                _pearname       %{_class}
+%define                php_min_version 5.2.7
 Summary:       %{_pearname} - regression testing framework for unit tests
 Summary(pl.UTF-8):     %{_pearname} - zestaw testów regresyjnych
 Name:          php-%{_pearname}
-Version:       3.2.21
-Release:       3
+Version:       3.5.2
+Release:       0.1
 License:       BSD
 Group:         Development/Languages/PHP
 Source0:       http://pear.phpunit.de/get/PHPUnit-%{version}.tgz
-# Source0-md5: 183b09907e341006e549476efaa18442
-Source1:       http://pear.phpunit.de/channel.xml
-# Source1-md5: b8ccb5f4727e7e6d4ee0c0e690f5423b
+# Source0-md5: ea0e53d8bfe0ca8dadc9d22b953909b9
 URL:           http://www.phpunit.de/
-BuildRequires: php-pear-PEAR
+BuildRequires: php-channel(components.ez.no)
+BuildRequires: php-channel(pear.phpunit.de)
+BuildRequires: php-channel(pear.symfony-project.com)
+BuildRequires: php-pear >= 4:1.1-2
+BuildRequires: php-pear-PEAR >= 1:1.9.1
 BuildRequires: rpm-php-pearprov >= 4.4.2-11
 BuildRequires: rpmbuild(macros) >= 1.473
-Requires:      php-common >= 3:4.1.0
-Requires:      php-pear >= 4:1.1-1
+Requires:      php-channel(pear.phpunit.de)
+Requires:      php-common >= 4:%{php_min_version}
+Requires:      php-dom
+Requires:      php-pcre
+Requires:      php-pear >= 4:1.1-2
+Requires:      php-phpunit-DbUnit >= 1.0.0
+Requires:      php-phpunit-File_Iterator >= 1.2.3
+Requires:      php-phpunit-PHPUnit_MockObject >= 1.0.0
+Requires:      php-phpunit-PHPUnit_Selenium >= 1.0.0
+Requires:      php-phpunit-PHP_CodeCoverage >= 1.0.0
+Requires:      php-phpunit-PHP_Timer >= 1.0.0
+Requires:      php-phpunit-Text_Template >= 1.0.0
+Requires:      php-reflection
+Requires:      php-spl
+Requires:      php-symfony-YAML >= 1.0.2
+Suggests:      php-dbus
+Suggests:      php-json
+Suggests:      php-pdo
+Suggests:      php-soap
+Suggests:      php-tokenizer
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 # exclude optional dependencies
-%define                _noautoreq      'pear(Image/GraphViz.*)' 'pear(Log.*)'
+%define                dep_optional    pear(Image/GraphViz.*) pear(Log.*) pear(SymfonyComponents/.*) pear(XML/RPC2/Client.php)
+%define                dep_missing1            pear(File/Iterator/Factory.php) pear(PHP/CodeCoverage.*) pear(PHP/Timer.php) pear(Text/Template.php)
+
+# put it together for rpmbuild
+%define                _noautoreq      %{?dep_optional} %{?dep_missing}
 
 %description
 PHPUnit is a regression testing framework used by the developer who
@@ -54,17 +83,15 @@ Tests for PEAR::%{_pearname}.
 Testy dla PEAR::%{_pearname}.
 
 %prep
-%pear_package_setup -c %{SOURCE1}
+%pear_package_setup
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{php_pear_dir}
+install -d $RPM_BUILD_ROOT%{_bindir}
+install -p usr/bin/phpunit $RPM_BUILD_ROOT%{_bindir}
 %pear_package_install
 
-# also copy channel information
-install -d $RPM_BUILD_ROOT%{php_pear_dir}/.channels
-cp -a .%{php_pear_dir}/.channels/pear.phpunit.de.reg $RPM_BUILD_ROOT%{php_pear_dir}/.channels
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -72,10 +99,11 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc install.log optional-packages.txt
 %{php_pear_dir}/.registry/.channel.pear.phpunit.de/*.reg
-%{php_pear_dir}/.channels/pear.phpunit.de.reg
-
+%attr(755,root,root) %{_bindir}/phpunit
 %{php_pear_dir}/%{_class}
 
+%if %{with tests}
 %files tests
 %defattr(644,root,root,755)
 %{php_pear_dir}/tests/%{_pearname}
+%endif
This page took 0.085531 seconds and 4 git commands to generate.