[packages/composer] AutoloadGenerator needs LICENSE file at run time

glen glen at pld-linux.org
Thu Nov 26 13:57:34 CET 2015


commit 1295fc99af48f03a27c0ea05d8664dbddaf3b0e4
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Nov 26 14:57:26 2015 +0200

    AutoloadGenerator needs LICENSE file at run time

 autoload.patch | 11 +++++++++++
 composer.spec  |  6 +++++-
 2 files changed, 16 insertions(+), 1 deletion(-)
---
diff --git a/composer.spec b/composer.spec
index c1fc1c7..bb0a525 100644
--- a/composer.spec
+++ b/composer.spec
@@ -98,6 +98,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
@@ -135,7 +138,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
 
diff --git a/autoload.patch b/autoload.patch
index 87b44f7..cc85247 100644
--- a/autoload.patch
+++ b/autoload.patch
@@ -24,3 +24,14 @@
          $schemaData = json_decode(file_get_contents($schemaFile));
  
          if ($schema === self::LAX_SCHEMA) {
+--- composer-1.0.0-15.alpha11/src/Composer/Autoload/AutoloadGenerator.php~	2015-11-14 18:21:07.000000000 +0200
++++ composer-1.0.0-15.alpha11/src/Composer/Autoload/AutoloadGenerator.php	2015-11-26 14:52:01.344498517 +0200
+@@ -275,7 +275,7 @@
+         file_put_contents($targetDir.'/autoload_real.php', $this->getAutoloadRealFile(true, (bool) $includePathFileContents, $targetDirLoader, (bool) $includeFilesFileContents, $vendorPathCode, $appBaseDirCode, $suffix, $useGlobalIncludePath, $prependAutoloader));
+ 
+         $this->safeCopy(__DIR__.'/ClassLoader.php', $targetDir.'/ClassLoader.php');
+-        $this->safeCopy(__DIR__.'/../../../LICENSE', $targetDir.'/LICENSE');
++        $this->safeCopy(__DIR__.'/../res/LICENSE', $targetDir.'/LICENSE');
+ 
+         $this->eventDispatcher->dispatchScript(ScriptEvents::POST_AUTOLOAD_DUMP, $this->devMode, array(), array(
+             'optimize' => (bool) $scanPsr0Packages,
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/composer.git/commitdiff/1295fc99af48f03a27c0ea05d8664dbddaf3b0e4



More information about the pld-cvs-commit mailing list