summaryrefslogtreecommitdiffstats
path: root/abs/extra/php-composer/PKGBUILD
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2014-10-09 17:40:56 (GMT)
committerBritney Fransen <brfransen@gmail.com>2014-10-09 17:40:56 (GMT)
commit9ab119f94f92c62c505a86c97d32f6df19054c01 (patch)
tree9b0eb4f35f5215604f22f8a1d7766b99fdc3784b /abs/extra/php-composer/PKGBUILD
parentd59746359f4f4b7f1d0c07eb3fd3b47434355f0e (diff)
downloadlinhes_pkgbuild-9ab119f94f92c62c505a86c97d32f6df19054c01.zip
linhes_pkgbuild-9ab119f94f92c62c505a86c97d32f6df19054c01.tar.gz
linhes_pkgbuild-9ab119f94f92c62c505a86c97d32f6df19054c01.tar.bz2
php-composer: initial commit; dep of mfdb-json
Diffstat (limited to 'abs/extra/php-composer/PKGBUILD')
-rw-r--r--abs/extra/php-composer/PKGBUILD53
1 files changed, 53 insertions, 0 deletions
diff --git a/abs/extra/php-composer/PKGBUILD b/abs/extra/php-composer/PKGBUILD
new file mode 100644
index 0000000..0cd1b13
--- /dev/null
+++ b/abs/extra/php-composer/PKGBUILD
@@ -0,0 +1,53 @@
+# $Id$
+# Maintainer: Pierre Schmitz <pierre@archlinux.de>
+
+pkgname=php-composer
+pkgver=1.0.0.alpha8.532
+pkgrel=1
+pkgdesc="Dependency Manager for PHP"
+arch=('any')
+license=('MIT')
+url='http://getcomposer.org/'
+depends=('php' 'php-intl')
+makedepends=('git' "${pkgname}")
+checkdepends=('mercurial')
+source=("${pkgname}::git+https://github.com/composer/composer.git"
+ 'php.ini')
+md5sums=('SKIP'
+ '9d871623bc2ec0a37a7d78f708a7f838')
+
+pkgver() {
+ cd ${srcdir}/${pkgname}
+
+ local _tag=$(git tag -l --sort -version:refname | head -1)
+ echo "${_tag}.$(git rev-list ${_tag}.. --count)" | sed 's/-/./g'
+}
+
+prepare() {
+ cd ${srcdir}/${pkgname}
+
+ sed "s~^#!/usr/bin/env php~#!/usr/bin/php -nc/usr/share/${pkgname}/php.ini~g" -i src/Composer/Compiler.php
+ /usr/bin/composer -on install
+}
+
+check() {
+ cd ${srcdir}/${pkgname}
+
+ git config --global user.email "${USER}@${HOST}"
+ git config --global user.name "${USER}"
+ /usr/bin/php -nc ${srcdir}/php.ini vendor/phpunit/phpunit/phpunit.php
+}
+
+build() {
+ cd ${srcdir}/${pkgname}
+
+ /usr/bin/php -nc ${srcdir}/php.ini bin/compile
+}
+
+package() {
+ cd ${srcdir}/${pkgname}
+
+ install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ install -Dm644 ${srcdir}/php.ini ${pkgdir}/usr/share/php-composer/php.ini
+ install -Dm755 composer.phar ${pkgdir}/usr/bin/composer
+}