1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
5 _gitcommit=1d6b4f760ae753440db4e7ccf0e0ddba621bf25f
6 pkgver=0.1.1+13+1d6b4f7
8 pkgdesc="Ruby version of John Gruber's TitleCase.pl"
9 url='https://github.com/samsouder/titlecase'
13 makedepends=('git' 'ruby-rdoc')
14 options=('!emptydirs')
15 source=(${pkgname}::"git+https://github.com/samsouder/titlecase#commit=${_gitcommit}")
21 "$(grep version ${_gemname}.gemspec|sed -r 's/.+s.version = "(.+)"/\1/')" \
22 "$(git rev-list --count HEAD)" \
23 "$(git rev-parse --short HEAD)"
28 sed -r 's|~>|>=|g' -i ${_gemname}.gemspec # don't give a fuck about rubys bla bla
29 sed 's|git ls-files|find|' -i ${_gemname}.gemspec
34 gem build ${_gemname}.gemspec
39 local _gemdir="$(gem env gemdir)"
40 local _gemver="$(grep version ${_gemname}.gemspec|sed -r 's/.+s.version = "(.+)"/\1/')"
41 gem install --ignore-dependencies --no-user-install -i "${pkgdir}${_gemdir}" -n "${pkgdir}/usr/bin" ${_gemname}-${_gemver}.gem
42 install -Dm 644 README -t "${pkgdir}/usr/share/doc/${pkgname}"
43 install -Dm 644 README -t "${pkgdir}/usr/share/licenses/${pkgname}"
44 rm "${pkgdir}/${_gemdir}/cache/${_gemname}-${_gemver}.gem"