[arch-commits] Commit in (4 files)

Andreas Schleifer segaja at gemini.archlinux.org
Sat Aug 6 17:08:00 UTC 2022


    Date: Saturday, August 6, 2022 @ 17:08:00
  Author: segaja
Revision: 1260444

ruby-uri 0.11.0

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

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

Added: ruby-uri/trunk/PKGBUILD
===================================================================
--- ruby-uri/trunk/PKGBUILD	                        (rev 0)
+++ ruby-uri/trunk/PKGBUILD	2022-08-06 17:08:00 UTC (rev 1260444)
@@ -0,0 +1,78 @@
+# Maintainer: Andreas 'Segaja' Schleifer <segaja at archlinux dot org>
+
+_gemname='uri'
+pkgname="ruby-${_gemname}"
+pkgver=0.11.0
+pkgrel=1
+pkgdesc='a module providing classes to handle Uniform Resource Identifiers'
+arch=('any')
+url='https://github.com/ruby/uri'
+license=('BSD' 'RUBY')
+depends=('ruby')
+checkdepends=('ruby-rake')
+options=(!emptydirs)
+source=(
+    "${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
+sha512sums=('bb734b5faa4c60dc9461e19538a9b06c860967093ef8018dbf519994b068e324905394de40dc79a2f07d912af1d69c9d19135ac8126ce9bfe661076e5280d688')
+
+prepare() {
+  cd "${_gemname}-${pkgver}"
+
+  # update gemspec/Gemfile to allow newer version of the dependencies
+  sed --in-place --regexp-extended 's|~>|>=|g' "${_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 \
+    --local \
+    --ignore-dependencies \
+    --no-user-install \
+    --install-dir "${pkgdir}/${_gemdir}" \
+    --bindir "${pkgdir}/usr/bin" \
+    "${_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