From: Elan Ruusamäe Date: Fri, 28 Nov 2014 14:05:55 +0000 (+0200) Subject: up to b23a3cd X-Git-Tag: auto/th/composer-1.0.0-9.b23a3cd X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=848ed42b34c9ec064381eea74f0ccb6cfd1d1b59;p=packages%2Fcomposer.git up to b23a3cd --- diff --git a/composer.spec b/composer.spec index 2cfc4e7..1cdf49f 100644 --- a/composer.spec +++ b/composer.spec @@ -5,21 +5,19 @@ %bcond_with bootstrap # build boostrap %define php_min_version 5.3.4 -%define subver alpha8 -%define githash b0cabd1 -%define rel 8 +%define githash b23a3cd +%define rel 9 %include /usr/lib/rpm/macros.php Summary: Dependency Manager for PHP Name: composer Version: 1.0.0 -Release: 0.%{subver}.%{rel}.%{githash} +Release: %{rel}.%{githash} License: MIT Group: Development/Languages/PHP -#Source0: https://github.com/composer/composer/archive/%{version}-%{subver}/%{name}-%{version}-%{subver}.tar.gz -Source0: https://github.com/composer/composer/archive/%{githash}/%{name}-%{version}-%{subver}-%{githash}.tar.gz -# Source0-md5: be1b3e138647d0ed8af94a53de53c9c0 +Source0: https://github.com/composer/composer/archive/%{githash}/%{name}-%{version}-%{githash}.tar.gz +# Source0-md5: d9e1c78c6032ebf50ed0b068f2af15ce %if %{with bootstrap} -Source1: http://getcomposer.org/download/%{version}-%{subver}/%{name}.phar +Source1: http://getcomposer.org/download/%{version}-alpha8/%{name}.phar # Source1-md5: df1001975035f07d09307bf1f1e62584 %endif Source2: https://raw.githubusercontent.com/iArren/%{name}-bash-completion/86a8129/composer @@ -118,7 +116,8 @@ if [ ! -d vendor ]; then %{__patch} -p1 < %{PATCH2} fi -COMPOSER_VERSION=%{version}%{?subver:-%{subver}}%{?githash:@%{githash}} \ +PACKAGE_VERSION=%{?githash} \ +RELEASE_DATE=$(LC_ALL=C date) \ %{__php} -d phar.readonly=0 ./bin/compile # sanity check diff --git a/nogit.patch b/nogit.patch index 5799ba4..89af0a0 100644 --- a/nogit.patch +++ b/nogit.patch @@ -1,19 +1,27 @@ ---- composer-alpha7/src/Composer/Compiler.php~ 2013-04-01 13:18:27.000000000 +0300 -+++ composer-alpha7/src/Composer/Compiler.php 2013-04-01 22:27:27.313555304 +0300 -@@ -35,6 +35,8 @@ +--- composer-1.0.x-b23a3cd/src/Composer/Compiler.php~ 2014-11-28 15:47:34.000000000 +0200 ++++ composer-1.0.x-b23a3cd/src/Composer/Compiler.php 2014-11-28 15:53:21.829773210 +0200 +@@ -40,13 +40,13 @@ unlink($pharFile); } -+ $this->version = getenv('COMPOSER_VERSION'); -+ if (empty($this->version)) { - $process = new Process('git log --pretty="%H" -n1 HEAD', __DIR__); +- $process = new Process('git log --pretty="%H" -n1 HEAD', __DIR__); ++ $process = new Process('echo $PACKAGE_VERSION', __DIR__); + if ($process->run() != 0) { + throw new \RuntimeException('Can\'t run git log. You must ensure to run compile from composer git repository clone and that git binary is available.'); + } + $this->version = trim($process->getOutput()); + +- $process = new Process('git log -n1 --pretty=%ci HEAD', __DIR__); ++ $process = new Process('echo $RELEASE_DATE', __DIR__); if ($process->run() != 0) { throw new \RuntimeException('Can\'t run git log. You must ensure to run compile from composer git repository clone and that git binary is available.'); -@@ -45,6 +47,7 @@ - if ($process->run() == 0) { - $this->version = trim($process->getOutput()); } -+ } +@@ -55,7 +55,7 @@ + $date->setTimezone(new \DateTimeZone('UTC')); + $this->versionDate = $date->format('Y-m-d H:i:s'); - $phar = new \Phar($pharFile, 0, 'composer.phar'); - $phar->setSignatureAlgorithm(\Phar::SHA1); +- $process = new Process('git describe --tags HEAD'); ++ $process = new Process('false'); + if ($process->run() == 0) { + $this->version = trim($process->getOutput()); + } else {