]> git.pld-linux.org Git - packages/composer.git/blobdiff - composer.spec
require itself for tests
[packages/composer.git] / composer.spec
index b78e22901f9d5afee2cf6b4e3e27f875762f9b35..6724e057699d064aac6acc42532c76a4efda9c69 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Conditional build:
-%bcond_with    tests           # build with tests
+%bcond_without tests           # build with tests
 
 # NOTE
 # - release tarballs: http://getcomposer.org/download/
@@ -32,6 +32,7 @@ URL:          http://www.getcomposer.org/
 BuildRequires: rpm-php-pearprov >= 4.4.2-11
 BuildRequires: rpmbuild(macros) >= 1.673
 %if %{with tests}
+BuildRequires: composer
 BuildRequires: phpab
 BuildRequires: phpunit
 %endif
@@ -98,6 +99,9 @@ mv composer.lock{,.disabled}
 
 cp -p %{SOURCE3} src/Composer/autoload.php
 
+# AutoloadGenerator needs this runtime
+mv LICENSE res
+
 # move to Composer dir, this will simplify testing
 mv res src/Composer
 ln -s src/Composer/res
@@ -105,6 +109,15 @@ ln -s src/Composer/res
 # cleanup backups after patching
 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
 
+# needs newer phpunit:
+# missing method PHPUnit_Framework_MockObject_Builder_InvocationMocker::willReturn()
+rm tests/Composer/Test/EventDispatcher/EventDispatcherTest.php
+rm tests/Composer/Test/IO/ConsoleIOTest.php
+rm tests/Composer/Test/Package/Loader/RootPackageLoaderTest.php
+rm tests/Composer/Test/Package/RootAliasPackageTest.php
+rm tests/Composer/Test/Package/Version/VersionGuesserTest.php
+rm tests/Composer/Test/Util/GitHubTest.php
+
 %build
 %if %{with tests}
 phpab -n -o src/bootstrap.php -e '*/Fixtures/*' src/ tests/
@@ -126,7 +139,8 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc README.md CHANGELOG.md LICENSE PORTING_INFO
+%doc README.md CHANGELOG.md PORTING_INFO
+%doc src/Composer/res/LICENSE
 %attr(755,root,root) %{_bindir}/composer
 %{php_data_dir}/Composer
 
This page took 0.027261 seconds and 4 git commands to generate.