# Maintainer: Stefan Auditor # Please report issues at https://github.com/sanduhrs/arch-aur-php-cs-fixer-git pkgname=php-cs-fixer-git pkgver=1.11.r121.g9a83ba0 pkgrel=1 pkgdesc="Analyzes some PHP source code and tries to fix coding standards issues (PSR-1 and PSR-2 compatible)." url="https://github.com/FriendsOfPHP/PHP-CS-Fixer" license=("MIT") arch=("any") depends=("php>=5.3.6") makedepends=("php-humbug-box-bin" "composer" "git" "php-sodium") provides=(php-cs-fixer) conflicts=(php-cs-fixer) source=("$pkgname"::"git+https://github.com/FriendsOfPHP/PHP-CS-Fixer") sha512sums=('SKIP') pkgver() { cd "${pkgname}" git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } build() { cd "${srcdir}/${pkgname}" php /usr/bin/composer install --prefer-dist --no-dev php -d phar.readonly=Off /usr/bin/box compile } package() { cd "${srcdir}/${pkgname}" install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/php-cs-fixer/LICENSE" install -D -m755 "php-cs-fixer.phar" "${pkgdir}/usr/bin/php-cs-fixer" }