summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cacf641895a74b818e880c3993d538559ad9ec17 (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
# Maintainer: David Z. Kil <dave at thekilempire dot com>

pkgname=packer-io-git
pkgver=0.12.3.r317.g932c4715e
pkgver() {
  cd "$srcdir/packer"
  git describe --long --tags | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
}
pkgrel=1
pkgdesc="Packer is a tool for creating identical machine images for multiple platforms from a single source configuration."
url="http://www.packer.io"
arch=('x86_64' 'i686')
license=('MPL2')
conflicts=('packer-io')
makedepends=('mercurial' 'go' 'bzr')
source=('packer::git+http://github.com/hashicorp/packer')
md5sums=('SKIP')

prepare() {
  export GOPATH=$srcdir
  go get -u github.com/hashicorp/packer
}

build() {
  export GOPATH=$srcdir
  cd "$srcdir/src/github.com/hashicorp/packer"
  PATH="$PATH:$srcdir/bin" make
}

package() {
  install -dm755 "$pkgdir/usr/bin"
  install -Dm755 "$srcdir/bin/packer" "$pkgdir/usr/bin/packer-io"
}