[arch-commits] Commit in (4 files)

Levente Polyak anthraxx at archlinux.org
Wed Mar 20 20:18:02 UTC 2019


    Date: Wednesday, March 20, 2019 @ 20:18:02
  Author: anthraxx
Revision: 442983

addpkg: ruby-optimist 3.0.0-1

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

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

Added: ruby-optimist/trunk/PKGBUILD
===================================================================
--- ruby-optimist/trunk/PKGBUILD	                        (rev 0)
+++ ruby-optimist/trunk/PKGBUILD	2019-03-20 20:18:02 UTC (rev 442983)
@@ -0,0 +1,48 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+
+_gemname=optimist
+pkgname=ruby-${_gemname}
+pkgver=3.0.0
+pkgrel=1
+pkgdesc='Commandline option parser for Ruby that just gets out of your way'
+url='https://github.com/ManageIQ/optimist'
+arch=('any')
+license=('MIT')
+depends=('ruby')
+makedepends=('ruby-rdoc' 'ruby-rake' 'ruby-bundler')
+checkdepends=('ruby-minitest' 'ruby-chronic')
+options=('!emptydirs')
+source=(https://github.com/ManageIQ/optimist/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
+sha256sums=('a8f86b0c6c5a31361acca40e33e55f7b9c9d5cbd9c6711dabb8e52c8858c0d61')
+sha512sums=('f08884196516cd799f7e615b8b533eb315b53aa7049395f713502983c548e69dc4a7e6e01bb2b12e8860a8823ffd9c7218fbb645f65683682d0e7a12ced11e60')
+
+prepare() {
+  cd ${_gemname}-${pkgver}
+  sed -r 's|~>|>=|g' -i ${_gemname}.gemspec
+  sed 's|git ls-files -z|find -print0|' -i ${_gemname}.gemspec
+}
+
+build() {
+  cd ${_gemname}-${pkgver}
+  gem build ${_gemname}.gemspec
+}
+
+check() {
+  cd ${_gemname}-${pkgver}
+  rake test
+}
+
+package() {
+  cd ${_gemname}-${pkgver}
+  local _gemdir="$(gem env gemdir)"
+  gem install --ignore-dependencies --no-user-install -i "${pkgdir}${_gemdir}" \
+    -n "${pkgdir}/usr/bin" ${_gemname}-${pkgver}.gem
+  install -Dm 644 README.md History.txt -t "${pkgdir}/usr/share/doc/${pkgname}"
+  install -Dm 644 README.md -t "${pkgdir}/usr/share/licenses/${pkgname}"
+
+  cd "${pkgdir}/${_gemdir}"
+  rm "${pkgdir}/${_gemdir}/cache/${_gemname}-${pkgver}.gem"
+  rm -r "${pkgdir}/${_gemdir}/gems/${_gemname}-${pkgver}/test"
+}
+
+# vim: ts=2 sw=2 et:


More information about the arch-commits mailing list