]> git.pld-linux.org Git - packages/composer.git/blob - composer.spec
updated nogit patch
[packages/composer.git] / composer.spec
1 #
2 # Conditional build:
3 %bcond_with     bootstrap               # build boostrap
4
5 %define         php_min_version 5.3.4
6 %define         subver  alpha7
7 %define         rel             0.7
8 %include        /usr/lib/rpm/macros.php
9 Summary:        Dependency Manager for PHP
10 Name:           composer
11 Version:        1.0.0
12 Release:        0.%{subver}.%{rel}
13 License:        MIT
14 Group:          Development/Languages/PHP
15 #Source0:       https://github.com/composer/composer/archive/%{version}-%{subver}.tar.gz
16 Source0:        https://github.com/composer/composer/archive/master.tar.gz?/%{name}.tgz
17 # Source0-md5:  0a4a4b06740a9b49d2ab9773a907aa94
18 Source1:        http://getcomposer.org/download/%{version}-%{subver}/%{name}.phar
19 # Source1-md5:  f9b1dbd4ad0e3707bfe216690b210a7e
20 Patch0:         nogit.patch
21 URL:            http://www.getcomposer.org/
22 BuildRequires:  /usr/bin/php
23 BuildRequires:  php(ctype)
24 BuildRequires:  php(hash)
25 BuildRequires:  php(json)
26 BuildRequires:  php(openssl)
27 BuildRequires:  php(phar)
28 BuildRequires:  rpm-php-pearprov >= 4.4.2-11
29 BuildRequires:  rpmbuild(macros) >= 1.461
30 %if %{without bootstrap}
31 BuildRequires:  %{name}
32 %endif
33 Requires:       php(core) >= %{php_min_version}
34 Suggests:       git-core
35 Suggests:       mercurial
36 Suggests:       php(openssl)
37 Suggests:       php(zip)
38 Suggests:       subversion
39 BuildArch:      noarch
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %define         _appdir         %{_datadir}/%{name}
43
44 %description
45 Composer is a tool for dependency management in PHP. It allows you to
46 declare the dependent libraries your project needs and it will install
47 them in your project for you.
48
49 %prep
50 %setup -q -n %{name}-master
51 %patch0 -p1
52
53 %{__sed} -i -e '1s,^#!.*env php,#!%{__php},' bin/*
54
55 %build
56 %if %{with bootstrap}
57 env -i PATH=$PATH \
58 %{__php} %{SOURCE1} install --prefer-dist -v
59 %else
60 composer install --prefer-dist -v
61 %endif
62
63 COMPOSER_VERSION=%{version}%{?subver:-%{subver}} \
64 %{__php} -d phar.readonly=0 ./bin/compile
65
66 %install
67 rm -rf $RPM_BUILD_ROOT
68 install -d $RPM_BUILD_ROOT{%{_bindir},%{_appdir}}
69 cp -a bin src res vendor $RPM_BUILD_ROOT%{_appdir}
70 ln -s %{_appdir}/bin/%{name} $RPM_BUILD_ROOT%{_bindir}/%{name}
71
72 %clean
73 rm -rf $RPM_BUILD_ROOT
74
75 %files
76 %defattr(644,root,root,755)
77 %doc README.md CHANGELOG.md LICENSE PORTING_INFO
78 %attr(755,root,root) %{_bindir}/composer
79 %dir %{_appdir}
80 %dir %{_appdir}/bin
81 %attr(755,root,root) %{_appdir}/bin/*
82 %{_appdir}/res
83 %{_appdir}/src
84 %{_appdir}/vendor
This page took 0.164313 seconds and 4 git commands to generate.