addpkg: ruby-guard-compat
This commit is contained in:
parent
77f0132fd9
commit
ccf5c23792
1 changed files with 46 additions and 0 deletions
46
ruby-guard-compat/PKGBUILD
Normal file
46
ruby-guard-compat/PKGBUILD
Normal file
|
@ -0,0 +1,46 @@
|
|||
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
||||
# Contributor: Mario Finelli <mario at finel dot li>
|
||||
|
||||
_gemname=guard-compat
|
||||
pkgname=ruby-${_gemname}
|
||||
pkgver=1.2.1
|
||||
pkgrel=2
|
||||
pkgdesc="Test helper for testing Guard plugins"
|
||||
arch=('any')
|
||||
url="https://github.com/guard/guard-compat"
|
||||
license=('MIT')
|
||||
depends=('ruby')
|
||||
makedepends=('ruby-rdoc')
|
||||
options=('!emptydirs')
|
||||
source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
|
||||
noextract=("$_gemname-$pkgver.gem")
|
||||
b2sums=('988365132a2594deff90623dd2d590b14f12b4d119e0d486c865dc0c3c53e67fe9c831173eeb009c4a37fa6061bf07c59f8759b5a63a86fbfd1010576ac18663')
|
||||
|
||||
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"
|
||||
find . -type f -name ".*" -delete
|
||||
rm -vrf spec Gemfile Rakefile "$_gemname.gemspec"
|
||||
|
||||
# move documentation
|
||||
install -vd "$pkgdir/usr/share/doc/$pkgname"
|
||||
mv -vt "$pkgdir/usr/share/doc/$pkgname" README.md
|
||||
|
||||
# move license
|
||||
install -vd "$pkgdir/usr/share/licenses/$pkgname"
|
||||
mv -vt "$pkgdir/usr/share/licenses/$pkgname" LICENSE.txt
|
||||
}
|
Loading…
Reference in a new issue