[arch-commits] Commit in ruby-marcel/repos (community-any community-any/PKGBUILD)

Andreas Schleifer segaja at gemini.archlinux.org
Sun Jan 23 19:39:02 UTC 2022


    Date: Sunday, January 23, 2022 @ 19:39:02
  Author: segaja
Revision: 1113850

archrelease: copy trunk to community-any

Added:
  ruby-marcel/repos/community-any/
  ruby-marcel/repos/community-any/PKGBUILD
    (from rev 1113849, ruby-marcel/trunk/PKGBUILD)

----------+
 PKGBUILD |   51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

Copied: ruby-marcel/repos/community-any/PKGBUILD (from rev 1113849, ruby-marcel/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD	                        (rev 0)
+++ community-any/PKGBUILD	2022-01-23 19:39:02 UTC (rev 1113850)
@@ -0,0 +1,51 @@
+# Maintainer: Andreas 'Segaja' Schleifer <segaja at archlinux dot org>
+
+_gemname='marcel'
+pkgname="ruby-${_gemname}"
+pkgver=1.0.2
+pkgrel=1
+pkgdesc='Simple mime type detection using magic numbers, filenames, and extensions'
+arch=('any')
+url='https://github.com/rails/marcel'
+license=('Apache' 'MIT')
+options=(!emptydirs)
+depends=('ruby')
+makedepends=('ruby-bundler' 'ruby-rake')
+checkdepends=('ruby-minitest' 'ruby-rack')
+source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
+sha512sums=('cd159545b246dcbd26ca07ac69e36ff13a965ac0e99ebd040c53b6a92f8ec8fd65786783c9a173d669fe6b32340a23d72c83c483011eec2e1097bdea73810ed6')
+
+prepare() {
+  cd "${_gemname}-${pkgver}"
+
+  # update gemspec/Gemfile to allow newer version of the dependencies
+  sed --in-place --regexp-extended 's|~>|>=|g' "${_gemname}.gemspec"
+
+  # we dont need debuggers for testing
+  sed --in-place --regexp-extend '/byebug/d' "${_gemname}.gemspec"  test/test_helper.rb
+}
+
+build() {
+  cd "${_gemname}-${pkgver}"
+
+  rake build
+}
+
+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 APACHE-LICENSE MIT-LICENSE --target-directory "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -Dm 644 README.md --target-directory "${pkgdir}/usr/share/doc/${pkgname}"
+}



More information about the arch-commits mailing list