[arch-commits] Commit in ruby-fileutils/repos (2 files)
Andreas Schleifer
segaja at gemini.archlinux.org
Wed Aug 24 18:01:15 UTC 2022
Date: Wednesday, August 24, 2022 @ 18:01:15
Author: segaja
Revision: 1276613
archrelease: copy trunk to community-testing-any
Added:
ruby-fileutils/repos/community-testing-any/
ruby-fileutils/repos/community-testing-any/PKGBUILD
(from rev 1276612, ruby-fileutils/trunk/PKGBUILD)
----------+
PKGBUILD | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 81 insertions(+)
Copied: ruby-fileutils/repos/community-testing-any/PKGBUILD (from rev 1276612, ruby-fileutils/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD (rev 0)
+++ community-testing-any/PKGBUILD 2022-08-24 18:01:15 UTC (rev 1276613)
@@ -0,0 +1,81 @@
+# Maintainer: Andreas 'Segaja' Schleifer <segaja at archlinux dot org>
+
+_gemname='fileutils'
+pkgname="ruby-${_gemname}"
+pkgver=1.6.0
+pkgrel=1
+pkgdesc='Several file utility methods for copying, moving, removing, etc'
+arch=('any')
+url="https://github.com/ruby/${_gemname}"
+license=('BSD' 'RUBY')
+depends=('ruby')
+checkdepends=('ruby-rake')
+options=(!emptydirs)
+source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
+sha512sums=('ed299a2c84e1e8ad69f6eb94eebba91f0d9c4f2c30c07aced73c23282f5ae110d6c4d49faf2904eb552b4d7c6e2dfb561c866a32885916be6df1287de57fe176')
+
+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}"
+
+ gem build "${_gemname}.gemspec"
+}
+
+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" \
+ "${_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 *.md --target-directory "${pkgdir}/usr/share/doc/${pkgname}"
+}
More information about the arch-commits
mailing list