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

David Runge dvzrv at gemini.archlinux.org
Fri Feb 18 20:05:02 UTC 2022


    Date: Friday, February 18, 2022 @ 20:05:02
  Author: dvzrv
Revision: 1134178

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 1134177, ruby-rugged/trunk/PKGBUILD)

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

Copied: ruby-rugged/repos/community-staging-x86_64/PKGBUILD (from rev 1134177, ruby-rugged/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2022-02-18 20:05:02 UTC (rev 1134178)
@@ -0,0 +1,75 @@
+# 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.3.1
+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-rdoc)
+checkdepends=(git ruby-minitest ruby-rake ruby-rake-compiler)
+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=('bb93ff86b0f9bca5bb294ac5bbb9c45a5648da7b180474cedbda1d7db3ea55aea87a542a3e82bebe5c94ad4b07a30173dbc62da98997d40e8c743252a68a4473'
+            '842a648a67ff23ba9e6bf14b706ba9081164866e14000ebf3858442b7046925f05e1dbf00a7d740dc4bf32280e260730e23a9492e817094aa90736ae335ee76e')
+b2sums=('994d4a16f2cd6363162fba2d8a9101a6edf2992860b20f2eea53a771c94e1d4449a69944799e92430fac1ad4cad05ed06768569a55e9c13abaad4d048b2c351a'
+        'b701c105bb0a5bdcdd5ed1db180662ad4949c540944664d5d8c2f5d78998f15d15bd3669ae3e3d43bfa1b81207c0a94b7e49fc76e57f4cc8ef791ab26e62fc70')
+
+prepare() {
+  cd $_name-$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 $_name-$pkgver
+  export CI_BUILD=true
+  export RUGGED_USE_SYSTEM_LIBRARIES=true
+  export CMAKE_FLAGS=" --use-system-libraries"
+  rake compile
+  rake gem
+}
+
+check(){
+  cd $_name-$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"
+  # ignore failing test: https://github.com/libgit2/rugged/issues/905
+  rake test --trace --verbose TESTOPTS="--verbose" -e '/test_update_tips_callback_error/'
+}
+
+package() {
+  local _gemdir="$(gem env gemdir)"
+
+  depends+=(libgit2.so)
+
+  cd $_name-$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