45 lines
1.4 KiB
Bash
45 lines
1.4 KiB
Bash
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
|
|
|
pkgname=ruby-regexp_parser
|
|
_gemname="${pkgname#ruby-}"
|
|
pkgver=2.5.0
|
|
pkgrel=1
|
|
pkgdesc='A library for tokenizing, lexing, and parsing Ruby regular expressions'
|
|
arch=('any')
|
|
url='https://github.com/ammar/regexp_parser'
|
|
license=('MIT')
|
|
depends=('ruby')
|
|
makedepends=('ruby-rdoc')
|
|
options=('!emptydirs')
|
|
source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
|
|
noextract=("$_gemname-$pkgver.gem")
|
|
sha512sums=('850e0a7a6f64cd95f844fb80bf60bd0876364ee994a60d5dbd3b0fee9273c3d0995d421fe970685a11a6408e95372a17a8778c17f2cfe741cc86e3a9dc6d085a')
|
|
b2sums=('f214916dcd086c7718a09ca2fc1a7c79c0995a6c2da0e0e3f318caa2c6dd492a69e2b3307172e9bb978de29803d347b8f0fb98278940566594d167c00d5dc399')
|
|
|
|
package() {
|
|
local _gemdir="$(ruby -e'puts Gem.default_dir')"
|
|
|
|
gem install \
|
|
--verbose \
|
|
--ignore-dependencies \
|
|
--no-user-install \
|
|
--install-dir "$pkgdir/$_gemdir" \
|
|
--bindir "$pkgdir/usr/bin" \
|
|
"$_gemname-$pkgver.gem"
|
|
|
|
# delete cache
|
|
cd "$pkgdir/$_gemdir"
|
|
rm -vrf cache
|
|
|
|
# delete unnecessary files & folders
|
|
cd "gems/$_gemname-$pkgver"
|
|
rm -vrf spec Gemfile Rakefile "$_gemname.gemspec"
|
|
|
|
# move documentation
|
|
install -vd "$pkgdir/usr/share/doc/$pkgname"
|
|
mv -vt "$pkgdir/usr/share/doc/$pkgname" *.md
|
|
|
|
# move license
|
|
install -vd "$pkgdir/usr/share/licenses/$pkgname"
|
|
mv -vt "$pkgdir/usr/share/licenses/$pkgname" LICENSE
|
|
}
|