1 # Maintainer: Tim Meusel <tim@bastelfreak.de>
2 # Contributor: Christian Rebischke <chris.rebischke@archlinux.org>
5 pkgname="ruby-${_gemname}"
8 pkgdesc='Ruby support for the HOCON configuration file format'
10 url='https://github.com/puppetlabs/ruby-hocon'
13 makedepends=('ruby-rdoc')
14 checkdepends=('ruby-rspec')
15 source=("${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz")
16 options=("!emptydirs")
17 sha512sums=('c73cfd8d6c77751d1d2a35d85cad2f2eef700a01e8b8de9449c0c9dfefe8d4a80c4a79dd3db8ee4a6d2c3649f26d6780cbe05fe9b067de05ee3711b00faf4255')
20 cd "${srcdir}/${pkgname}-${pkgver}"
22 # update the gemspec to allow newer versions of rake
23 sed --in-place 's|~>|>=|g' "${_gemname}.gemspec"
25 # fix wrong license name in gemspec
26 sed --in-place 's/Apache License, v2/Apache-2.0/' "${_gemname}.gemspec"
30 cd "${srcdir}/${pkgname}-${pkgver}"
31 gem build "${_gemname}.gemspec"
35 cd "${srcdir}/${pkgname}-${pkgver}"
40 cd "${srcdir}/${pkgname}-${pkgver}"
41 local _gemdir="$(gem env gemdir)"
42 gem install --verbose --ignore-dependencies --no-user-install --install-dir "${pkgdir}/${_gemdir}" --bindir "${pkgdir}/usr/bin" "${_gemname}-${pkgver}.gem"
44 install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
45 install -Dm 644 CHANGELOG.md HISTORY.md README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
47 rm -rf "${pkgdir}/${_gemdir}/cache"