From e1f6d7c56a5c1f8e08d02f1861cadfb4cb164436 Mon Sep 17 00:00:00 2001 From: George Rawlinson Date: Fri, 30 Jul 2021 06:58:46 +0000 Subject: [PATCH] addpkg: ruby-listen 3.6.0-1 --- ruby-listen/PKGBUILD | 45 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 ruby-listen/PKGBUILD diff --git a/ruby-listen/PKGBUILD b/ruby-listen/PKGBUILD new file mode 100644 index 0000000..1171056 --- /dev/null +++ b/ruby-listen/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: George Rawlinson + +_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 +}