1 # Maintainer: Andreas 'Segaja' Schleifer <segaja at archlinux dot org>
3 _gemname='permessage_deflate'
4 pkgname="ruby-${_gemname}"
7 pkgdesc='Per-message DEFLATE compression extension for WebSocket connections'
9 url='https://github.com/faye/permessage-deflate-ruby'
13 checkdepends=('ruby-bundler' 'ruby-rspec')
14 source=("${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz")
15 sha512sums=('9e8e9af7cf7d13d05420ebe773e1bef4212174d82d87f9e4a2cac96dee197666cff60ffbc3f0744d3dbd2ae59b07a90bbbffa513632aafb38a0ba2b01ec6e471')
18 cd "${_gemname/_/-}-ruby-${pkgver}"
20 # update gemspec/Gemfile to allow newer version of the dependencies
21 sed --in-place --regexp-extended 's|~>|>=|g' "${_gemname}.gemspec"
25 cd "${_gemname/_/-}-ruby-${pkgver}"
27 gem build "${_gemname}.gemspec"
31 cd "${_gemname/_/-}-ruby-${pkgver}"
37 cd "${_gemname/_/-}-ruby-${pkgver}"
39 local _gemdir="$(gem env gemdir)"
41 gem install --ignore-dependencies --no-user-install -i "${pkgdir}/${_gemdir}" -n "${pkgdir}/usr/bin" "${_gemname}-${pkgver}.gem"
43 rm "${pkgdir}/${_gemdir}/cache/${_gemname}-${pkgver}.gem"
45 install -Dm 644 LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
46 install -Dm 644 CHANGELOG.md CODE_OF_CONDUCT.md README.md --target-directory "${pkgdir}/usr/share/doc/${pkgname}"