[arch-commits] Commit in ruby-base64/trunk (PKGBUILD)
Andreas Schleifer
segaja at gemini.archlinux.org
Sat Sep 10 21:37:30 UTC 2022
Date: Saturday, September 10, 2022 @ 21:37:30
Author: segaja
Revision: 1300429
upgpkg: ruby-base64 0.1.1-2: restructure stdlib to fit into ruby structure
Modified:
ruby-base64/trunk/PKGBUILD
----------+
PKGBUILD | 45 +++++++++++++++++++--------------------------
1 file changed, 19 insertions(+), 26 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-09-10 21:22:18 UTC (rev 1300428)
+++ PKGBUILD 2022-09-10 21:37:30 UTC (rev 1300429)
@@ -3,7 +3,7 @@
_gemname='base64'
pkgname="ruby-${_gemname}"
pkgver=0.1.1
-pkgrel=1
+pkgrel=2
pkgdesc='Support for encoding and decoding binary data using a Base64 representation'
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,23 @@
--bindir "${pkgdir}/usr/bin" \
"${_gemname}-${pkgver}.gem"
+ install --verbose --directory --mode=0755 \
+ "${pkgdir}/usr/lib/ruby/${_extension_api_version}/${_platform}" \
+ "${pkgdir}${_gemdir}/specifications/default"
+
+ cp --verbose "${_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"
+
# 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