upgpkg: ufw 0.36.2-1
[ArchLinux/community.git] / ruby-text / trunk / PKGBUILD
blob89f8ab95cf753dee5c671be01919815d9d734957
1 # Maintainer: Tim Meusel <tim@bastelfreak.de>
2 # Contributor: Viktor Drobot (aka dviktor) linux776 [at] gmail [dot] com
4 _gemname='text'
5 pkgname="ruby-${_gemname}"
6 pkgver=1.3.1
7 pkgrel=7
8 pkgdesc='A collection of text algorithms: Levenshtein, Soundex, Metaphone, Double Metaphone, Porter Stemming'
9 arch=(any)
10 url='https://github.com/threedaymonk/text'
11 license=('MIT')
12 makedepends=('ruby-rdoc')
13 checkdepends=('ruby-test-unit' 'ruby-rake')
14 depends=('ruby')
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
21 prepare() {
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"
29 build() {
30   cd "${_gemname}-${pkgver}"
32   gem build "${_gemname}.gemspec"
35 check() {
36   cd "${_gemname}-${pkgver}"
38   rake test
41 package() {
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"
52 # vim: ts=2 sw=2 et: