aboutsummaryrefslogtreecommitdiffstats
path: root/community/ronn/APKBUILD
blob: e2c7a034ba46b87eea3936e526506e14b32cf100 (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
# 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
pkgver=0.7.3
pkgrel=0
pkgdesc="Convert Markdown files to manpages"
url="https://rtomayko.github.io/ronn/"
arch="noarch"
license="MIT"
depends="groff ruby ruby-json ruby-hpricot ruby-mustache ruby-rdiscount"
checkdepends="ruby-rake ruby-test-unit"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/rtomayko/$pkgname/archive/$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	gem build $_gemname.gemspec
}

check() {
	cd "$builddir"
	rake test
}

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

	cd "$builddir"

	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
	install -D -m 644 "$geminstdir"/COPYING \
		"$pkgdir"/usr/share/licenses/$pkgname/COPYING

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

sha512sums="17ebc493a9943c193ef4e43254f1526c4c1346a09eeb0944ef4c0cd34a62e08c6ef5439c4736fa04e1d21370e175ced65a284b143a7a9675736f5b2c6915a594  ronn-0.7.3.tar.gz"