[arch-commits] Commit in ruby-ipaddr/repos (2 files)
Andreas Schleifer
segaja at gemini.archlinux.org
Wed Aug 24 18:57:52 UTC 2022
Date: Wednesday, August 24, 2022 @ 18:57:52
Author: segaja
Revision: 1276708
archrelease: copy trunk to community-testing-any
Added:
ruby-ipaddr/repos/community-testing-any/
ruby-ipaddr/repos/community-testing-any/PKGBUILD
(from rev 1276707, ruby-ipaddr/trunk/PKGBUILD)
----------+
PKGBUILD | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 78 insertions(+)
Copied: ruby-ipaddr/repos/community-testing-any/PKGBUILD (from rev 1276707, ruby-ipaddr/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD (rev 0)
+++ community-testing-any/PKGBUILD 2022-08-24 18:57:52 UTC (rev 1276708)
@@ -0,0 +1,78 @@
+# Maintainer: Andreas 'Segaja' Schleifer <segaja at archlinux dot org>
+
+_gemname='ipaddr'
+pkgname="ruby-${_gemname}"
+pkgver=1.2.4
+pkgrel=1
+pkgdesc='IPAddr provides a set of methods to manipulate an IP address. Both IPv4 and IPv6 are supported'
+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=('7287cd761d830d141ca122a2aefbc7d8f910e1e27c61be08f72a797283e71ab908396920fdacaa886401da0556e51861a86dd60d39a956c28025ea3592ba96f8')
+
+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 \
+ --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