arch-pkgs/ruby-listen/PKGBUILD

46 lines
1.1 KiB
Text
Raw Normal View History

2021-07-30 06:58:46 +00:00
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
_gemname=listen
pkgname=ruby-$_gemname
pkgver=3.6.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=('f0d853b73a38c8a5c3fc444a2a46f33bf7b148cf7718f14e40cd2fc2b7571aa98ba10f6bfdaa58d11b0bc353d726baf7346b29d144c11bd84223e80c7805c94d')
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
}