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

David Runge dvzrv at archlinux.org
Thu Oct 15 14:56:24 UTC 2020


    Date: Thursday, October 15, 2020 @ 14:56:24
  Author: dvzrv
Revision: 724098

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

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

Copied: ruby-rugged/repos/community-staging-x86_64/PKGBUILD (from rev 724097, ruby-rugged/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-10-15 14:56:24 UTC (rev 724098)
@@ -0,0 +1,73 @@
+# 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.1.0
+pkgname=ruby-rugged
+pkgver=1.1.0
+pkgrel=1
+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=('0cab5d7b850451cc7d675af622986850783d1e7c209fd905aae3069f0ffbc5d9bf0d2b869614ae1b720855fb39acb042b1486e3581986daddd97dac9b3e55fbe'
+            '347bb68900181b44fa58a0417506c91383adb965607fce049a5b4c57ac9cc286e0a140d164c339b50fb6cd6951f47757c2917a2df44ba004bfaa4fb643946bb8')
+
+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
+}
+
+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() {
+  depends+=('libgit2.so')
+  cd ${pkgname}-${pkgver}
+  local _gemdir="$(gem env gemdir)"
+  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 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