1 # Maintainer: Andreas 'Segaja' Schleifer <segaja at archlinux dot org>
3 _gemname='rake-compiler-dock'
4 pkgname="ruby-${_gemname}"
7 pkgdesc='Easy to use and reliable cross compiler environment for building Windows, Linux, Mac and JRuby binary gems'
9 url='https://github.com/rake-compiler/rake-compiler-dock'
11 options=('!emptydirs')
13 makedepends=('ruby-bundler' 'ruby-rake')
14 source=("${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz")
15 sha512sums=('1f44d4f66e0b7d79d2831655542d24e9a160529cc840fcd6c08dc9052f848ed02a15142b69ad247d831f268522c115a1f529c34d984470bfbdd025f1259b3735')
18 cd "${_gemname}-${pkgver}"
20 # update gemspec/Gemfile to allow newer version of the dependencies
21 sed --in-place --regexp-extended 's|~>|>=|g' "${_gemname}.gemspec"
23 # we built based on a tar archive, not a git repo
24 sed --in-place 's/git ls-files -z/find -print0/' "${_gemname}.gemspec"
28 cd "${_gemname}-${pkgver}"
30 gem build "${_gemname}.gemspec"
34 cd "${_gemname}-${pkgver}"
36 local _gemdir="$(gem env gemdir)"
41 --ignore-dependencies \
43 --install-dir "${pkgdir}/${_gemdir}" \
44 --bindir "${pkgdir}/usr/bin" \
45 "${_gemname}-${pkgver}.gem"
47 # remove unrepreducible files
48 rm --force --recursive --verbose \
49 "${pkgdir}/${_gemdir}/cache/" \
50 "${pkgdir}/${_gemdir}/gems/${_gemname}-${pkgver}/vendor/" \
51 "${pkgdir}/${_gemdir}/doc/${_gemname}-${pkgver}/ri/ext/"
53 find "${pkgdir}/${_gemdir}/gems/" \
60 -iname "gem.build_complete" -o \
65 find "${pkgdir}/${_gemdir}/extensions/" \
68 -iname "mkmf.log" -o \
69 -iname "gem_make.out" \
73 install --verbose -D --mode=0644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
74 install --verbose -D --mode=0644 *.md --target-directory "${pkgdir}/usr/share/doc/${pkgname}"