Date: Saturday, August 10, 2019 @ 10:42:26
  Author: shibumi
Revision: 498657

archrelease: copy trunk to community-any

Added:
  ruby-mocha/repos/community-any/
  ruby-mocha/repos/community-any/PKGBUILD
    (from rev 498656, ruby-mocha/trunk/PKGBUILD)

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

Copied: ruby-mocha/repos/community-any/PKGBUILD (from rev 498656, 
ruby-mocha/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD                              (rev 0)
+++ community-any/PKGBUILD      2019-08-10 10:42:26 UTC (rev 498657)
@@ -0,0 +1,59 @@
+# Maintainer: Christian Rebischke <chris.rebisc...@archlinux.org>
+# Contributor: Tim Meusel <t...@bastelfreak.de>
+
+_gemname=mocha
+pkgname="ruby-${_gemname}"
+pkgver=1.9.0
+pkgrel=1
+pkgdesc='Mocha is a mocking and stubbing library for Ruby'
+arch=('any')
+url='https://github.com/freerange/mocha'
+license=('Custom')
+depends=('ruby')
+checkdepends=('ruby-rake' 'ruby-minitest' 'ruby-bundler')
+options=('!emptydirs')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/freerange/mocha/archive/v${pkgver}.tar.gz";
+        
'removemetaclassdependency.patch::https://github.com/freerange/mocha/commit/e3db6e608c0b98ddcfc0c1f540d508004cde55bd.patch')
+sha512sums=('e2cd4afe3023c269fffb8f328fed17e965fe0bcce299ed87e46ae824e9a95ec294b0615fcd08af8f606a590395da5bcf4e93d91a79a537441dfab029f9b73a38'
+            
'da0d443cc81dd0cda383e34674b3271ef6493bef3e7e3f179f7c2ccb02670fe5876569cebe140e0fecbc2b56c8f34303a35b0fecb25c059317ff6ed3791863c2')
+
+prepare() {
+  cd "${_gemname}-${pkgver}"
+
+  # release 1.9.0 still depends on the metaclass gem, which is dead.
+  #This patch is in master and gets rid of it.
+  patch --forward --verbose --strip=1 
--input='../removemetaclassdependency.patch'
+
+  # replace upper version boundaries for ruby gems
+  sed -r 's|~>|>=|g' -i ${_gemname}.gemspec
+
+  # `git` doesn't work within src dir, because we downloaded an archive
+  sed --in-place 's|git ls-files|find|' "${_gemname}.gemspec"
+
+  # sed introspection gem is heavily broken. Also it depends on metaclass.
+  # It will be removed in a future release.
+  sed --in-place '/introspection/d' "${_gemname}.gemspec"
+
+  sed --in-place '/rubocop/d' "${_gemname}.gemspec"
+}
+
+check() {
+  cd "${_gemname}-${pkgver}"
+  rake test:units
+}
+
+build() {
+  cd "${_gemname}-${pkgver}"
+  gem build ${_gemname}.gemspec
+}
+
+package() {
+  cd "${_gemname}-${pkgver}"
+  local _gemdir="$(gem env gemdir)"
+  gem install --ignore-dependencies --no-user-install --install-dir 
"${pkgdir}${_gemdir}" --bindir "${pkgdir}/usr/bin" "${_gemname}-${pkgver}.gem"
+  install -Dm 644 README.md RELEASE.md --target-directory 
"${pkgdir}/usr/share/doc/${pkgname}"
+  install -Dm 644 COPYING.md MIT-LICENSE.md --target-directory 
"${pkgdir}/usr/share/licenses/${pkgname}"
+  rm "${pkgdir}/${_gemdir}/cache/${_gemname}-${pkgver}.gem"
+}
+
+# vim: ts=2 sw=2 et:

Reply via email to