1 # Maintainer: Tim Meusel <tim@bastelfreak.de>
2 # Contributor: Viktor Drobot (aka dviktor) linux776 [at] gmail [dot] com
5 pkgname="ruby-${_gemname}"
8 pkgdesc='A collection of text algorithms: Levenshtein, Soundex, Metaphone, Double Metaphone, Porter Stemming'
10 url='https://github.com/threedaymonk/text'
12 makedepends=('ruby-rdoc')
13 checkdepends=('ruby-test-unit' 'ruby-rake')
15 source=("${url}/archive/v${pkgver}/${pkgname}-v${pkgver}.tar.gz")
16 options=("!emptydirs")
17 sha512sums=('eaf3ce2d5a8d5cc27b6b9c5b820ffede864466a460dd1a64a1141adf1ee78a616684b484e0548ba8eb47c492f02244ffc06058a87b3ad5c2116929e9e8fe10a8')
19 # update the gemspec to allow newer versions of rake
20 # remove deprecated options from the gemspec
22 cd "${_gemname}-${pkgver}"
24 sed --in-place 's|~>|>=|g' "${_gemname}.gemspec"
25 sed --in-place '/s.rubyforge_project/d' "${_gemname}.gemspec"
26 sed --in-place '/s.has_rdoc/d' "${_gemname}.gemspec"
30 cd "${_gemname}-${pkgver}"
32 gem build "${_gemname}.gemspec"
36 cd "${_gemname}-${pkgver}"
42 cd "${_gemname}-${pkgver}"
44 local _gemdir="$(gem env gemdir)"
45 gem install --verbose --ignore-dependencies --no-user-install --install-dir "${pkgdir}/${_gemdir}" --bindir "${pkgdir}/usr/bin" "${_gemname}-${pkgver}.gem"
47 install -Dm 644 COPYING.txt -t "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
48 install -Dm 644 README.rdoc -t "${pkgdir}/usr/share/doc/${pkgname}/"
50 rm -rf "${pkgdir}/${_gemdir}/cache"