75 lines
2.5 KiB
Text
75 lines
2.5 KiB
Text
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
|
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
|
|
|
pkgname=ruby3.0-rugged
|
|
_gemname=rugged
|
|
pkgver=1.5.0.1
|
|
pkgrel=1
|
|
pkgdesc="Ruby bindings to libgit2"
|
|
url="https://github.com/libgit2/rugged"
|
|
arch="all"
|
|
license="MIT"
|
|
checkdepends="
|
|
git
|
|
libgit2-tests
|
|
ruby3.0-minitest
|
|
ruby3.0-rake
|
|
ruby3.0-rake-compiler
|
|
"
|
|
makedepends="
|
|
libgit2-dev>=${pkgver%.*}
|
|
ruby3.0
|
|
ruby3.0-dev
|
|
"
|
|
source="$_gemname-$pkgver.tar.gz::https://github.com/libgit2/$_gemname/archive/v$pkgver.tar.gz
|
|
fix-extconf-version-check.patch
|
|
libgit2-fixture-dir.patch
|
|
skip-test_discover_false.patch
|
|
skip-test_read_global_config_file.patch
|
|
skip-online-tests.patch
|
|
"
|
|
builddir="$srcdir/$_gemname-$pkgver"
|
|
# Rugged::ConfigError: repository path '/tmp/' is not owned by current user
|
|
# requires tmp persmissions on host
|
|
options="!check"
|
|
|
|
build() {
|
|
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() {
|
|
rake test LIBGIT2_FIXTURE_DIR="/usr/src/libgit2/tests/resources"
|
|
}
|
|
|
|
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="
|
|
ae7cac3cf86c1889efb72e32e5fdbde15a31abf7ebf19c9c9b01a63b633fd4bfb3fef809c6003a9e6a2043dadad219eceb562447e2b0cd9ea06c52784bec12b7 rugged-1.5.0.1.tar.gz
|
|
76afe0e4de05460bdcbc6cb0c2c6af3d3214697212f6400ee8da4c023bad31f2f734289971c83ecfb98156ead0083a6631018fc68aa709966e45aefbc6697b1d fix-extconf-version-check.patch
|
|
0c749aeb8d6a29aed51737bab09c7b0a6669ac691461758c856ede5d8510ad6edfa284cddd1b54982bf614a45ba817b70e838e071889a9b05e1b0580111ec826 libgit2-fixture-dir.patch
|
|
33464eeefc7669fe3bf5f47c4016cacdcba4f7455ed22b441383b49721870072b5095dbb68832cdb933a7659a415476db64b579a98c888b83900d092bb8b54be skip-test_discover_false.patch
|
|
b9e028f18830e447773e895046eb03489e94bb5a76fede51f93545ed67f7249ed8f37ed4bb832eb68a2db281ff3e2b84dab8b72bb21eea4b835b0f1ce23943c3 skip-test_read_global_config_file.patch
|
|
5f0ad88eb7ac8c69605c43712e046efd47b727f48e98ee4047be850da4fea48c11fc2a383c791810a1bc81c08ca00428d4906c1af02a0d0da6e1ffbd4723b8f3 skip-online-tests.patch
|
|
"
|