blob: 9ca70e2945f22ee4cfb38d03b51799ace8f7afa7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ruby-rugged
_gemname=rugged
pkgver=0.26.0
pkgrel=1
pkgdesc="Ruby bindings to libgit2"
url="https://github.com/libgit2/rugged"
arch="all"
license="MIT"
checkdepends="libgit2-tests 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
libgit2-fixture-dir.patch
skip-test_discover_false.patch
skip-test_read_global_config_file.patch
fix-for-returning-enumerators.patch"
builddir="$srcdir/$_gemname-$pkgver"
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 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="555fbfdc5b941212d7e47e4dcf2d39a6207c316ee4ce7e0f11c16929aae166a31d71a78c8f6432db9d087d7a8bf633d6cbd11d4538c0d1c7e23298b5379b9966 rugged-0.26.0.tar.gz
c55c71d93f2d0430b83bdf8da6ef1754a519c190c0bbaf02ceb96f2b3f20616fe2ec6cb48eabfa2c87cbaf0cbdf4489a54e76080b8c5a8f4a7307019dd2aebe3 fix-extconf-version-check.patch
0c749aeb8d6a29aed51737bab09c7b0a6669ac691461758c856ede5d8510ad6edfa284cddd1b54982bf614a45ba817b70e838e071889a9b05e1b0580111ec826 libgit2-fixture-dir.patch
33464eeefc7669fe3bf5f47c4016cacdcba4f7455ed22b441383b49721870072b5095dbb68832cdb933a7659a415476db64b579a98c888b83900d092bb8b54be skip-test_discover_false.patch
b9e028f18830e447773e895046eb03489e94bb5a76fede51f93545ed67f7249ed8f37ed4bb832eb68a2db281ff3e2b84dab8b72bb21eea4b835b0f1ce23943c3 skip-test_read_global_config_file.patch
5b5dd9dc7d9d142bf4e8fd0a4ff78ae006ecba416bd71bfc51f0d7565755047d64fd59bef03c9cd7f8be1347df8214e0a6ce57512981de31cc88baedb4ac3f7a fix-for-returning-enumerators.patch"
|