blob: 89c1beebb0c27b85bb6a370b888d796eeaaa81fa (
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# Maintainer: Ian Watt <ian at ewatt.ca>
# Contributor: Jonathan Steel <jsteel at archlinux.org>
_pkgname=vagrant
pkgname=vagrant-git
pkgver=2.2.6.203.ga1abc177b
pkgrel=1
pkgdesc="Build and distribute virtualized development environments"
arch=('i686' 'x86_64')
url="https://vagrantup.com"
license=('MIT')
options=('!emptydirs')
depends=('curl' 'libarchive' 'libssh2' 'libxml2' 'libxslt' 'rsync'
'ruby' 'xz')
makedepends=('git' 'go')
provides=('vagrant')
conflicts=('vagrant' 'vagrant-substrate' 'vagrant-substrate-git')
replaces=('vagrant-substrate' 'vagrant-substrate-git')
source=(git://github.com/hashicorp/$_pkgname.git
git://github.com/hashicorp/vagrant-installers.git)
md5sums=('SKIP'
'SKIP')
pkgver() {
cd $_pkgname
git describe --tags --long | sed 's/-/./g;s/^v//'
}
build() {
cd $_pkgname
INSTALLERS_DIR="$srcdir"/vagrant-installers/substrate
gem build $_pkgname.gemspec
cp vagrant-*.gem vagrant.gem
cd "$INSTALLERS_DIR"/launcher
go get github.com/mitchellh/osext
go build -o vagrant
}
package() {
cd $_pkgname
INSTALLERS_DIR="$srcdir"/vagrant-installers/substrate
EMBEDDED_DIR="$pkgdir"/opt/vagrant/embedded
install -d "$pkgdir"/usr/{bin,share/bash-completion/completions}
install -Dm644 "$INSTALLERS_DIR"/common/gemrc \
"$EMBEDDED_DIR"/etc/gemrc
cp -r "$INSTALLERS_DIR"/common/rgloader "$EMBEDDED_DIR"
GEM_PATH="$EMBEDDED_DIR"/gems GEM_HOME="$GEM_PATH" \
GEMRC="$EMBEDDED_DIR"/etc/gemrc \
gem install $_pkgname.gem --no-document
install -Dm755 "$INSTALLERS_DIR"/launcher/vagrant \
"$pkgdir"/opt/$_pkgname/bin/$_pkgname
ln -s /opt/$_pkgname/bin/$_pkgname "$pkgdir"/usr/bin/$_pkgname
install -Dm644 contrib/bash/completion.sh \
"$pkgdir"/usr/share/bash-completion/completions/$_pkgname
install -Dm644 LICENSE \
"$pkgdir"/usr/share/licenses/$_pkgname/LICENSE
}
|