summaryrefslogtreecommitdiff
path: root/system/asciidoctor/APKBUILD
blob: 188751c26d5780741b2015dd1594e84765620719 (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
# Contributor: Seung Soo Mun <hamletmun@gmail.com>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=asciidoctor
pkgver=2.0.10
pkgrel=0
pkgdesc="An implementation of AsciiDoc in Ruby"
url="https://rubygems.org/gems/$pkgname"
arch="noarch"
options="!check"  # can't test in this packaging format; package differently
license="MIT"
depends="ruby"
makedepends=""
source="https://rubygems.org/downloads/$pkgname-$pkgver.gem"

package() {
	gemdir="$(ruby -e 'puts Gem.default_dir')"

	gem install \
		--local \
		--install-dir "$pkgdir"/$gemdir \
		--ignore-dependencies \
		--verbose \
		--no-document \
		"$srcdir"/$pkgname-$pkgver.gem

	rm -rf "$pkgdir"/$gemdir/cache

	cd "$pkgdir"
	for i in usr/lib/ruby/gems/*/bin/*; do
		if [ -e "$i" ]; then
			mkdir -p "$pkgdir"/usr/bin
			ln -s /$i "$pkgdir"/usr/bin/
		fi
	done
}

sha512sums="41db1947da60be27079eaef99c76ae7a20797f0291313ac82582466774a569130e995c674f7ef884a05d3d3783d70df3d5ef83b42ded1c722dd9ab7b1a3357ab  asciidoctor-2.0.10.gem"