Date: Wednesday, November 2, 2022 @ 23:35:47
  Author: felixonmars
Revision: 1341163

addpkg: ruby-notiffany 0.1.3-1

Added:
  ruby-notiffany/
  ruby-notiffany/repos/
  ruby-notiffany/trunk/
  ruby-notiffany/trunk/PKGBUILD

----------+
 PKGBUILD |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

Added: ruby-notiffany/trunk/PKGBUILD
===================================================================
--- ruby-notiffany/trunk/PKGBUILD                               (rev 0)
+++ ruby-notiffany/trunk/PKGBUILD       2022-11-02 23:35:47 UTC (rev 1341163)
@@ -0,0 +1,58 @@
+# Maintainer: Felix Yan <[email protected]>
+
+pkgname=ruby-notiffany
+pkgver=0.1.3
+pkgrel=1
+pkgdesc='Wrapper libray for most popular notification libraries such as Growl, 
Libnotify, Notifu'
+arch=(any)
+url='https://github.com/guard/notiffany'
+license=(MIT)
+depends=(ruby-nenv ruby-shellany)
+checkdepends=(ruby-rake ruby-rspec tmux)
+options=(!emptydirs)
+source=(https://github.com/guard/notiffany/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
+sha256sums=('1f4dda29b909e639a45bff517eaa3298d2038f610d2c56bd6ef53fa7827da3b4')
+
+prepare() {
+  cd notiffany-$pkgver
+  sed -i -e 's|~>|>=|' -e 's|git ls-files -z|find . -type f -not -path 
"*/\.git/*" -printf "%P\\\\0"|' notiffany.gemspec
+}
+
+build() {
+  local _gemdir="$(gem env gemdir)"
+  cd notiffany-$pkgver
+  gem build notiffany.gemspec
+  gem install \
+    --local \
+    --verbose \
+    --ignore-dependencies \
+    --no-user-install \
+    --install-dir "tmp_install/$_gemdir" \
+    --bindir "tmp_install/usr/bin" \
+    notiffany-$pkgver.gem
+  find "tmp_install/$_gemdir/gems/" \
+    -type f \
+    \( \
+        -iname "*.o" -o \
+        -iname "*.c" -o \
+        -iname "*.so" -o \
+        -iname "*.time" -o \
+        -iname "gem.build_complete" -o \
+        -iname "Makefile" \
+    \) \
+    -delete
+  rm -r tmp_install/$_gemdir/cache
+}
+
+check() {
+  local _gemdir="$(gem env gemdir)"
+  cd notiffany-$pkgver
+  # https://github.com/guard/notiffany/issues/44
+  GEM_HOME="tmp_install/$_gemdir" rake || echo "Tests failed"
+}
+
+package() {
+  cd notiffany-$pkgver
+  cp -a tmp_install/* "$pkgdir"/
+  install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/
+}

Reply via email to