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

David Runge dvzrv at archlinux.org
Wed Apr 1 20:59:18 UTC 2020


    Date: Wednesday, April 1, 2020 @ 20:59:17
  Author: dvzrv
Revision: 609214

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

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

Copied: ruby-rugged/repos/community-staging-x86_64/PKGBUILD (from rev 609213, ruby-rugged/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-04-01 20:59:17 UTC (rev 609214)
@@ -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=0.99.0
+pkgname=ruby-rugged
+pkgver=0.99.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=('6463c481977a11f4a4c8e245304a1209c7e99ddb601417735229ea24791f3bec7457e7890b17a21406e1cc59fc2186e8acd7a6df180a6251cbc883cd2f1ae86b'
+            'e38e18da0e6ed1e5c8198c9eb2c362b21da2d0b9c8bc23309d2f70183549f4b9f23a6db8ce5f1f0f24b373e6427039c2a845b62dd74f91b02cfe8954f961a91b')
+
+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