1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
4 pkgname=ruby-${_gemname}
7 pkgdesc='Commandline option parser for Ruby that just gets out of your way'
8 url='https://github.com/ManageIQ/optimist'
12 makedepends=('ruby-rdoc' 'ruby-rake' 'ruby-bundler')
13 checkdepends=('ruby-minitest' 'ruby-chronic')
14 options=('!emptydirs')
15 source=(https://github.com/ManageIQ/optimist/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
16 sha512sums=('bb91d7bfde9fa58de0c0050ec7edd3d5e4f19ffe07339b1562aa31af96b98d6b60644f727ba9f49489b520b135d473f1d99fc7fffa96d4dc9b50b1103c778ef5')
17 b2sums=('91510cfca18ddc3c64d5ab0666374e9eaa033e350dd34a8e63fd375f0e1641e496a48746558ad4b0417965b0208ca9f555befcd7adc848910a13f0e98cfae6c8')
20 cd ${_gemname}-${pkgver}
21 sed -r 's|~>|>=|g' -i ${_gemname}.gemspec
22 sed 's|git ls-files -z|find -print0|' -i ${_gemname}.gemspec
26 cd ${_gemname}-${pkgver}
27 gem build ${_gemname}.gemspec
31 cd ${_gemname}-${pkgver}
36 cd ${_gemname}-${pkgver}
37 local _gemdir="$(gem env gemdir)"
38 gem install --ignore-dependencies --no-user-install -i "${pkgdir}${_gemdir}" \
39 -n "${pkgdir}/usr/bin" ${_gemname}-${pkgver}.gem
40 install -Dm 644 README.md History.txt -t "${pkgdir}/usr/share/doc/${pkgname}"
41 install -Dm 644 README.md -t "${pkgdir}/usr/share/licenses/${pkgname}"
43 cd "${pkgdir}/${_gemdir}"
44 rm "${pkgdir}/${_gemdir}/cache/${_gemname}-${pkgver}.gem"
45 rm -r "${pkgdir}/${_gemdir}/gems/${_gemname}-${pkgver}/test"