aboutsummaryrefslogtreecommitdiffstats
path: root/community/ronn/APKBUILD
blob: 094ada38113bff3ab2ab8ce0404d8c2f0affc97f (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
64
65
66
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
# Note: This project is basically dead, but it's still needed for some packages.
pkgname=ronn
_gemname=$pkgname-ng
pkgver=0.9.1
pkgrel=2
pkgdesc="Convert Markdown files to manpages"
url="https://github.com/apjanke/ronn-ng"
arch="noarch"
license="MIT"
depends="
	groff
	ruby
	ruby-kramdown
	ruby-mustache
	ruby-nokogiri
	"
checkdepends="
	ruby-rake
	ruby-test-unit
	"
subpackages="$pkgname-doc"
source="https://github.com/apjanke/$_gemname/archive/v$pkgver/$_gemname-$pkgver.tar.gz
	fix-ruby-3.1-compat.patch
	mustache-1.X.patch
	"
builddir="$srcdir/$_gemname-$pkgver"

build() {
	gem build $_gemname.gemspec
}

check() {
	rake test
}

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

	gem install --local \
		--install-dir "$gemdir" \
		--bindir "$pkgdir/usr/bin" \
		--ignore-dependencies \
		--no-document \
		--verbose \
		$_gemname

	install -D -m 644 "$geminstdir"/man/$pkgname.1 \
		"$pkgdir"/usr/share/man/man1/$pkgname.1
	install -D -m 644 "$geminstdir"/man/$pkgname-format.7 \
		"$pkgdir"/usr/share/man/man7/$pkgname-format.7

	# Remove unnecessary files and rubbish...
	cd "$gemdir"
	rm -r cache build_info doc extensions plugins
	cd "$geminstdir"
	rm -r test man Rakefile [A-Z][A-Z][A-Z]*
}

sha512sums="
03d6856598740ff670a500b182d0be84b584c98245e81b605de6c126b79680be48d2ed18d4cf28252c0a82883b4740ae58c584e977d3f0a9480082a9eb560a9a  ronn-ng-0.9.1.tar.gz
995ba17153208a57d09b2666d70e501735bf3576cb5938e3c6d76335e89fef688a500ad6a8901ae52730f27cd20d541e936f3a1aa4344125f4047aeea6c3792c  fix-ruby-3.1-compat.patch
4242708d1fb857bfd6c2d7f05ec9f51a0a1ab323aa9fef1a8dad13d5f54271e04acbf99cbf62a8784e4483041f4b72427d6ee9a4c260ba50068f64f0fece1757  mustache-1.X.patch
"