44 lines
1.2 KiB
Bash
44 lines
1.2 KiB
Bash
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
|
|
|
_gemname=regexp_parser
|
|
pkgname=ruby-$_gemname
|
|
pkgver=2.1.1
|
|
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")
|
|
b2sums=('2dd96edffd541794bd84d126fce618b0c0bc910993b127f490948bafaeb9e889d93121cc57a65cab8fab4ae1422e79bca759cc4fd0e7f0886ba051f2b310a355')
|
|
|
|
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
|
|
}
|