diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2014-12-11 15:36:46 -0200 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2014-12-11 15:36:46 -0200 |
commit | f4807465cdcea980522eaa847edb09b3f48face9 (patch) | |
tree | a6a2edb21a183c402bfd42bc2d88cabcf4daa18c /pcr/packer-io | |
parent | df2d8d4f7b6c6dbf1d8d767d12f74fa596241a6b (diff) | |
parent | 39e618c6933e28a1cf2939ec11c378e84d17cec6 (diff) | |
download | abslibre-f4807465cdcea980522eaa847edb09b3f48face9.tar.gz abslibre-f4807465cdcea980522eaa847edb09b3f48face9.tar.bz2 abslibre-f4807465cdcea980522eaa847edb09b3f48face9.zip |
Merge branch 'master' of ssh://projects.parabola.nu/~git/abslibre/abslibre
Diffstat (limited to 'pcr/packer-io')
-rw-r--r-- | pcr/packer-io/PKGBUILD | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/pcr/packer-io/PKGBUILD b/pcr/packer-io/PKGBUILD new file mode 100644 index 000000000..3eb9c3842 --- /dev/null +++ b/pcr/packer-io/PKGBUILD @@ -0,0 +1,42 @@ +# Maintainer : Aurelien Desbrieres <aurelien@hackers.camp> +# Contributor: Danilo Kuehn <dk[at]nogo-software[dot]de> + +_name=packer +pkgname=packer-io +pkgver=0.7.2 +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') +depends=(unzip) +optdepends=() +conflicts=() + +# https://dl.bintray.com/mitchellh/packer/packer_0.7.2_linux_amd64.zip +# https://dl.bintray.com/mitchellh/packer/#packer_0.7.2_linux_amd64.zip +if test "$CARCH" == i686; then +source=("${_name}-${pkgver}.zip::https://dl.bintray.com/mitchellh/packer/${_name}_${pkgver}_linux_386.zip") +else +source=("${_name}-${pkgver}.zip::https://dl.bintray.com/mitchellh/packer/${_name}_${pkgver}_linux_amd64.zip") +fi +noextract=(${source[@]%%::*}) + +prepare() { + if [[ -e ${srcdir}/${_name}-${pkgver} ]]; then rm -rf ${srcdir}/${_name}-${pkgver}; fi + mkdir ${srcdir}/${_name}-${pkgver} + unzip -o ${_name}-${pkgver}.zip -d ${srcdir}/${_name}-${pkgver} +} + +package() { + install -dm755 "${pkgdir}/usr/bin" + + cd "${srcdir}/${_name}-${pkgver}" + for file in `ls ${srcdir}/${_name}-${pkgver}`; do + if [ "$file" == "packer" ]; then + install -Dm755 "$file" "${pkgdir}/usr/bin/${file}-io" + else + install -Dm755 "$file" "${pkgdir}/usr/bin/${file}" + fi + done +} |