[arch-commits] Commit in ruby-rugged/repos (2 files)

David Runge dvzrv at gemini.archlinux.org
Sat Nov 20 18:21:34 UTC 2021


    Date: Saturday, November 20, 2021 @ 18:21:34
  Author: dvzrv
Revision: 1052890

archrelease: copy trunk to community-staging-x86_64

Added:
  ruby-rugged/repos/community-staging-x86_64/
  ruby-rugged/repos/community-staging-x86_64/PKGBUILD
    (from rev 1052889, ruby-rugged/trunk/PKGBUILD)

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

Copied: ruby-rugged/repos/community-staging-x86_64/PKGBUILD (from rev 1052889, ruby-rugged/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2021-11-20 18:21:34 UTC (rev 1052890)
@@ -0,0 +1,81 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+# Contributor: ChaosKid42 <christoph.scholz at gmail.com>
+# Contributor: Andy Weidenbaum <archbaum at gmail.com>
+
+_name=rugged
+# ideally this should match $pkgver, as package() might fail otherwise. thanks, github
+_libgit2_pkgver=1.3.0
+pkgname=ruby-rugged
+pkgver=1.2.0
+pkgrel=2
+pkgdesc="A Ruby binding to the libgit2 linkable library"
+arch=(x86_64)
+url="https://github.com/libgit2/rugged"
+license=(MIT)
+depends=(glibc ruby)
+makedepends=(libgit2 ruby-minitest ruby-rake ruby-rake-compiler ruby-rdoc)
+checkdepends=(git)
+options=(!emptydirs)
+source=("${_name}-${pkgver}.tar.gz::https://github.com/libgit2/${_name}/archive/v${pkgver}.tar.gz"
+        "libgit2-${_libgit2_pkgver}.tar.gz::https://github.com/libgit2/libgit2/archive/v${_libgit2_pkgver}.tar.gz")
+sha512sums=('956c93336e7e38c15f254d46afdc7c74e27006aef863a9c6db421ee9b198b771db4ec21d0293bdd58fe6ddd9ad3b275d6f2bd3696a255e95ccf0003d2e1b219a'
+            '842a648a67ff23ba9e6bf14b706ba9081164866e14000ebf3858442b7046925f05e1dbf00a7d740dc4bf32280e260730e23a9492e817094aa90736ae335ee76e')
+b2sums=('831ae4c743f8247e3f604ec5b3784f956783b284502fb04b87f0fd1aed0a9f6b73c76cb63684a12b308ae980afd75ead145ebd2fafb96950d5c2b80bfaa219bf'
+        'b701c105bb0a5bdcdd5ed1db180662ad4949c540944664d5d8c2f5d78998f15d15bd3669ae3e3d43bfa1b81207c0a94b7e49fc76e57f4cc8ef791ab26e62fc70')
+
+prepare() {
+  mv -v "${_name}-${pkgver}" "${pkgname}-${pkgver}"
+  cd ${pkgname}-${pkgver}
+  # we don't do version pinning
+  sed -r 's|~>|>=|g' -i ${_name}.gemspec
+  # remove broken and useless libgit2 "version check":
+  # https://github.com/libgit2/rugged/issues/698
+  sed '68,90d' -i ext/rugged/extconf.rb
+  # source tarball doesn't include vendored libgit2 version, which is only
+  # needed for test fixtures (resources): https://github.com/libgit2/rugged/issues/801
+  mv -v ../libgit2-${_libgit2_pkgver}/* vendor/libgit2
+  # remove all tests requiring an internet connection
+  rm -rv test/online/*
+}
+
+build() {
+  cd "${pkgname}-${pkgver}"
+  export CI_BUILD=true
+  export RUGGED_USE_SYSTEM_LIBRARIES=true
+  export CMAKE_FLAGS=" --use-system-libraries"
+  rake compile
+  rake gem
+}
+
+check(){
+  cd "${pkgname}-${pkgver}"
+  # ConfigTest#test_read_global_config_file fails, if no gitconfig is set for
+  # user...
+  # https://github.com/libgit2/rugged/issues/432
+  git config --global user.name "Foo Bar"
+  rake test
+}
+
+package() {
+  local _gemdir="$(gem env gemdir)"
+
+  depends+=(libgit2.so)
+
+  cd ${pkgname}-${pkgver}
+  gem install --ignore-dependencies \
+              --no-user-install \
+              -i "${pkgdir}/${_gemdir}" \
+              -n "${pkgdir}/usr/bin" \
+              pkg/${_name}-${pkgver}.gem
+  install -vDm 644 "$pkgdir/$_gemdir/gems/$_name-$pkgver/LICENSE" \
+    -t "${pkgdir}/usr/share/licenses/${pkgname}/"
+  install -vDm 644 README.md CHANGELOG.md -t \
+    "${pkgdir}/usr/share/doc/${pkgname}"
+  # removing all unneeded stuff
+  cd "${pkgdir}/${_gemdir}"
+  rm -rvf cache \
+    "doc/${_name}-${pkgver}/ri/ext/" \
+    "gems/${_name}-${pkgver}/"{ext,lib/*/*.so} \
+    extensions/*/*/${_name}-${pkgver}/{mkmf.log,gem_make.out} \
+    gems/${_name}-${pkgver}/vendor
+}



More information about the arch-commits mailing list