[arch-commits] Commit in composer/repos (testing-any testing-any/PKGBUILD)
Pierre Schmitz
pierre at archlinux.org
Mon Jan 18 18:29:20 UTC 2021
Date: Monday, January 18, 2021 @ 18:29:20
Author: pierre
Revision: 406367
archrelease: copy trunk to testing-any
Added:
composer/repos/testing-any/
composer/repos/testing-any/PKGBUILD
(from rev 406366, composer/trunk/PKGBUILD)
----------+
PKGBUILD | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
Copied: composer/repos/testing-any/PKGBUILD (from rev 406366, composer/trunk/PKGBUILD)
===================================================================
--- testing-any/PKGBUILD (rev 0)
+++ testing-any/PKGBUILD 2021-01-18 18:29:20 UTC (rev 406367)
@@ -0,0 +1,54 @@
+# Maintainer: Pierre Schmitz <pierre at archlinux.de>
+
+pkgname=composer
+pkgver=2.0.8
+pkgrel=2
+pkgdesc="Dependency Manager for PHP"
+arch=('any')
+license=('MIT')
+url='https://getcomposer.org/'
+depends=('php' 'unzip')
+makedepends=('git')
+checkdepends=('php7' 'php7-intl')
+source=("${pkgname}::git+https://github.com/composer/composer.git#tag=${pkgver}"
+ "${pkgname}-${pkgver}.phar::https://getcomposer.org/download/${pkgver}/composer.phar")
+sha256sums=('SKIP'
+ '2021f0d52b446e0efe3c548cc058ab5671fa38cdbcf814e7911c7e9d71d61538')
+COMPOSER_FLAGS="--ansi --no-interaction --no-progress --prefer-dist"
+
+prepare() {
+ cd "${srcdir}/${pkgname}"
+
+ php "${srcdir}/${pkgname}-${pkgver}.phar" install --no-dev ${COMPOSER_FLAGS}
+}
+
+build() {
+ cd "${srcdir}/${pkgname}"
+
+ php -d phar.readonly=Off bin/compile
+}
+
+check() {
+ cd "${srcdir}/${pkgname}"
+
+ # check if the upstream build and ours differ
+ diff -q ${srcdir}/${pkgname}-${pkgver}.phar composer.phar > /dev/null || msg2 "Upstream composer differs from ours"
+
+ # Install the dev dependencies to run the unit tests
+ bin/composer install ${COMPOSER_FLAGS}
+
+ bin/composer validate
+
+ git config --global user.email composer at example.com
+ git config --global user.name composer
+
+ # use PHP 7 to run tests as this version of PHPUnit is not compatible
+ php7 -d extension=intl vendor/bin/simple-phpunit
+}
+
+package() {
+ cd "${srcdir}/${pkgname}"
+
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -Dm755 composer.phar "${pkgdir}/usr/bin/composer"
+}
More information about the arch-commits
mailing list