aboutsummaryrefslogtreecommitdiffstats
path: root/main/ruby-augeas/APKBUILD
blob: f5b8adbd56b61bd475f9a1b7b1e13a405e2b04a7 (plain) (blame)
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
61
62
63
# Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
pkgname=ruby-augeas
_gemname=$pkgname
pkgver=0.5.0
pkgrel=9
pkgdesc="Ruby bindings for Augeas"
url="https://augeas.net/"
arch="all"
license="LGPL-2.1-or-later"
depends="ruby"
checkdepends="ruby-test-unit"
makedepends="augeas-dev ruby-dev ruby-rake"
subpackages="$pkgname-doc"
source="https://github.com/hercules-team/ruby-augeas/archive/release-$pkgver/$_gemname-$pkgver.tar.gz"
builddir="$srcdir/$_gemname-release-$pkgver"

build() {
	rake gem

	gem install \
		--local \
		--install-dir dist \
		--ignore-dependencies \
		--document ri \
		--verbose \
		pkg/$_gemname-$pkgver.gem

	# Remove duplicated files (sdbm.so is loaded from extensions directory).
	rm -f dist/gems/$_gemname-*/lib/*.so
	rm -rf dist/gems/$_gemname-*/ext
}

check() {
	GEM_PATH='./dist' rake test
}

package() {
	local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')"
	local geminstdir="$gemdir/gems/$_gemname-$pkgver"

	cd "$builddir"/dist

	mkdir -p "$gemdir"
	cp -r doc extensions gems specifications "$gemdir"/

	# Remove unnecessary files.
	find "$gemdir"/extensions/ -name mkmf.log -delete

	cd "$geminstdir"
	rm -rf COPYING NEWS README.* Rakefile tests
}

doc() {
	pkgdesc="$pkgdesc (ri docs)"

	amove "$(ruby -e 'puts Gem.default_dir')"/doc
}

sha512sums="
6d1b152214d77bdc32a053627388398dcd01f1d9901f267e50a01edcf6aa64d2480275bdd8f4b13e4de48034af67ed02ba0f5c03cecc155bb528ad96ff1db8f0  ruby-augeas-0.5.0.tar.gz
"