summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4ad53e6405b8e5f0ac5b042b7da72f5059e81e82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Maintainer: Stefan Auditor <stefan.auditor@erdfisch.de>
# Contributor: Victor Häggqvist <aur@snilius.com>
# Please report issues at https://github.com/sanduhrs/arch-aur-drupalconsole-git

_pkgname=drupalconsole
pkgname=${_pkgname}-git
pkgver=1.0.0.alpha2.r42.g35370d5
pkgrel=1
pkgdesc="The Drupal Console is a suite of tools that you run on a command line interface (CLI) to generate boilerplate code and interact with a Drupal 8 installation."
arch=('any')
url="http://drupalconsole.com/"
license=('GPL')
depends=('php')
makedepends=("php-box" "composer" "git")
provides=("${_pkgname}=${pkgver}")
conflicts=("${_pkgname}")
install="${_pkgname}.install"
source=("${_pkgname}"::"git+https://github.com/hechoendrupal/DrupalConsole.git")
sha512sums=('SKIP')

pkgver() {
  cd "${_pkgname}"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "${srcdir}/${_pkgname}"

  # Increase open files limit to be able to compress the phar contents
  # ulimit -n 4096
  # Remove the compression option from configuration
  sed -i '/compression/d' box.json

  php /usr/bin/composer install --no-dev
  php -d phar.readonly=Off /usr/bin/box build
}

package() {
  cd "${srcdir}/${_pkgname}"
  install -D -m755 "drupal.phar" "${pkgdir}/usr/bin/drupal"
}