1 # Maintainer: Andreas 'Segaja' Schleifer <archlinux at segaja dot de>
3 _gemname='simplecov-html'
4 pkgname="ruby-${_gemname}"
7 pkgdesc='Default HTML formatter for SimpleCov code coverage tool for ruby 2.4+'
9 url="https://github.com/simplecov-ruby/${_gemname}"
12 checkdepends=('ruby-rake' 'ruby-simplecov')
14 source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
15 sha512sums=('2b4499bafda739763f52cd05be37a8db4aea4780f0ec59f077cdac36cd00396def7b61b3c567b758d78de69dc2c921a2e454d2955d6f31932883b32b77b4d98b')
18 cd "${_gemname}-${pkgver}"
20 sed --in-place --regexp-extended 's|~>|>=|g' "${_gemname}.gemspec"
21 sed --in-place --regexp-extended 's|git ls-files|find . -type f -not -path "*/\.git/*"|' "${_gemname}.gemspec"
27 cd "${_gemname}-${pkgver}"
29 gem build "${_gemname}.gemspec"
33 cd "${_gemname}-${pkgver}"
39 cd "${_gemname}-${pkgver}"
41 local _gemdir="$(gem env gemdir)"
46 --ignore-dependencies \
48 --install-dir "${pkgdir}/${_gemdir}" \
49 --bindir "${pkgdir}/usr/bin" \
50 "${_gemname}-${pkgver}.gem"
52 # remove unrepreducible files
53 rm --force --recursive --verbose \
54 "${pkgdir}/${_gemdir}/cache/" \
55 "${pkgdir}/${_gemdir}/gems/${_gemname}-${pkgver}/vendor/" \
56 "${pkgdir}/${_gemdir}/doc/${_gemname}-${pkgver}/ri/ext/"
58 find "${pkgdir}/${_gemdir}/gems/" \
65 -iname "gem.build_complete" -o \
70 find "${pkgdir}/${_gemdir}/extensions/" \
73 -iname "mkmf.log" -o \
74 -iname "gem_make.out" \
78 install --verbose -D --mode=644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
79 install --verbose -D --mode=644 *.md --target-directory "${pkgdir}/usr/share/doc/${pkgname}"