summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: eed547e2431a959caa3a7b9e147eb3f723b13bb0 (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
# Maintainer: Johannes Schleifenbaum <johannes [at] js-webcoding [dot] de>
# Please report issues at https://github.com/jojosch/pkgbuilds

pkgname="php-go"
pkgver=2.2.1
pkgrel=4
pkgdesc="A simple PHP build tool."
url="https://github.com/herrera-io/php-go"
license=("MIT")
arch=("any")
depends=("php>=5.3.3")
makedepends=("php-box" "php-composer" "git")
install="${pkgname}.install"
source=("git+https://github.com/herrera-io/php-go.git#tag=${pkgver}")
sha256sums=("SKIP")

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

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

package() {
  cd "${srcdir}/${pkgname}"

  install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  install -D -m755 "go-${pkgver}.phar" "${pkgdir}/usr/share/webapps/bin/${pkgname}.phar"
  install -d "${pkgdir}/usr/bin"
  ln -s "/usr/share/webapps/bin/${pkgname}.phar" "${pkgdir}/usr/bin/${pkgname}"
}