]> git.pld-linux.org Git - packages/composer.git/blobdiff - composer.spec
use json-schema >= 1.3
[packages/composer.git] / composer.spec
index ba430b2c172b13832be945fc1de5045ac86c8d59..68592b1e7d1357fbb3bc79a87b3b3eaa31707080 100644 (file)
@@ -4,22 +4,24 @@
 # 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                subver  alpha8
-%define                githash ac497fe
-%define                rel             3
 %include       /usr/lib/rpm/macros.php
 Summary:       Dependency Manager for PHP
 Name:          composer
 Version:       1.0.0
-Release:       0.%{subver}.%{rel}.%{githash}
+Release:       %{rel}.%{subver}.%{commits}.g%{githash}
 License:       MIT
 Group:         Development/Languages/PHP
+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
-Source0:       https://github.com/composer/composer/archive/%{githash}/%{name}-%{version}-%{subver}-%{githash}.tar.gz
-# Source0-md5: 124fe0335a9f61f1ab149d3f8e0616b4
 %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
@@ -27,16 +29,19 @@ Source2:    https://raw.githubusercontent.com/iArren/%{name}-bash-completion/86a812
 Patch0:                nogit.patch
 Patch1:                no-vendors.patch
 Patch2:                autoload-config.patch
+Patch3:                update-memory-limit.patch
 URL:           http://www.getcomposer.org/
+BuildRequires: %{php_name}-ctype
+BuildRequires: %{php_name}-hash
+BuildRequires: %{php_name}-json
+BuildRequires: %{php_name}-openssl
+BuildRequires: %{php_name}-phar
+BuildRequires: %{php_name}-program
+BuildRequires: %{php_name}-zip
+BuildRequires: %{php_name}-zlib
 BuildRequires: /usr/bin/phar
 BuildRequires: /usr/bin/php
-BuildRequires: php(ctype)
-BuildRequires: php(hash)
-BuildRequires: php(json)
-BuildRequires: php(openssl)
-BuildRequires: php(phar)
-BuildRequires: php(zip)
-BuildRequires: php(zlib)
+BuildRequires: php-devel
 BuildRequires: rpm-php-pearprov >= 4.4.2-11
 BuildRequires: rpmbuild(macros) >= 1.673
 %if %{without bootstrap}
@@ -57,8 +62,9 @@ Requires:     php(posix)
 Requires:      php(simplexml)
 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
@@ -97,10 +103,14 @@ Pakiet ten dostarcza bashowe uzupełnianie nazw dla Composera.
 mv composer-*/* .
 %patch0 -p1
 %{!?with_bootstrap:%patch1 -p1}
+%patch3 -p1
 
 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}'
@@ -114,7 +124,9 @@ if [ ! -d vendor ]; then
        %{__patch} -p1 < %{PATCH2}
 fi
 
-COMPOSER_VERSION=%{version}%{?subver:-%{subver}} \
+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
@@ -125,7 +137,7 @@ install -d build
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_appdir}}
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_appdir},/var/cache/composer}
 cd build
 cp -a bin src res vendor $RPM_BUILD_ROOT%{_appdir}
 ln -s %{_appdir}/bin/%{name} $RPM_BUILD_ROOT%{_bindir}/%{name}
@@ -148,6 +160,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_appdir}/src
 %{_appdir}/vendor
 
+# top level cachedir, create user cache dirs here manually
+%dir %attr(711,root,http) /var/cache/composer
+
 %files -n bash-completion-%{name}
 %defattr(644,root,root,755)
 %{bash_compdir}/composer
This page took 0.083672 seconds and 4 git commands to generate.