archrelease: copy trunk to extra-x86_64
[arch-packages.git] / composer / trunk / PKGBUILD
blob2fc58a6067c9dfb6e54cae5f640ff88ab6a0c4c2
1 # Maintainer: Pierre Schmitz <pierre@archlinux.de>
3 pkgname=composer
4 pkgver=2.3.10
5 pkgrel=1
6 pkgdesc="Dependency Manager for PHP"
7 arch=('any')
8 license=('MIT')
9 url='https://getcomposer.org/'
10 depends=('php' 'unzip')
11 makedepends=('git')
12 source=("${pkgname}::git+https://github.com/composer/composer.git#tag=${pkgver}"
13         "${pkgname}-${pkgver}.phar::https://getcomposer.org/download/${pkgver}/composer.phar")
14 sha256sums=('SKIP'
15             'd808272f284fa8e0f8b470703e1438ac8f362030bbc9d12e29530277d767aff0')
17 prepare() {
18         cd "${srcdir}/${pkgname}"
20         php "${srcdir}/${pkgname}-${pkgver}.phar" install --no-interaction --no-dev --no-progress --prefer-dist
23 build() {
24         cd "${srcdir}/${pkgname}"
26         php -d phar.readonly=Off bin/compile
29 check() {
30         cd "${srcdir}"
32         mkdir integration-test
33         cd integration-test
35         php "${srcdir}/${pkgname}/composer.phar" init \
36                 --no-interaction \
37                 --type=project \
38                 --name='archlinux/test' \
39                 --description='Composer Test Project' \
40                 --license='GPL-3.0-or-later' \
41                 --require='symfony/console:*'
42         php "${srcdir}/${pkgname}/composer.phar" update --no-interaction --no-progress --prefer-dist
43         php "${srcdir}/${pkgname}/composer.phar" validate --no-interaction
46 package() {
47         cd "${srcdir}/${pkgname}"
49         install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
50         install -Dm755 composer.phar "${pkgdir}/usr/bin/composer"