1 # Maintainer: Andreas 'Segaja' Schleifer <segaja at archlinux dot org>
4 pkgname="ruby-${_gemname}"
7 pkgdesc='Small ERB Implementation'
9 url="https://github.com/jeremyevans/erubi"
12 makedepends=('ruby-rake' 'ruby-rdoc')
13 checkdepends=('ruby-minitest' 'ruby-minitest-global_expectations')
15 source=("${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz")
16 sha512sums=('6e1a044a8468b6cd0262e4058a45415b9a4e1f230bbd7256956d5416674feb4af6a1dea290733a3dbaeab92394625664a1e61cbe36e7278e1e030c6a9b16d692')
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"
26 cd "${_gemname}-${pkgver}"
28 gem build "${_gemname}.gemspec"
32 cd "${_gemname}-${pkgver}"
38 cd "${_gemname}-${pkgver}"
40 local _gemdir="$(gem env gemdir)"
42 gem install --ignore-dependencies --no-user-install --install-dir "${pkgdir}/${_gemdir}" --bindir "${pkgdir}/usr/bin" "${_gemname}-${pkgver}.gem"
44 # remove unrepreducible files
45 rm --force --recursive --verbose \
46 "${pkgdir}/${_gemdir}/cache/" \
47 "${pkgdir}/${_gemdir}/gems/${_gemname}-${pkgver}/vendor/" \
48 "${pkgdir}/${_gemdir}/doc/${_gemname}-${pkgver}/ri/ext/"
50 find "${pkgdir}/${_gemdir}/gems/" \
57 -iname "gem.build_complete" -o \
62 find "${pkgdir}/${_gemdir}/extensions/" \
65 -iname "mkmf.log" -o \
66 -iname "gem_make.out" \
70 install -Dm 644 MIT-LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
71 install -Dm 644 CHANGELOG README.rdoc --target-directory "${pkgdir}/usr/share/doc/${pkgname}"