summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9337d6bbd3205bc3d6f96defd6ba6fe841a3e466 (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=2
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-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}"
}