diff options
author | Jonathan Steel | 2015-09-15 22:27:41 +0100 |
---|---|---|
committer | Jonathan Steel | 2015-09-15 22:27:41 +0100 |
commit | 84532097f70ae980cd2aaf7238cd660a138a8fd3 (patch) | |
tree | 299e61a3c7c8f4d03c630b207d1fff5657bce949 /PKGBUILD | |
parent | 37bde3abea1554088f1efad23e6bb2404bb217e4 (diff) | |
download | aur-84532097f70ae980cd2aaf7238cd660a138a8fd3.tar.gz |
Build the substrate rather than using a pre-built one
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 54 |
1 files changed, 41 insertions, 13 deletions
@@ -2,25 +2,26 @@ _pkgname=vagrant pkgname=vagrant-git -pkgver=1.7.3.37.gbac5d03 +pkgver=1.7.4.40.gb79f0bb pkgrel=1 -_subver=2 pkgdesc="Build and distribute virtualized development environments" arch=('i686' 'x86_64') url="http://vagrantup.com" license=('MIT') conflicts=('vagrant') options=('!emptydirs') -makedepends=('git') +makedepends=('git' 'puppet' 'chrpath' 'wget') depends=('lzo' 'libidn' 'rtmpdump') source=(git://github.com/mitchellh/$_pkgname.git - git://github.com/mitchellh/$_pkgname-installers.git) -source_i686+=(http://pkgbuild.com/~jsteel/$_pkgname/substrate_archlinux_i686-$_subver.zip) -source_x86_64+=(http://pkgbuild.com/~jsteel/$_pkgname/substrate_archlinux_x86_64-$_subver.zip) -md5sums=('SKIP' 'SKIP') -md5sums_i686=('a72932fa4f1a936d633a8efcde8981c1') -md5sums_x86_64=('98d92dedfb660045ba779c4761deac58') - + git://github.com/mitchellh/$_pkgname-installers.git + puppet_module_libiconv.patch + libiconv.patch + readline.patch) +md5sums=('SKIP' + 'SKIP' + '293e1a9bbb8c510f1bc79d9a0bd477ed' + 'c1bd61a5617b64654c33a2afc506e499' + 'a4f87b2483c7bd724bb94a69aa5cf733') pkgver() { cd $_pkgname @@ -28,19 +29,46 @@ pkgver() { git describe --tags --long | sed 's/-/./g;s/^v//' } +prepare() { + cd $_pkgname-installers/substrate + + # Use $srcdir for the working directory + sed -i "s:/vagrant-substrate:$srcdir/vagrant-substrate:" hiera/common.yaml + + # Don't create a zip of the substrate + sed -i '48,50d' modules/vagrant_substrate/manifests/init.pp + + # Do not set file ownership + find . -name *.pp -exec sed -i "/owner.*.=.*.root/d" {} + + find . -name *.pp -exec sed -i "/group.*.=.*.root/d" {} + + + # Fix compile issues + patch -Np0 -i "$srcdir"/puppet_module_libiconv.patch + patch -Np0 -i "$srcdir"/readline.patch + + # https://github.com/mitchellh/vagrant-installers/issues/60 + sed -i '61 s/^/#/' modules/ruby/manifests/source.pp +} + build() { - cd $_pkgname + cd $_pkgname-installers/substrate + + # Create the substrate + FACTER_param_output_dir="$srcdir" puppet apply --hiera_config=config/hiera.yaml \ + --confdir=config --modulepath=modules manifests/init.pp + + cd "$srcdir"/$_pkgname REV=$( git log -n 1 --pretty=format:"%H" ) "$srcdir"/$_pkgname-installers/package/support/install_$_pkgname.sh \ - "$srcdir"/substrate/ $REV "$srcdir"/substrate/${_pkgname}_version + "$srcdir"/vagrant-substrate/staging/ $REV "$srcdir"/vagrant-substrate/staging/${_pkgname}_version } package() { install -d "$pkgdir"/{opt/,usr/bin/,usr/share/bash-completion/completions/} - cp -r "$srcdir"/substrate/ "$pkgdir"/opt/$_pkgname/ + cp -r "$srcdir"/vagrant-substrate/staging/ "$pkgdir"/opt/$_pkgname/ ln -s /opt/$_pkgname/bin/$_pkgname "$pkgdir"/usr/bin/$_pkgname |