Package Details: r10k 3.3.3-1

Git Clone URL: https://aur.archlinux.org/r10k.git (read-only, click to copy)
Package Base: r10k
Description: R10K provides a general purpose toolset for deploying Puppet environments and modules.
Upstream URL: https://github.com/puppetlabs/r10k
Licenses: Apache
Submitter: arakmar
Maintainer: arakmar
Last Packager: arakmar
Votes: 0
Popularity: 0.000000
First Submitted: 2017-03-02 08:48
Last Updated: 2019-12-24 11:29

Latest Comments

bastelfreak commented on 2020-01-05 13:52

Hi, I updated the PKGBUILD to properly build from source:

# Maintainer: Tim Meusel <tim@bastelfreak.de>

pkgname='r10k'
pkgver=3.3.3
pkgrel=1
pkgdesc='Provides a general purpose toolset for deploying Puppet environments and modules. It implements the Puppetfile format and provides a native implementation of Puppet dynamic environments.'
arch=('any')
url='https://github.com/puppetlabs/r10k'
license=('Apache')
makedepends=('ruby-rdoc' 'ruby-rspec' 'ruby-minitar')
depends=('ruby' 'ruby-puppet_forge' 'ruby-gettext-setup' 'ruby-cri' 'git' 'ruby-rugged' 'ruby-multi_json' 'ruby-log4r' 'ruby-colored')
source=("https://github.com/puppetlabs/r10k/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz" 'disable-sha256-test.patch' 'disable-insync-module-test.patch')
options=("!emptydirs")
sha512sums=('b1b0b7ec8e5ae037156b81e2c36394bae0a682fe26e1078c8733694eadee03373a306a2ca73b6ecabf1d041f5a8603e27b0dbee9616dcd7b5e9add9b8f82b621'
            '85c926c844a4dac21ef2279f26062de2a531e418a4d3deb05a650e629c599f67ac113141adbc38cd9a60bf1360313b8ce57d3a67362649192b7bf3ca86f7ad43'
            '07b0b266a2a899e7b4787fa5fe8185adfa3ca6f66b7a9361feceb993713b4ea4823a8fa55af04739a62fbce4fd70951894c7443dcac4f58f3b8719719e45e6f0')

# update the gemspec to allow newer versions of rake
# remove deprecated options from the gemspec
prepare() {
  cd "${pkgname}-${pkgver}"
  sed --in-place 's|~>|>=|g' "${pkgname}.gemspec"
  sed --in-place 's|.*git ls-files.*|  s.files        = `find`.split("\\n")|' "${pkgname}.gemspec"

  # disable broken tests
  patch -p1 -N -i "${srcdir}/disable-sha256-test.patch"
  patch -p1 -N -i "${srcdir}/disable-insync-module-test.patch"

  # allow latest ruby-cri version
  sed --in-place "s/s.add_dependency 'cri',       '2.15.6'/s.add_dependency 'cri', '>= 2.15.6'/" "${pkgname}.gemspec"
}

build() {
  cd "${pkgname}-${pkgver}"
  gem build "${pkgname}.gemspec"
}

check() {
  cd "${pkgname}-${pkgver}"
  # The spec tests show a few warnings because upstream currently doesn't test on Ruby 2.6
  # First PR to fix this: https://github.com/puppetlabs/r10k/pull/1006
  rspec --color --format documentation spec/unit
}

package() {
  cd "${pkgname}-${pkgver}"
  local _gemdir="$(gem env gemdir)"
  gem install --verbose --ignore-dependencies --no-user-install --install-dir "${pkgdir}/${_gemdir}" --bindir "${pkgdir}/usr/bin" "${pkgname}-${pkgver}.gem"

  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"

  rm -rf "${pkgdir}/${_gemdir}/cache"
}

# vim: ts=2 sw=2 et: