[arch-commits] Commit in ruby-nats-pure/trunk (LICENSE PKGBUILD)

Thore Bödecker foxxx0 at archlinux.org
Mon Jan 8 13:55:16 UTC 2018


    Date: Monday, January 8, 2018 @ 13:55:15
  Author: foxxx0
Revision: 280523

upgpkg: ruby-nats-pure 0.2.4-2

cleanup, fixes, license, bump pkgrel

Added:
  ruby-nats-pure/trunk/LICENSE
Modified:
  ruby-nats-pure/trunk/PKGBUILD

----------+
 LICENSE  |   21 +++++++++++++++
 PKGBUILD |   83 ++++++++++++++++++++-----------------------------------------
 2 files changed, 49 insertions(+), 55 deletions(-)

Added: LICENSE
===================================================================
--- LICENSE	                        (rev 0)
+++ LICENSE	2018-01-08 13:55:15 UTC (rev 280523)
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016-2017 Apcera Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-01-08 13:43:08 UTC (rev 280522)
+++ PKGBUILD	2018-01-08 13:55:15 UTC (rev 280523)
@@ -1,62 +1,35 @@
-# Maintainer: Tim Meusel <tim at bastelfreak.de>
-_gemname="nats-pure"
-_gembuilder=("install"
-             "fix")
-_gem="/usr/bin/gem"
-pkgname="ruby-nats-pure"
-pkgver="0.2.4"
-pkgrel=1
-pkgdesc="NATS is an open-source, high-performance, lightweight cloud messaging system."
-arch=("any")
+# Maintainer: Thore Bödecker <foxxx0 at archlinux.org>
+# Contributor: Tim Meusel <tim at bastelfreak.de>
+
+_gemname='nats-pure'
+pkgname="ruby-${_gemname}"
+pkgver=0.2.4
+pkgrel=2
+pkgdesc="Ruby client for the NATS messaging system"
 url="https://nats.io"
-license=("MIT")
-depends=("ruby")
-source=("https://rubygems.org/gems/$_gemname-$pkgver.gem")
-sha512sums=("32cd6df93a050004d116b25a0db1b8c3844aaa8f3047b431eaf5285531b4b3ae791272d1e2e20c19fa529ab0329d579b2c8a4393723e3a9fa31410102e9fad11")
-noextract=("$_gemname-$pkgver.gem")
-options=("!emptydirs")
+arch=('any')
+license=('MIT')
+depends=('ruby')
+options=('!emptydirs')
+source=("https://rubygems.org/gems/${_gemname}-${pkgver}.gem"
+        'LICENSE')
+noextract=("${_gemname}-${pkgver}.gem")
+sha512sums=('32cd6df93a050004d116b25a0db1b8c3844aaa8f3047b431eaf5285531b4b3ae791272d1e2e20c19fa529ab0329d579b2c8a4393723e3a9fa31410102e9fad11'
+            'ec05133944c3dc861ae437ce8681f54a871b614ff020fd4db1b3b3eb75f9e612222b682d1cceb5a3335e479e3541072abd4abc8f272d2e4d8803f97fe9f58b08')
 
-_gem_install() {
-  msg 'Installing gem...'
+package() {
+  local _gemdir="$(ruby -e'puts Gem.default_dir')"
 
-  # Install the gem
-  install -d -m755 $_bindir $_gemdir
-  $_gem install --no-ri --no-rdoc --ignore-dependencies --no-user-install \
-                --bindir $_bindir --install-dir $_gemdir "$srcdir/$_gemname-$pkgver.gem"
-}
+  gem install \
+    --ignore-dependencies \
+    --no-user-install \
+    -i "${pkgdir}${_gemdir}" \
+    -n "${pkgdir}/usr/bin" \
+    ${_gemname}-${pkgver}.gem
 
-_gem_fix() {
-  msg 'Fixing gem installation...'
+  rm "${pkgdir}/${_gemdir}/cache/${_gemname}-${pkgver}.gem"
 
-  # Set mode of executables to 755
-  [[ -d "$_gemdir/bin" ]] && find "$_gemdir/bin" -type f -exec chmod 755 -- '{}' ';'
-
-  # Remove cached gem file
-  rm -f "$_gemdir/cache/$_gemname-$pkgver.gem"
-
-  # Sometimes there are files which are not world readable. Fix this.
-  find $pkgdir -type f '!' -perm '-004' -exec chmod o+r -- '{}' ';'
+  install -D -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
 }
 
-_gem_cleanext() {
-  msg 'Removing native build leftovers...'
-  local extdir="$_gemdir/gems/$_gemname-$pkgver/ext"
-  [[ -d $extdir ]] && find "$extdir" -name '*.o' -exec rm -f -- '{}' ';'
-}
-
-_rbconfig() {
-  ruby -e "require 'rbconfig'; puts RbConfig::CONFIG['$1']"
-}
-
-package() {
-  # Directories defined inside build() because if ruby is not installed on the system
-  # makepkg will barf when sourcing the PKGBUILD
-  _gemdestdir=$($_gem environment gemdir)
-  _gemdir=$pkgdir$_gemdestdir
-  _bindir=$pkgdir$(_rbconfig bindir)
-
-  local i
-  for i in ${_gembuilder[@]}; do
-    _gem_$i
-  done
-}
+# vim: ts=2 sw=2 et:



More information about the arch-commits mailing list