1 # Maintainer: Tim Meusel <tim@bastelfreak.de>
3 _gemname='puppet_metadata'
4 pkgname="ruby-${_gemname}"
7 pkgdesc='Data structures for the Puppet Metadata'
9 url="https://github.com/voxpupuli/${_gemname}"
11 depends=('ruby' 'ruby-metadata-json-lint' 'ruby-semantic_puppet')
12 makedepends=('ruby-rdoc' 'ruby-rake' 'ruby-rspec' 'ruby-rspec-its')
13 options=('!emptydirs')
14 source=("${url}/archive/${pkgver}/${_gemname}-${pkgver}.tar.gz")
15 sha512sums=('693e21f2791fe9aa71c61bc1df28986a6e088116e8616595f8e4abb864464c1bf3adea2b40a685b226875961d0a982ddf3444fa3201c94891a38a2627b6f15a8')
18 cd "${srcdir}/${_gemname}-${pkgver}"
19 # allow latest dependencies
20 sed --in-place 's|~>|>=|g' "${_gemname}.gemspec"
22 # drop development deps, they only cause dependency issues and aren't required
23 sed --in-place '/add_development_dependency/d' "${_gemname}.gemspec"
27 cd "${srcdir}/${_gemname}-${pkgver}"
28 gem build "${_gemname}.gemspec"
32 cd "${srcdir}/${_gemname}-${pkgver}"
37 cd "${srcdir}/${_gemname}-${pkgver}"
38 local _gemdir="$(gem env gemdir)"
39 gem install --verbose --ignore-dependencies --no-user-install --install-dir "${pkgdir}/${_gemdir}" --bindir "${pkgdir}/usr/bin" "${_gemname}-${pkgver}.gem"
41 install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
43 install -Dm 644 README.md HISTORY.md CHANGELOG.md -t "${pkgdir}/usr/share/doc/${pkgname}"
45 rm -rf "${pkgdir}/${_gemdir}/cache"