2021-07-24 10:00:43 +00:00
|
|
|
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
|
|
|
|
|
|
|
_gemname=http_parser.rb
|
|
|
|
pkgname=ruby-$_gemname
|
2021-09-01 19:59:26 +00:00
|
|
|
pkgver=0.8.0
|
2021-07-24 10:00:43 +00:00
|
|
|
pkgrel=1
|
|
|
|
pkgdesc="A simple callback-based HTTP request/response parser"
|
|
|
|
arch=('x86_64')
|
|
|
|
url="http://github.com/tmm1/http_parser.rb"
|
|
|
|
license=('MIT')
|
|
|
|
depends=('ruby')
|
|
|
|
options=('!emptydirs')
|
|
|
|
source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
|
|
|
|
noextract=("$_gemname-$pkgver.gem")
|
2021-09-01 19:59:26 +00:00
|
|
|
b2sums=('e02fa70e5f5219d70c887db47541985b07f938bb32c4cca943a3d50f73e3baf820a733a2f479f5d40a2e1dabda4d8ae2466834c8b6d8167646a8fb6dcf7c792b')
|
2021-07-24 10:00:43 +00:00
|
|
|
|
|
|
|
package() {
|
|
|
|
local _gemdir="$(ruby -e'puts Gem.default_dir')"
|
|
|
|
gem install \
|
|
|
|
--ignore-dependencies \
|
|
|
|
--no-user-install \
|
|
|
|
--no-document \
|
|
|
|
--install-dir "$pkgdir/$_gemdir" \
|
|
|
|
--bindir "$pkgdir/usr/bin" \
|
|
|
|
"$_gemname-$pkgver.gem"
|
|
|
|
|
|
|
|
# delete unnecessary files & folders
|
|
|
|
cd "$pkgdir/$_gemdir"
|
|
|
|
rm -rf cache
|
2021-09-01 19:59:26 +00:00
|
|
|
rm -vrf "extensions/$CARCH-linux/$(basename $_gemdir)/$_gemname-$pkgver/gem_make.out"
|
2021-07-24 10:00:43 +00:00
|
|
|
cd "gems/$_gemname-$pkgver"
|
2021-09-01 19:59:26 +00:00
|
|
|
rm -rf Gemfile Rakefile "$_gemname.gemspec" bench spec tasks ext .git*
|
2021-07-24 10:00:43 +00:00
|
|
|
|
|
|
|
# move documentation
|
|
|
|
install -vd "$pkgdir/usr/share/doc/$pkgname"
|
|
|
|
mv README.md "$pkgdir/usr/share/doc/$pkgname"
|
|
|
|
|
|
|
|
# move license
|
|
|
|
install -vd "$pkgdir/usr/share/licenses/$pkgname"
|
|
|
|
mv LICENSE-MIT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
|
|
}
|
|
|
|
|