[arch-commits] Commit in (4 files)

Andreas Schleifer segaja at gemini.archlinux.org
Wed Aug 24 17:20:27 UTC 2022


    Date: Wednesday, August 24, 2022 @ 17:20:27
  Author: segaja
Revision: 1276601

ruby-etc 1.3.0-1

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

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

Added: ruby-etc/trunk/PKGBUILD
===================================================================
--- ruby-etc/trunk/PKGBUILD	                        (rev 0)
+++ ruby-etc/trunk/PKGBUILD	2022-08-24 17:20:27 UTC (rev 1276601)
@@ -0,0 +1,82 @@
+# Maintainer: Andreas 'Segaja' Schleifer <segaja at archlinux dot org>
+
+_gemname='etc'
+pkgname="ruby-${_gemname}"
+pkgver=1.3.0
+pkgrel=1
+pkgdesc='Provides access to information typically stored in UNIX /etc directory'
+arch=('any')
+url="https://github.com/ruby/${_gemname}"
+license=('BSD' 'RUBY')
+depends=('ruby')
+makedepends=('ruby-rake' 'ruby-rake-compiler')
+options=(!emptydirs)
+source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
+sha512sums=('f192bd189ff368e98c289fc9b6302a5786932fc477c7e70699100d2cb00341bafe1b2180dc674f952f88bc2e74be719f485079439a0efff5b2a4c7c1f4ed7b4a')
+
+prepare() {
+  cd "${_gemname}-${pkgver}"
+
+  # update gemspec/Gemfile to allow newer version of the dependencies
+  sed --in-place --regexp-extended 's|~>|>=|g' "${_gemname}.gemspec"
+
+  # we build based on a tar archive, not a git repo
+  sed --in-place --regexp-extended 's|git ls-files -z|find . -type f -not -path "*/\.git/*" -printf "%P\\\\0"|' "${_gemname}.gemspec"
+}
+
+build() {
+  cd "${_gemname}-${pkgver}"
+
+  rake compile:etc
+  rake build
+}
+
+check() {
+  cd "${_gemname}-${pkgver}"
+
+  rake test
+}
+
+package() {
+  cd "${_gemname}-${pkgver}"
+
+  local _gemdir="$(gem env gemdir)"
+
+  gem install \
+    --local \
+    --verbose \
+    --ignore-dependencies \
+    --no-user-install \
+    --install-dir "${pkgdir}/${_gemdir}" \
+    --bindir "${pkgdir}/usr/bin" \
+    "pkg/${_gemname}-${pkgver}.gem"
+
+  # remove unrepreducible files
+  rm --force --recursive --verbose \
+    "${pkgdir}/${_gemdir}/cache/" \
+    "${pkgdir}/${_gemdir}/gems/${_gemname}-${pkgver}/vendor/" \
+    "${pkgdir}/${_gemdir}/doc/${_gemname}-${pkgver}/ri/ext/"
+
+  find "${pkgdir}/${_gemdir}/gems/" \
+    -type f \
+    \( \
+      -iname "*.o" -o \
+      -iname "*.c" -o \
+      -iname "*.so" -o \
+      -iname "*.time" -o \
+      -iname "gem.build_complete" -o \
+      -iname "Makefile" \
+    \) \
+    -delete
+
+  find "${pkgdir}/${_gemdir}/extensions/" \
+    -type f \
+    \( \
+      -iname "mkmf.log" -o \
+      -iname "gem_make.out" \
+    \) \
+    -delete
+
+  install -D --mode=644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+  install -D --mode=644 README.md --target-directory "${pkgdir}/usr/share/doc/${pkgname}"
+}



More information about the arch-commits mailing list