Package Details: ruby-em-websocket 0.5.3-1

Git Clone URL: https://aur.archlinux.org/ruby-em-websocket.git (read-only, click to copy)
Package Base: ruby-em-websocket
Description: EventMachine based WebSocket server
Upstream URL: https://github.com/igrigorik/em-websocket
Licenses: MIT
Provides: ruby-em-websocket
Submitter: SilverRainZ
Maintainer: bertptrs
Last Packager: bertptrs
Votes: 11
Popularity: 0.064307
First Submitted: 2018-01-15 04:59 (UTC)
Last Updated: 2024-03-28 21:22 (UTC)

Latest Comments

bertptrs commented on 2021-07-12 06:08 (UTC)

This package currently doesn't work because the included gemspec does not allow more recent versions of ruby-http_parser.rb. This is just Ruby being overly cautious, and it actually works fine. I've created a PKGBUILD that repackages the gem from source without the restriction and tested it with jekyll. Would you consider using that instead?

# Maintainer: Shengyu Zhang <la@archlinuxcn.org>

_gemname=em-websocket
pkgname=ruby-$_gemname
pkgver=0.5.2
pkgrel=3
pkgdesc='EventMachine based WebSocket server'
arch=('any')
url='https://github.com/igrigorik/em-websocket'
license=('MIT')
depends=('ruby'
    'ruby-eventmachine>=0.12.9'
    'ruby-http_parser.rb>=0.6.0'
    )
provides=("$pkgname=$pkgver")
options=(!emptydirs)
source=(${pkgname}-${pkgver}.tar.gz::https://github.com/igrigorik/em-websocket/archive/v${pkgver}.tar.gz)
sha512sums=('46df705e2af93082884c7ca521df4f6cf33309c441eb3ba96be609b2cf280e3b72c689810d55279db6dbbc178ed843d64ccdaf9d4b39d52ddac7d84956065b06')

prepare() {
  cd ${_gemname}-${pkgver}
  sed -r 's|~>|>=|g' -i ${_gemname}.gemspec # don't give a fuck about rubys bla bla
  sed 's|git ls-files|find -type f\|sed "s,\\\\./,,g"|' -i ${_gemname}.gemspec
  # test_files and executables use black magic, but we don't need them
  sed '/test_files/d' -i ${_gemname}.gemspec
  sed '/executables/d' -i ${_gemname}.gemspec
}

build() {
  cd ${_gemname}-${pkgver}
  gem build ${_gemname}.gemspec
}

package() {
  cd ${_gemname}-${pkgver}
  local _gemdir="$(ruby -e'puts Gem.default_dir')"
  gem install --ignore-dependencies --no-user-install -i "$pkgdir/$_gemdir" -n "$pkgdir/usr/bin" $_gemname-$pkgver.gem
  rm "$pkgdir/$_gemdir/cache/$_gemname-$pkgver.gem"
  install -D -m644 LICENCE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

As an added bonus, it does not need the LICENSE file to be in the aur repo anymore as it's present in the source.

SilverRainZ commented on 2018-01-17 02:09 (UTC)

@bertptrs, @lillemets thanks for reporting. It seems that the upstream named the LICENSE file as "LICENCE" so it wasn't packed in to gem. Fixed.

bertptrs commented on 2018-01-16 21:39 (UTC)

The PKGBUILD attempts to install a LICENSE file from the gem, however, the gem does not contain a LICENSE file. Instead, you should package the LICENSE in the AUR and copy it from there.

lillemets commented on 2018-01-16 18:56 (UTC)

There seems to be a mistake in the install script causing the package build to fail. Note the double slash below.

install: cannot stat '/home/jrl/.cache/pacaur/ruby-em-websocket/pkg/ruby-em-websocket//usr/lib/ruby/gems/2.5.0/gems/em-websocket-0.5.1/LICENSE': No such file or directory