db-move: moved firefox-i18n from [testing] to [extra] (any)
[arch-packages.git] / composer / trunk / PKGBUILD
blobcb7c459ea62e460c912f42d82eee2a4a22b84d1f
1 # Maintainer: Pierre Schmitz <pierre@archlinux.de>
3 pkgname=composer
4 pkgver=2.5.5
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             '566a6d1cf4be1cc3ac882d2a2a13817ffae54e60f5aa7c9137434810a5809ffc')
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
27         php composer.phar completion bash > completion.bash
30 check() {
31         cd "${srcdir}"
33         mkdir integration-test
34         cd integration-test
36         php "${srcdir}/${pkgname}/composer.phar" init \
37                 --no-interaction \
38                 --type=project \
39                 --name='archlinux/test' \
40                 --description='Composer Test Project' \
41                 --license='GPL-3.0-or-later' \
42                 --require='symfony/console:*'
43         php "${srcdir}/${pkgname}/composer.phar" update --no-interaction --no-progress --prefer-dist
44         php "${srcdir}/${pkgname}/composer.phar" validate --no-interaction
47 package() {
48         cd "${srcdir}/${pkgname}"
50         install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
51         install -Dm755 composer.phar "${pkgdir}/usr/bin/composer"
52         install -Dm644 completion.bash "${pkgdir}/usr/share/bash-completion/completions/composer"