45 lines
1.1 KiB
Bash
45 lines
1.1 KiB
Bash
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
|
|
|
_gemname=listen
|
|
pkgname=ruby-$_gemname
|
|
pkgver=3.7.0
|
|
pkgrel=1
|
|
pkgdesc="Listens to file modifications and notifies you about the changes"
|
|
arch=('any')
|
|
url="https://github.com/guard/listen"
|
|
license=('MIT')
|
|
depends=(
|
|
'ruby'
|
|
'ruby-rb-fsevent'
|
|
'ruby-rb-inotify'
|
|
)
|
|
options=('!emptydirs')
|
|
source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
|
|
noextract=("$_gemname-$pkgver.gem")
|
|
b2sums=('ba6788f3022bc8606694dd1001d0a28f608bc3caf33de5f9707b78ae73b3b2f523712f5a240c2cc3cd5a048da76de607e399511a56489b40799beeff022d3656')
|
|
|
|
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 cache
|
|
cd "$pkgdir/$_gemdir"
|
|
rm -vrf cache
|
|
|
|
cd "gems/$_gemname-$pkgver"
|
|
|
|
# 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.txt
|
|
}
|