aboutsummaryrefslogtreecommitdiff
path: root/srcpkgs/vagrant/template
blob: 61c218eca895bd68e2c6339685be4ae57ef7c276 (plain) (blame)
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
# Template file for 'vagrant'
pkgname=vagrant
version=2.4.3
revision=1
archs="i686 x86_64*"
build_style=gemspec
depends="bsdtar curl openssh rsync"
short_desc="Tool for building and distributing development environments"
maintainer="Andrea Brancaleoni <abc@pompel.me>"
license="BUSL-1.1"
homepage="https://www.vagrantup.com/"
changelog="https://raw.githubusercontent.com/hashicorp/vagrant/main/CHANGELOG.md"
distfiles="https://github.com/hashicorp/vagrant/archive/v${version}.tar.gz"
checksum=65059d4825799412fc5d49cebc2170240164fadc37d2ada54531d1f77a9e6762
nocross=yes
repository=nonfree

do_install() {
	local dc=yes
	# https://build.voidlinux.org/builders/x86_64-musl_builder/builds/50813/steps/shell_3/logs/stdio
	if [ "$XBPS_TARGET_LIBC" = musl ]; then
		dc=
	fi
	GEM_PATH=$DESTDIR/usr/lib/vagrant GEM_HOME="$GEM_PATH" \
	gem install vagrant-$version.gem --no-document -- ${dc:+--disable-clean}

	vlicense LICENSE

	vbin $FILESDIR/vagrant

	vcompletion "contrib/bash/completion.sh" bash

	vinstall contrib/vim/vagrantfile.vim 644 /usr/share/vim/vim90/ftplugin

	find ${DESTDIR} -type f -name \*.a -delete
	find ${DESTDIR} -type f -name \*.log -delete
	find ${DESTDIR} -type f -name \*.c -delete
	find ${DESTDIR} -type f -name \*.o -delete
	find ${DESTDIR} -type f -name \*.S -delete
	find ${DESTDIR} -type f -name \*.css -delete
	find ${DESTDIR} -type f -name \*.html -delete
	find ${DESTDIR} -type f -name \*.rhtml -delete
	find ${DESTDIR} -type f -name \*.md -delete
	find ${DESTDIR} -type f -name \*.h -delete
	find ${DESTDIR} -type f -name \*.mk -delete
	find ${DESTDIR} -type f -name \*.am -delete
	find ${DESTDIR} -type f -name \*.in -delete
	find ${DESTDIR} -type f -name \*akefile -delete
	find ${DESTDIR} -type f -name Gemfile -delete
	find ${DESTDIR} -type f -name LICENSE -delete
	find ${DESTDIR} -type f -name .\* -delete
	find ${DESTDIR} -type f -name \*.rdoc -delete
	find ${DESTDIR} -type d -name ext -print0|xargs -0 rm -rf --
	find ${DESTDIR} -type d -name test -print0|xargs -0 rm -rf --
	find ${DESTDIR} -type d -name examples -print0|xargs -0 rm -rf --
	find ${DESTDIR} -type d -name doc -print0|xargs -0 rm -rf --
	find ${DESTDIR} -type d -name ports -print0|xargs -0 rm -rf --
	rm -r ${DESTDIR}/usr/lib/vagrant/cache

	# XXX: work around bad permissions
	chmod -R go-wx ${DESTDIR}/usr/lib/vagrant/gems/google-protobuf-*/lib/google
}