# Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka pkgname=ruby-rugged _gemname=rugged pkgver=0.26.0 pkgrel=0 pkgdesc="Ruby bindings to libgit2" url="https://github.com/libgit2/rugged" arch="all" license="MIT" checkdepends="ruby-minitest ruby-rake-compiler ruby-rake" makedepends="libgit2-dev>=${pkgver%.*} ruby ruby-dev" source="$_gemname-$pkgver.tar.gz::https://github.com/libgit2/$_gemname/archive/v$pkgver.tar.gz fix-extconf-version-check.patch" builddir="$srcdir/$_gemname-$pkgver" options="!check" # FIXME: Tests need testing resources from libgit2. build() { cd "$builddir" gem build $_gemname.gemspec RUGGED_USE_SYSTEM_LIBRARIES=1 gem install --local \ --install-dir dist \ --ignore-dependencies \ --no-document \ --verbose \ $_gemname # Needed for tests. cp -l dist/extensions/*/*/$_gemname-*/$_gemname/*.so lib/$_gemname/ } check() { cd "$builddir" rake test } package() { local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')" cd "$builddir"/dist mkdir -p "$gemdir" cp -r extensions gems specifications "$gemdir"/ # Remove unnecessary and duplicated files. rm -f "$gemdir"/extensions/*/*/$_gemname-*/mkmf.log cd "$gemdir"/gems/$_gemname-$pkgver rm -rf ext/ lib/$_gemname/*.so LICENSE* README* } sha512sums="555fbfdc5b941212d7e47e4dcf2d39a6207c316ee4ce7e0f11c16929aae166a31d71a78c8f6432db9d087d7a8bf633d6cbd11d4538c0d1c7e23298b5379b9966 rugged-0.26.0.tar.gz c55c71d93f2d0430b83bdf8da6ef1754a519c190c0bbaf02ceb96f2b3f20616fe2ec6cb48eabfa2c87cbaf0cbdf4489a54e76080b8c5a8f4a7307019dd2aebe3 fix-extconf-version-check.patch"