41 lines
1.2 KiB
Bash
41 lines
1.2 KiB
Bash
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
|
|
|
_gemname=http_parser.rb
|
|
pkgname=ruby-$_gemname
|
|
pkgver=0.7.0
|
|
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")
|
|
b2sums=('3bf2e71a433bcbf4852adb07c06f3bffd41fbf2d863b9cdd2f9a5ea352ae335dc960970066cbcfbf84d2cb5c1627ce852afb7315a34ab80af0af458a7ebb043d')
|
|
|
|
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
|
|
cd "gems/$_gemname-$pkgver"
|
|
rm -rf ext .git*
|
|
|
|
# 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"
|
|
}
|
|
|