[arch-commits] Commit in ruby-globalid/repos (community-any community-any/PKGBUILD)
Andreas Schleifer
segaja at gemini.archlinux.org
Sat Jan 22 17:25:29 UTC 2022
Date: Saturday, January 22, 2022 @ 17:25:29
Author: segaja
Revision: 1113464
archrelease: copy trunk to community-any
Added:
ruby-globalid/repos/community-any/
ruby-globalid/repos/community-any/PKGBUILD
(from rev 1113463, ruby-globalid/trunk/PKGBUILD)
----------+
PKGBUILD | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
Copied: ruby-globalid/repos/community-any/PKGBUILD (from rev 1113463, ruby-globalid/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD (rev 0)
+++ community-any/PKGBUILD 2022-01-22 17:25:29 UTC (rev 1113464)
@@ -0,0 +1,50 @@
+# Maintainer: Andreas 'Segaja' Schleifer <segaja at archlinux dot org>
+
+_gemname='globalid'
+pkgname="ruby-${_gemname}"
+pkgver=1.0.0
+pkgrel=1
+pkgdesc='URIs for your models makes it easy to pass references around'
+arch=('any')
+url='https://github.com/rails/globalid'
+license=('MIT')
+options=(!emptydirs)
+depends=('ruby' 'ruby-activesupport')
+makedepends=('ruby-bundler' 'ruby-rake')
+#checkdepends=('ruby-activemodel')
+source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
+sha512sums=('228c672aa2934a726677e11a90124767f302910791153b68024aa8b44921f2ed1444903ac592c46240f19c9dae25c170405ac2a21fc269c573b066d4cd34b04d')
+
+prepare() {
+ cd "${_gemname}-${pkgver}"
+
+ # update gemspec/Gemfile to allow newer version of the dependencies
+ sed --in-place --regexp-extended 's|~>|>=|g' "${_gemname}.gemspec"
+ rm Gemfile.lock
+}
+
+build() {
+ cd "${_gemname}-${pkgver}"
+
+ rake build
+}
+
+# TODO: Tests are disabled for now as there is a cyclic dependency between this package and ruby-rails
+#check() {
+# cd "${_gemname}-${pkgver}"
+#
+# rake test
+#}
+
+package() {
+ cd "${_gemname}-${pkgver}"
+
+ local _gemdir="$(gem env gemdir)"
+
+ gem install --ignore-dependencies --no-user-install -i "${pkgdir}/${_gemdir}" -n "${pkgdir}/usr/bin" "pkg/${_gemname}-${pkgver}.gem"
+
+ rm "${pkgdir}/${_gemdir}/cache/${_gemname}-${pkgver}.gem"
+
+ install -Dm 644 MIT-LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -Dm 644 CHANGELOG.md CONTRIBUTING.md README.md --target-directory "${pkgdir}/usr/share/doc/${pkgname}"
+}
More information about the arch-commits
mailing list