X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=composer.spec;h=68592b1e7d1357fbb3bc79a87b3b3eaa31707080;hb=9e924ff7ab5b41ef1932ea4fc0e2625bc18d1f82;hp=1cdf49f75cfc623ec5f39a978ba6e56b7e30a369;hpb=848ed42b34c9ec064381eea74f0ccb6cfd1d1b59;p=packages%2Fcomposer.git diff --git a/composer.spec b/composer.spec index 1cdf49f..68592b1 100644 --- a/composer.spec +++ b/composer.spec @@ -4,18 +4,22 @@ # Conditional build: %bcond_with bootstrap # build boostrap +%define rel 12 +# $ git rev-list 1.0.0-alpha9..%{githash} --count +%define commits 216 +%define githash 5744981 +%define subver alpha9 %define php_min_version 5.3.4 -%define githash b23a3cd -%define rel 9 %include /usr/lib/rpm/macros.php Summary: Dependency Manager for PHP Name: composer Version: 1.0.0 -Release: %{rel}.%{githash} +Release: %{rel}.%{subver}.%{commits}.g%{githash} License: MIT Group: Development/Languages/PHP -Source0: https://github.com/composer/composer/archive/%{githash}/%{name}-%{version}-%{githash}.tar.gz -# Source0-md5: d9e1c78c6032ebf50ed0b068f2af15ce +Source0: https://github.com/composer/composer/archive/%{githash}/%{name}-%{version}-%{subver}-%{commits}-g%{githash}.tar.gz +# Source0-md5: d3152cbae030fedb85f5d1ac52dddd4f +#Source0: https://github.com/composer/composer/archive/%{version}-%{subver}/%{name}-%{version}-%{subver}.tar.gz %if %{with bootstrap} Source1: http://getcomposer.org/download/%{version}-alpha8/%{name}.phar # Source1-md5: df1001975035f07d09307bf1f1e62584 @@ -37,6 +41,7 @@ BuildRequires: %{php_name}-zip BuildRequires: %{php_name}-zlib BuildRequires: /usr/bin/phar BuildRequires: /usr/bin/php +BuildRequires: php-devel BuildRequires: rpm-php-pearprov >= 4.4.2-11 BuildRequires: rpmbuild(macros) >= 1.673 %if %{without bootstrap} @@ -59,7 +64,7 @@ Requires: php(spl) Requires: php(zip) Requires: php(zlib) %if %{without bootstrap} -Requires: php-justinrainbow-json-schema >= 1.1.0 +Requires: php-justinrainbow-json-schema >= 1.3 Requires: php-seld-jsonlint >= 1.1.2 Requires: php-symfony2-Console >= 2.3 Requires: php-symfony2-Finder >= 2.2 @@ -103,6 +108,9 @@ mv composer-*/* . mv composer.lock{,.disabled} %{__sed} -i -e '1s,^#!.*env php,#!%{__php},' bin/* +# cleanup backups after patching +find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f + %build %if %{with bootstrap} composer='%{__php} %{SOURCE1}' @@ -116,8 +124,9 @@ if [ ! -d vendor ]; then %{__patch} -p1 < %{PATCH2} fi -PACKAGE_VERSION=%{?githash} \ RELEASE_DATE=$(LC_ALL=C date) \ +PACKAGE_VERSION=%{?!githash:%{version}-%{subver}}%{?githash} \ +DEV_VERSION=%{!?githash:0}%{?githash:1} \ %{__php} -d phar.readonly=0 ./bin/compile # sanity check