[arch-commits] Commit in ruby-forwardable/trunk (PKGBUILD)
Andreas Schleifer
segaja at gemini.archlinux.org
Thu Sep 8 19:38:42 UTC 2022
Date: Thursday, September 8, 2022 @ 19:38:42
Author: segaja
Revision: 1296905
upgpkg: ruby-forwardable 1.3.2-2: restructure stdlib to fit into ruby structure
Modified:
ruby-forwardable/trunk/PKGBUILD
----------+
PKGBUILD | 46 ++++++++++++++++++++--------------------------
1 file changed, 20 insertions(+), 26 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-09-08 19:35:47 UTC (rev 1296904)
+++ PKGBUILD 2022-09-08 19:38:42 UTC (rev 1296905)
@@ -3,7 +3,7 @@
_gemname='forwardable'
pkgname="ruby-${_gemname}"
pkgver=1.3.2
-pkgrel=1
+pkgrel=2
pkgdesc='Provides delegation of specified methods to a designated object'
arch=('any')
url="https://github.com/ruby/${_gemname}"
@@ -37,6 +37,8 @@
cd "${_gemname}-${pkgver}"
local _gemdir="$(gem env gemdir)"
+ local _platform="$(gem env platform | cut -d':' -f2)"
+ local _extension_api_version="$(ruby -e 'puts Gem.extension_api_version')"
gem install \
--local \
@@ -47,32 +49,24 @@
--bindir "${pkgdir}/usr/bin" \
"${_gemname}-${pkgver}.gem"
+ install --verbose --directory --mode=0755 \
+ "${pkgdir}/usr/lib/ruby/${_extension_api_version}/${_platform}" \
+ "${pkgdir}${_gemdir}/specifications/default"
+
+ mv --verbose "${pkgdir}${_gemdir}/gems/${_gemname}-${pkgver}/${_gemname}.gemspec" "${pkgdir}${_gemdir}/specifications/default/${_gemname}-${pkgver}.gemspec"
+ mv --verbose "${pkgdir}${_gemdir}/gems/${_gemname}-${pkgver}/lib/${_gemname}.rb" "${pkgdir}/usr/lib/ruby/${_extension_api_version}/${_gemname}.rb"
+ mv --verbose "${pkgdir}${_gemdir}/gems/${_gemname}-${pkgver}/lib/${_gemname}" "${pkgdir}/usr/lib/ruby/${_extension_api_version}/${_gemname}"
+
# remove unrepreducible files
rm --force --recursive --verbose \
- "${pkgdir}/${_gemdir}/cache/" \
- "${pkgdir}/${_gemdir}/gems/${_gemname}-${pkgver}/vendor/" \
- "${pkgdir}/${_gemdir}/doc/${_gemname}-${pkgver}/ri/ext/"
+ "${pkgdir}${_gemdir}/cache/" \
+ "${pkgdir}${_gemdir}/build_info/" \
+ "${pkgdir}${_gemdir}/extensions/" \
+ "${pkgdir}${_gemdir}/gems/" \
+ "${pkgdir}${_gemdir}/plugins/" \
+ "${pkgdir}${_gemdir}/specifications/${_gemname}-${pkgver}.gemspec" \
+ "${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}"
+ install --verbose -D --mode=0644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install --verbose -D --mode=0644 *.md --target-directory "${pkgdir}/usr/share/doc/${pkgname}"
}
More information about the arch-commits
mailing list