addpkg: ruby-regexp_parser 2.1.1-1
This commit is contained in:
parent
fcd5219d82
commit
e5fd11a44f
1 changed files with 44 additions and 0 deletions
44
ruby-regexp_parser/PKGBUILD
Normal file
44
ruby-regexp_parser/PKGBUILD
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
# 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
|
||||||
|
}
|
Loading…
Reference in a new issue