[arch-commits] Commit in (4 files)

Tim Meusel bastelfreak at archlinux.org
Sun May 16 12:18:42 UTC 2021


    Date: Sunday, May 16, 2021 @ 12:18:41
  Author: bastelfreak
Revision: 935775

add ruby27-hocon

Added:
  ruby27-hocon/
  ruby27-hocon/repos/
  ruby27-hocon/trunk/
  ruby27-hocon/trunk/PKGBUILD

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

Added: ruby27-hocon/trunk/PKGBUILD
===================================================================
--- ruby27-hocon/trunk/PKGBUILD	                        (rev 0)
+++ ruby27-hocon/trunk/PKGBUILD	2021-05-16 12:18:41 UTC (rev 935775)
@@ -0,0 +1,51 @@
+# Maintainer: Tim Meusel <tim at bastelfreak.de>
+# Contributor: Christian Rebischke <chris.rebischke at archlinux.org>
+
+_gemname='hocon'
+_reponame="ruby-${_gemname}"
+pkgname="ruby27-${_gemname}"
+pkgver=1.3.1
+pkgrel=1
+pkgdesc='A collection of text algorithms: Levenshtein, Soundex, Metaphone, Double Metaphone, Porter Stemming'
+arch=('any')
+url="https://github.com/puppetlabs/${_reponame}"
+license=('Apache')
+depends=('ruby2.7')
+makedepends=('ruby27-rdoc')
+checkdepends=('ruby27-rspec')
+source=("${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz")
+options=("!emptydirs")
+sha512sums=('c73cfd8d6c77751d1d2a35d85cad2f2eef700a01e8b8de9449c0c9dfefe8d4a80c4a79dd3db8ee4a6d2c3649f26d6780cbe05fe9b067de05ee3711b00faf4255')
+
+prepare() {
+  cd "${srcdir}/${_reponame}-${pkgver}"
+
+  # update the gemspec to allow newer versions of rake
+  sed --in-place 's|~>|>=|g' "${_gemname}.gemspec"
+
+  # fix wrong license name in gemspec
+  sed --in-place 's/Apache License, v2/Apache-2.0/' "${_gemname}.gemspec"
+}
+
+build() {
+  cd "${srcdir}/${_reponame}-${pkgver}"
+  gem-2.7 build "${_gemname}.gemspec"
+}
+
+check() {
+  cd "${srcdir}/${_reponame}-${pkgver}"
+  ruby27-rspec spec
+}
+
+package() {
+  cd "${srcdir}/${_reponame}-${pkgver}"
+  local _gemdir="$(gem-2.7 env gemdir)"
+  gem-2.7 install --verbose --ignore-dependencies --no-user-install --install-dir "${pkgdir}/${_gemdir}" --bindir "${pkgdir}/usr/bin" "${_gemname}-${pkgver}.gem"
+
+  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
+  install -Dm 644 CHANGELOG.md HISTORY.md README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+
+  rm -rf "${pkgdir}/${_gemdir}/cache"
+}
+
+# vim: ts=2 sw=2 et:



More information about the arch-commits mailing list