1 # Maintainer: Andreas 'Segaja' Schleifer <segaja at archlinux dot org>
4 pkgname="ruby-${_gemname}"
7 pkgdesc='a fast sampling profiler for ruby code, with cpu, wallclock and object allocation samplers'
9 url="https://github.com/tmm1/${_gemname}"
12 checkdepends=('ruby-mocha' 'ruby-rake-compiler')
13 options=('!emptydirs')
14 source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
15 sha512sums=('8c4fc148fb919cae0998f9c78fa061fe8b93085e087f0a7256e077ebcc47c522d6046ce7ecd8e43aac52f2da5295b7554149dd3914effed04beb22b21e333c72')
16 b2sums=('a055c9eff2b3b247d60134c96971a373c8b638bec05bc7f7e050f4c4a79cdabd7f8494b2af74f8cf79e64a3d4ad5ea1b9af9916e5fb239019bc2d3d1dca80e02')
19 cd "${_gemname}-${pkgver}"
21 # update gemspec/Gemfile to allow newer version of the dependencies
22 sed --in-place --regexp-extended 's|~>|>=|g' "${_gemname}.gemspec"
24 # we don't build from a git checkout
25 sed --in-place --regexp-extended 's|git ls-files|find . -type f -not -path "*/\.git/*"|' "${_gemname}.gemspec"
29 cd "${_gemname}-${pkgver}"
31 local _gemdir="$(gem env gemdir)"
33 gem build "${_gemname}.gemspec"
38 --ignore-dependencies \
40 --install-dir "tmp_install/${_gemdir}" \
41 --bindir "tmp_install/usr/bin" \
42 "${_gemname}-${pkgver}.gem"
44 # remove unrepreducible files
45 rm --force --recursive --verbose \
46 "tmp_install/${_gemdir}/cache/" \
47 "tmp_install/${_gemdir}/gems/${_gemname}-${pkgver}/vendor/" \
48 "tmp_install/${_gemdir}/doc/${_gemname}-${pkgver}/ri/ext/"
50 find "tmp_install/${_gemdir}/gems/" \
57 -iname "gem.build_complete" -o \
62 find "tmp_install/${_gemdir}/extensions/" \
65 -iname "mkmf.log" -o \
66 -iname "gem_make.out" \
72 cd "${_gemname}-${pkgver}"
74 local _gemdir="$(gem env gemdir)"
76 GEM_HOME="tmp_install/${_gemdir}" rake test
80 cd "${_gemname}-${pkgver}"
82 cp --archive --verbose tmp_install/* "${pkgdir}"
84 install --verbose -D --mode=0644 LICENSE* --target-directory "${pkgdir}/usr/share/licenses/${pkgname}"
85 install --verbose -D --mode=0644 *.md --target-directory "${pkgdir}/usr/share/doc/${pkgname}"